a simple direct 3d question

Started by
2 comments, last by Fitore 22 years, 2 months ago
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
Advertisement
What is you gfx card?

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
Trident 9525 DVD
so did u have the problem i mentioned above?
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

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement