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

32 bit Depth Buffer...

Started by PepeladZ Jun 12, 2002 at 12:37 PM 3 replies 3.3k views
Original Post
PepeladZ
PepeladZ
Hi, How is it possible to make OpenGL use/set 32bit Depth buffer if I don''t need Stencil Buffer at all. I use GeForce2 MX with latest drivers. Here is what I request: dwFlags: PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_DOUBLEBUFFER iPixelType: PFD_TYPE_RGBA cColorBits: 32 cAlphaBits: 0 cAccumBits: 0 cDepthBits: 32 cStencilBits: 0 cAuxBuffers: 0 iLayerType: 0 Here is what ChoosePixelFormat() returns: dwFlags: PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_DOUBLEBUFFER iPixelType: PFD_TYPE_RGBA cColorBits: 32 cAlphaBits: 0 cAccumBits: 64 cDepthBits: 16 cStencilBits: 0 cAuxBuffers: 0 iLayerType: 0 Although there is a better format exists: dwFlags: PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_DOUBLEBUFFER iPixelType: PFD_TYPE_RGBA cColorBits: 32 cAlphaBits: 0 cAccumBits: 64 cDepthBits: 24 cStencilBits: 8 cAuxBuffers: 0 iLayerType: 0 Please advise. Thanks in advance.
a person
a person
a 32bit depth buffer ussually measn 24 bit with 8bit stencil. much like a 32 bit color color depth is really 24bit with an 8bit alpha.

like with color depth you dont need to use th alpha channel, but is there to improve performence since everything is dword aligned.

[edited by - a person on June 13, 2002 1:31:52 AM]
Brother Bob
Brother Bob
Since most consumer level cards uses single precision floats internally, which has 23 significat bits in the mantissa, it''s pretty useless to have more than 24 bits in the depth buffer. You can''t have more precision than what the datatype can give you.
PepeladZ
PepeladZ
Many thanks for your help

Topic Locked

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

Sign in to reply to this topic.