🔒 Locked
Floating point depth buffer for main framebuffer?
Advertisement
Original Post
How do I set the main framebuffer when I create an OpenGL context to use a floating point depth buffer as per WGL_EXT_depth_float (see http://www.opengl.org/registry/specs/ARB/depth_buffer_float.txt )? In the PIXELFORMATDESCRIPTOR do I simply set depthbits to 32? I'm guessing it's not that simple. (note this is different from GL_NV_depth_buffer_float which is for textures rather than the framebuffer)
You are looking at wrong extension. This is correct one: http://www.opengl.org/registry/specs/EXT/wgl_depth_float.txt. It defines new enum to be used with wglChoosePixelFormat function.
Hi, I can't get it to work, which is strange given I have the latest NVIDIA driver and a GTX285 card.
wglChoosePixelFormat fails with the following attributes if I use the WGL_DEPTH_FLOAT_EXT
WGL_DRAW_TO_WINDOW_ARB,GL_TRUE,
WGL_SUPPORT_OPENGL_ARB,GL_TRUE,
WGL_ACCELERATION_ARB,WGL_FULL_ACCELERATION_ARB,
WGL_COLOR_BITS_ARB,bitsPerPixel,
WGL_ALPHA_BITS_ARB,8,
//WGL_DEPTH_FLOAT_EXT,GL_TRUE,
WGL_DEPTH_BITS_ARB,depthBits,
WGL_STENCIL_BITS_ARB,0,
WGL_DOUBLE_BUFFER_ARB,GL_TRUE,
WGL_SAMPLE_BUFFERS_ARB,GL_TRUE,
WGL_SAMPLES_ARB, 4,
0,0
I tried commenting out the multisampling ones, and also various depthBits, but WGL_DEPTH_FLOAT_EXT still causes the wglChoosePixelFormat to fail. How do I get it working?
A second question as well: how do I set the CSAA coverage amount in my program? i.e., how do I get 8xQ instead of 8x for example. I'd like to do it in the program instead of having to force it in the control panel.
Thanks.
wglChoosePixelFormat fails with the following attributes if I use the WGL_DEPTH_FLOAT_EXT
WGL_DRAW_TO_WINDOW_ARB,GL_TRUE,
WGL_SUPPORT_OPENGL_ARB,GL_TRUE,
WGL_ACCELERATION_ARB,WGL_FULL_ACCELERATION_ARB,
WGL_COLOR_BITS_ARB,bitsPerPixel,
WGL_ALPHA_BITS_ARB,8,
//WGL_DEPTH_FLOAT_EXT,GL_TRUE,
WGL_DEPTH_BITS_ARB,depthBits,
WGL_STENCIL_BITS_ARB,0,
WGL_DOUBLE_BUFFER_ARB,GL_TRUE,
WGL_SAMPLE_BUFFERS_ARB,GL_TRUE,
WGL_SAMPLES_ARB, 4,
0,0
I tried commenting out the multisampling ones, and also various depthBits, but WGL_DEPTH_FLOAT_EXT still causes the wglChoosePixelFormat to fail. How do I get it working?
A second question as well: how do I set the CSAA coverage amount in my program? i.e., how do I get 8xQ instead of 8x for example. I'd like to do it in the program instead of having to force it in the control panel.
Thanks.
Actually it says that extension is taken by wglChoosePixelFormatExEXT rather than wglChoosePixelFormatARB/EXT
There's no such ...Ex function on GLee and I can't find it documented anywhere. Where is it?
[Edit:]Meh, looks like common cards simply don't support that extension. Talk about going after a red herring...
There's no such ...Ex function on GLee and I can't find it documented anywhere. Where is it?
[Edit:]Meh, looks like common cards simply don't support that extension. Talk about going after a red herring...
Quote:
Original post by Prune
Actually it says that extension is taken by wglChoosePixelFormatExEXT rather than wglChoosePixelFormatARB/EXT
There's no such ...Ex function on GLee and I can't find it documented anywhere. Where is it?
[Edit:]Meh, looks like common cards simply don't support that extension. Talk about going after a red herring...
I'm sure they meant wglChoosePixelFormatEXT
Here is some information about this extension and supported cards: http://www.kludx.com/capability.php?capability=556
Quote:
Original post by zedz
why do u need a 32bit fp depth buffer?
keep in mind a lot of hardware wont support it (I dont think any nvidia hardware does for a start)
I suppose with shaders it would be possible to emulate fp32 depth if u really needed it
Of course nvidia supports 32fp depth buffers - as depth textures or render buffers attached to FBOs. They're actually very useful, especially combined with shadow mapping or delicate coplanar geometry viewed from a far distance. But since a modern engine is very likely to do all its rendering to an FBO anyway, and will just blit it to the (depthbuffer-less) framebuffer in a last 2D step, no framebuffer fp depth support is needed anymore.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement