a simple direct 3d question
im having a little trouble with the ''Clear'' method supported by the LPDIRECT3DDEVICE8. maybe its just my video card, but the function fails when i try to clear the zbuffer, but it works fine with the clearTarget though.
here is the code im using:
pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0,0,0), 1.0f, 0 );
im also having a little trouble with the stencil format thing, my program crashes when i set the EnableAutoDepthStencil to true. i tried all kind of autoDepthStencilFormat, but none of them work. i think it might be my stupid video card, unless you think other wise. anyway, here is the code i used:
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;(i tried 4 different stencil formats here)
thanx
What is you gfx card?
Neil
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
Neil
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
Repeating the advice for the billionth time :
- Install the *DEBUG* version of the SDK
- Bump up the D3D Debug Output slider in the control panel
- Run in a debugger
- Look at the output to see what D3D is unhappy about
If the format for the depth buffer wasn''t supported, or even Z buffers themselves weren''t supported or there wasn''t enough video memory etc, that call could fail. However IMO the *real* problem will be much earlier in the code (maybe something else returned a failure code) - do the above and find out!.
--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com
- Install the *DEBUG* version of the SDK
- Bump up the D3D Debug Output slider in the control panel
- Run in a debugger
- Look at the output to see what D3D is unhappy about
If the format for the depth buffer wasn''t supported, or even Z buffers themselves weren''t supported or there wasn''t enough video memory etc, that call could fail. However IMO the *real* problem will be much earlier in the code (maybe something else returned a failure code) - do the above and find out!.
--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement