• Advertisement

Archived

This topic is now archived and is closed to further replies.

a simple direct 3d question

This topic is 5924 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites

  • Advertisement