rendering into a GL_LUMINANCE fbo

Started by
4 comments, last by purpledog 15 years, 12 months ago
Hi, Does anybody know how if it is possible to create a 16 bits (or 8bits) fbo? Using GL_LUMINANCE16 doesn't work. float and integer format works but it doesn't fit my needs. The opengl registry says:
Quote:Although an early draft of the FBO specification permitted rendering into alpha, luminance, and intensity formats, this this capability was pulled when it was realized that it was under-specified exactly how rendering into these formats would work. (specifically, how R/G/B/A map to I/L/A) To resolve this we seem to have two options: A. Add new R and RG formats like NV_float_buffer did. B. For the existing one- and two- component formats, define the mapping from RGBA components to ILA components. The superbuffers group has informally decided that option A is preferable.
But I cannot find any "GL_RED16" anywhere :-( Any idea??
Advertisement
Well, the paragraph just above the one you quoted says it all:
Quote:
Presently none of the one- or two- component texture formats
defined in unextended OpenGL is color-renderable. The R
and RG float formats defined by the NV_float_buffer
extension are color-renderable.

So use GL_FLOAT_R_NV or GL_FLOAT_RG_NV.

[rant]
Of course, all this is incredibly retarded. It introduces again a dependency on NV specific stuff. The ARB really needs to get their heads pulled out of their asses one of these days. "We can't define the RGB to ILA mappings, OMG OMG" is not an excuse to completely remove a vital feature such as rendering to a one or two component format. It's just pure stupidity. As usual, NV tries to save the day by adding the feature as a vendor dependent extension, but this doesn't really help a lot. IMO, all ARB members should be fired, and the control of the OpenGL standard handed over to Nvidia...
[/rant]
I don't understand, both you and the gl spec actually... :-(
As I said, I don't want to use float texture...
So I guess the answer to my question is "no, you cannot do it".

Or maybe there's a strange mixture of type/format/internalformat that could do the trick?
Ok, so the conclusion so far is that it is not possible to render into a GL_LUMINANCE8 or GL_LUMINANCE16, which almost looks surrealistic in 2008...

Oh well... Fair enough... Who needs to save bandwith anyway ;-)
Quote:Original post by purpledog
Ok, so the conclusion so far is that it is not possible to render into a GL_LUMINANCE8 or GL_LUMINANCE16,

Yep, unfortunately that's correct. The only officially supported single or two component formats are GL_FLOAT_R_NV and GL_FLOAT_RG_NV (and derivatives). GL_LUMINANCE might work (and it does on certain NV cards / driver revisions), but that's completely unsupported from the official side (ie. ARB specs). Single/dual component integer texture formats might work (I never tried it, and the specs are unclear about this point).

So either you go floating point, or you waste space with an RGB(A) surface.

Quote:Original post by purpledog
which almost looks surrealistic in 2008...

See my rant above. The ARB is a joke.
rant++

This topic is closed to new replies.

Advertisement