PDA

View Full Version : changing color of a luminance/alpha bitmap



fwest
10-19-2004, 09:14 AM
Hello,

I have a problem I cannot solve.
In my programme I put a luminance_alpha bitmap
on the color-buffer. The result is a white image
(a letter/digit). I would like to be able to set
the color, but my first attempts ver unsuccessful.
glPixelTransferf(GL_RED_SCALE,float(R))
worked fine, but soooo sloooooow. Is there another
technique to set the color? Low level conversion
of the luminance_alpha bitmap to RGBA is not an
option.

Thanks,
Frits

-NiCo-
10-19-2004, 10:03 AM
If you're using textured quads/triangles, you can set the texture environment to GL_MODULATE and set the primary color to the desired values.

Nico

fwest
10-20-2004, 09:36 PM
Is using textures the only way? I thought about that, but converting many bitmaps into textures and placing them does seem a long detour to me.

Frits