Original Post
Hi there!
I have a strange Problem:
My Stencil Code doesn''t work as expected. I first thought its my fault, and theres something wrong in the code.
But when i change the Device to REF everything works as expected.
There are no DX9 errors in the VC++ Debug Console..
Also Stencil Buffering seems to be supported, when i look into the Caps Viewer (for the HAL device):
Depth/Stencil Formats
D3DFMT_D32
D3DFMT_D24X4S4 <== the format i''ve choosen
D3DFMT_D16
StencilCaps
D3DSTENCILCAPS_KEEP Yes
D3DSTENCILCAPS_ZERO Yes
D3DSTENCILCAPS_REPLACE Yes
D3DSTENCILCAPS_INCRSAT Yes
D3DSTENCILCAPS_DECRSAT Yes
D3DSTENCILCAPS_INVERT Yes
D3DSTENCILCAPS_INCR Yes
D3DSTENCILCAPS_DECR Yes
D3DSTENCILCAPS_TWOSIDED No
I dont think it makes much sense to Post some code here, sience it works fine with the REF device.
But maybe anyone here has a idea why the stencil buffer doesn''t work correctly with the HAL device.
Maybe because I haven''t got a DX9 driver for my hercules graphics adapter ?
And here the description of the problem:
When I''m using the stencil buffer with the HAL device, nothing is drawn outside the stencil region (like i want it), but inside the stencil region there''s only the QUAD drawn which was also drawn in the stencil buffer, but not the other meshes which are in the "viewing area" of this quad. and yes, i disable depth testing...
thanks for any answers
kind regards
hansi pirman