Skip to main content
GameDev.net gamedev.net
🔒 Locked

Stencil Buffer doesnt Work (DX9,HAL)

Started by hansi pirman Dec 29, 2002 at 10:59 AM 0 replies 450+ views
Original Post
hansi pirman
hansi pirman
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
I am a signature virus. Please add me to your signature so that I may multiply... Resistance is futile.
hansi pirman
hansi pirman
strange things happening...

I got the stencil buffer working by going into the advanced 3d
settings of my hercules adapter > direct3d and
activating the following checkboxes:
x enable external depth/stencil buffer
x enable save depth/stencil buffer
x enable load depth/stencil buffer

and when I also ectiveted
x render until flip

i have now 50 fps and not 15 like before (DX9 is very slow
slow with my pc/Graphics adapter)

Sooooooo... for all you Hercules 4000 XT Users out there:
If somethin doesnt work:
-get the lastest driver
-change the direct3d/opengl settings in the 3d options until it works


kind regards

hansi pirman

P.S. I have to buy an ATI/Nvidia...
I am a signature virus. Please add me to your signature so that I may multiply... Resistance is futile.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.