SetDepthStencilSurface BUG?
whether I signed the flag D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL, it seems depth/stencil surface will be discarded when using DirectX9.0c debug version, on the contrary, release version will never discard any surface.
Is it a bug?
If by discard you mean blanks or fills it with junk data, keep in mind that D3D does that in debug mode so you can see clearly when something is invalid. It doesn't have to do it (in fact it takes a bit of time), it's just there to make you do the right thing in debug mode so it behaves correctly in release.
Oh, I see. Thank a lot.
And the matter is when I remove the flag DISCARD, it still discard the surface in debug version, so I doubt it a bug.
And the matter is when I remove the flag DISCARD, it still discard the surface in debug version, so I doubt it a bug.
Actually, I was incorrect. Setting the flag is a good thing in release mode too: On some drivers discarding the z-buffer is a perf improvement. Look in the docs for info.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement