Skip to main content
gamedev.net
🔒 Locked

D3D zbuffer

Started by Verminaard Jun 25, 2000 at 2:07 AM 3 replies 350+ views
Original Post
Verminaard
Verminaard
Does D3DX create a z-buffer for you when you call CreateContextEx()? Looking at the DX7 help files it seems like it should, yet there seems to be no z-buffer in my world after using CreateContextEx.
-------------I am a Juggalo.
WitchLord
WitchLord
If numDepthBits are set to D3DX_DEFAULT, you will get the best available z-buffer.

- WitchLord
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
Verminaard
Verminaard
Then something is seriously screwed up... It seems to work fine, but every so often things that are behind and shouldn''t be seen pop in front. The hardware device I''m enumerating is not very good at all (i think it only does 2d). so could this be the reason? Does the hardware do the z-buffer, or is it the software?
-------------I am a Juggalo.
Void
Void
You can use the Dx Caps Viewer to view the z buffer capablitlies..or you can use the GetCaps function

..
mhkrause
mhkrause
Z-buffering can cause artifacts similar to what you describe.

This is because z does not vary linearly in screen space, I believe 90% of the z-buffer precision is used in the first 10% of the screen (I''m not sure if these are the exact correct numbers.)

An alternative is w-buffering, which does vary linearly, but may exhibit artifacts on objects close to the viewer, and is not available on all cards.

Topic Locked

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

Sign in to reply to this topic.