are GL_COLOR_INDEX textures converted to RGBA-Textures?

Are GL_COLOR_INDEX textures converted to RGBA-Textures in the memory? Or are they converted while drawing?

I would guess that that depends on your card.

On GeForce and up, we support paletted textures natively in hardware.

  • Matt


By the way…is it possible to change the palette realtime (without realoading the texture)?


Without the EXT_paletted_texture extension, the internal format for the texture
must be one of the common ones like RGB, RGBA, ALPHA, LUMINANCE_ALPHA,
and all the various size specified ones like RGB8, etc.

If you use an internal format like that, with an EXTERNAL format of COLOR_INDEX,
then OpenGL uses the currently specified pixel maps (glPixelMap) to convert the
indices into colors at download time.

The paletted texture extension, on the other hand stores the indices only, and uses
them to fetch colors at render time.

Thanks -