Why the viewport isn't cleared?
Until now I only used the D3DCLEAR_TARGET and D3DCLEAR_ZBUFFER flags with the IDirect3DDevice8::Clear() function.
But when I add the flag D3DCLEAR_STENCIL with the reference value 0, only the part of the screen where pixels are drawn is cleared.
I wonder what''s going on... I know I could just trash the D3DCLEAR_STENCIL flag since I don''t use the stencil buffer, but I''d like to understand what Direct3D is doing.
Hey there,
Similar things happen if you try to Clear() with D3DCLEAR_ZBUFFER in the flags, and you don''t actually have a Z-Buffer (i.e. EnableAutoDepthStencil is false and no other Z buffer is present). If you don''t have a stencil buffer then I imagine similar things should take place when you specify D3DCLEAR_STENCIL.
Take your own advice and trash D3DCLEAR_STENCIL unless you use a stencil buffer for something
Similar things happen if you try to Clear() with D3DCLEAR_ZBUFFER in the flags, and you don''t actually have a Z-Buffer (i.e. EnableAutoDepthStencil is false and no other Z buffer is present). If you don''t have a stencil buffer then I imagine similar things should take place when you specify D3DCLEAR_STENCIL.
Take your own advice and trash D3DCLEAR_STENCIL unless you use a stencil buffer for something
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement