View Full Version : FBO + GL_LUMINANCE
04-23-2008, 11:47 AM
Hi, I have an FBO setup with a color attachment of type GL_LUMINANCE - GL_UNSIGNED_BYTE. I setup the texture this way:
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB,0,GL_LUMINAN CE, 100 , 200, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, NULL);
Then setup a renderbuffer with GL_DEPTH_COMPONENT24.
This FBO setup fails (missing color/buffer attachment).
Works fine if I change everything to GL_RGBA, GL_UNSIGNED_BYTE.
04-23-2008, 11:49 AM
The problem is that luminance textures aren't color-renderable, so the FBO is not complete.
* The following base internal formats from table 3.15 are
"color-renderable": RGB, RGBA, FLOAT_R_NV, FLOAT_RG_NV,
FLOAT_RGB_NV, and FLOAT_RGBA_NV. The sized internal formats
from table 3.16 that have a color-renderable base internal
format are also color-renderable. No other formats, including
compressed internal formats, are color-renderable.
05-02-2008, 02:54 AM
on a geforce 6/7 rendering to GL_LUMINANCE or GL_LUMINANCE_ALPHA did not work
on a geforce 8 it does, it takes the red component for luminance
no idea about other cards
05-02-2008, 05:24 AM
I would not bet on the specification. On ATI, the FBO is complete when one of these formats is attached to it: http://www.fi.muni.cz/~xolsak/fbo_atix1700.txt
I've tried a few of them (LUMINANCE16F, LUMINANCE_ALPHA16F, LUMINANCE32F, LUMINANCE_ALPHA32F) and it worked. It takes the red component for luminance too.
05-05-2008, 11:44 AM
On nv30 and nv40 luminance formats are not supported to be render targets.
05-05-2008, 12:13 PM
FYI, you can download a small program here (http://www.vis.uni-stuttgart.de/~klein/fboCheckSupported.tar.gz) that generates a list of supported FBO formats.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.