PDA

View Full Version : 32 bit depth buffer



arsenium
01-21-2010, 03:44 AM
I want to set 32 bit depth buffer:



PIXELFORMATDESCRIPTOR pfd=
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
24,
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
32,
0,
0,
PFD_MAIN_PLANE,
0,
0, 0, 0
};


but depth buffer is setting to 24 bits... What is wrong?

OpenGl 2.0, NV GF 8600 GT

Brolingstanz
01-21-2010, 05:59 AM
Try as you might I donít think youíre going to shake a 32 but depth buffer out of Windows that a way. To the best of my knowledge the only way to get 32 bits of depth is to render to an offscreen texture/buffer then copy/resolve to the backbuffer for subsequent presentation.

ZbuffeR
01-21-2010, 06:30 AM
Normalized unsigned integer 32 bit depth buffer do not exists in hardware.

Do you have a real need for 32 bits ? Then check http://www.opengl.org/registry/specs/NV/depth_buffer_float.txt for an extension that provides unnormalized 32-bit floating-point depth values.