Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


ClearDepthStencilView doesn't clear the stencil buffer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 liggxibbler   Members   -  Reputation: 105

Like
0Likes
Like

Posted 20 July 2013 - 04:49 PM

The call in my application to ID3D11DeviceContext::ClearDepthStencilView (with D3D11_CLEAR_STENCIL as the flag) doesn't clear the stencil buffer. Stencil operations work fine, but the stencil buffer is cleared to 0xff after every buffer swap regardless of the passed value. What could be causing this?

 

EDIT: The 0xff is from another call to the same function earlier in the code, but then why does that call work and the other doesn't?


Edited by liggxibbler, 20 July 2013 - 05:12 PM.


Sponsor:

#2 ajmiles   Members   -  Reputation: 194

Like
0Likes
Like

Posted 20 July 2013 - 05:41 PM

What are you using to verify the stencil buffer isn't being cleared?

Have you tried running with the D3D11 Debug Layer turned on to see if it's giving you any warnings or errors?

 

If you're passing through a valid DepthStencilView with a stencil 'channel' I can't think of any reason it wouldn't be clearing besides the very unlikely event of a driver bug / hardware failure (but we're a long way from proving that to be the case).






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS