View Full Version : GL_FLOAT_RG32_NV on nvidia
04-02-2007, 12:49 PM
I want to store 2 32 bit floats in a fbo. GL_FLOAT_RG32_NV or GL_LUMINANCE_ALPHA32F_ARB sound like the perfect choice, but I found some older threads that make me think that both actually map to GL_RGB32F_ARB which makes them unattractive. Does anyone know whether that's true for a Geforce 7900?
If they work: How do I setup a fbo with one of the formats? I want them use them as NPOT RTT. What format should I pass to glTexImage2D? What else must I configure differently when setting up a GL_RGB32F_ARB color RTT with a 24 bit depth buffer works?
04-02-2007, 01:02 PM
Take look at this doc:
04-02-2007, 02:13 PM
See page 48 of http://developer.download.nvidia.com/GPU_Programming_Guide/GPU_Programming_Guide.pdf
04-02-2007, 05:03 PM
All buffers need to have the same number of bits per pixel.
Some possible combinations:
GL_RGBA8 + GL_LUMINANCE_ALPHA16F_ARB
GL_RGBA16F_ARB + GL_LUMINANCE_ALPHA32F_ARB
GL_RGBA8 + GL_LUMINANCE32F_ARB doesn't work on nv70, because it's emulated by GL_LUMINANCE_ALPHA32F_ARB
The GL_RGB32F can't be combined with an other format...
The depthbuffer shouldn't be 16 bit (returns incomplete)but GL_DEPTH24_STENCIL8_EXT or GL_DEPTH_COMPONENT24 works
04-02-2007, 05:26 PM
All buffers need to have the same number of bits per pixel.What do you mean? All buffers attached to all FBOs? All buffers attached to one FBO? Or all buffers attached to one attachment of one FBO? I've never heard this before.
The depthbuffer shouldn't be 16 bit (returns incomplete)This actually binds complete on NVidia for DEPTH_ATTACHMENT, but only if there is no COLOR_ATTACHMENT. I remember noting that as odd.
04-03-2007, 12:18 AM
I think he means this:
To be considered framebuffer complete (see section 4.4.4), all color buffers attached to an application-created framebuffer object must have the same number of bitplanes.
04-03-2007, 03:05 AM
Did you actually try these combinations? I just tried GL_RGBA8 + GL_LUMINANCE_ALPHA16F_ARB on a GF7900GTX with Forceware 100.95 (beta) drivers.
I had no luck, always got FRAMEBUFFER_INCOMPLETE (independent on depth/stencil buffer format).
EXT_framebuffer_object does not specify 1 or 2 component formats to be allowed (except FLOAT_RG_NV, FLOAT_R_NV, which can only be used for rectangle textures). Also, all color attached textures must have the same internal format. Is there any new extension which lifts this restriction?
04-03-2007, 12:23 PM
I managed to bind GL_FLOAT_RG32_NV but it seem I must use a texture rectangle as the target.
When I'm running on linux with beryl (a window manager using in my case some FBOs) and trying to bind a large GL_RGB32F_ARB texture I'm getting a GL_OUT_OF_MEMORY. I hoped that GL_FLOAT_RG32_NV might heal that but it doesn't (Both pass for 1800 x 1800 but fail for 1900 x 1900 pixel). Can someone confirm that GL_FLOAT_RG32_NV and GL_RGB32F_ARB have the same memory consumption? (At least the nvidia texture format document referenced above doesn't state that)
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.