I have a greyscale texture map that I wish to use as a font map, containing anti-aliased glyphs of individual characters, so ideally I want each texel to represent both luminance and alpha values, that is, GL_INTENSITY. The thing is, glTexImage2D does not support GL_INTENSITY as a format for the texel data. Is there a way around this, or do I have to double each byte in the texture map so I can use the valid GL_LUMINANCE_ALPHA?

Zengar

09-13-2007, 02:34 PM

I guess using GL_APHA (or GL_RED/BLUE etc.) as format would do the trick (only a suggestion, I have never done it myself).

Korval

09-13-2007, 03:17 PM

The thing is, glTexImage2D does not support GL_INTENSITY as a format for the texel data.It doesn't specify it as an external format. Any single-component format will do; I use GL_LUMINANCE even though the internal format is GL_INTENSITY.

Crane

09-14-2007, 01:51 AM

So would something along the lines of the following would do the trick, or is there a catch?