PDA

View Full Version : 32 Bit FBOs



Gordon Wetzstein
03-31-2006, 04:14 AM
Dear OpenGL developers,

I have a slight problem with creating a working 32 Bit floating point FBO on my GeForce 6800GT [ForceWare 84.21]. Creating 8 Bit and 16 Bit FBOs is completly fine, however using following code

glGenFramebuffersEXT(1, &_fboID);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, _fboID);

glEnable(GL_TEXTURE_RECTANGLE_ARB);
glGenTextures(1, &texID); glBindTexture(_textureTarget, _texID);
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA32F_ARB, 512, 512, 0, GL_RGBA, GL_FLOAT, NULL);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_ARB, texID, 0);

results in GL_FRAMEBUFFER_UNSUPPORTED_EXT, changing GL_FLOAT_RGBA32_NV to GL_RGBA32F_ARB raises no error, however, if I render a Quad textured with the FBO texture there is no texture. I use the same code for 8/16 Bit and it works, I tried all possible combinations of texture targets, min and mag filters - nothing.

I appreciate any suggestion.

Cheers Gordon

Gernot Ziegler
03-31-2006, 05:36 AM
- Try GL_RGBA_FLOAT32_ATI, too
- Are you sure that the DEPTH_TEST is disabled ? Otherwise, you need to provide a depth binding.

TECRECT is out, anyways, NPOT textures is what you really want ;)

Gordon Wetzstein
03-31-2006, 05:47 AM
Hello,

I studidly did not include

glTexParameteri(_textureTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(_textureTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

between glBindTexture and glTexImage2D during initialization, only when binding, this is why it did not work. Thanks for the quick reply!

Cheers Gordon