• Advertisement
Sign in to follow this  

Mesh Disappear When Setting ID3D11DepthStencilView

This topic is 884 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

 

I'm having a problem with enabling depth

 

Whenever I set ID3D11DepthStencilView as the following:

DevCon->OMSetRenderTargets(1, &backBuffer, dsView);

 

I don't see anything on the screen

 

I can only see the mesh appearing on the screen if I set ID3D11DepthStencilView to NULL: DevCon->OMSetRenderTargets(1, &backBuffer, NULL);

 

In PIX, the mesh appear in the viewport, but I can't see anything in "Render"

 

Any idea what's wrong?

 

[attachment=29683:PIX.png]

Edited by Medo3337

Share this post


Link to post
Share on other sites
Advertisement

@ajmiles: Now, I can see the mesh on the screen, however, I have another problem, I can see through the mesh even after enabling depth buffer.

 

[attachment=29689:mesh.png]

Share this post


Link to post
Share on other sites

Now it looks like you have the winding order of your mesh round the wrong way. You can either fix your mesh by reversing the order of each triangle's vertices/indices or change the culling mode on the rasterizer state to cull forward facing triangles instead of back facing triangles (or vice versa).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement