PDA

View Full Version : How to use indexed color texture in OpenGL?



enrique
09-12-2000, 09:13 PM
Because of video memory limitation, I want to try to use indexed color format in glTexImage2D, instead of RGBA format. But how can I specify a CLUT ? (color looking-up table) I found APIs like glPixelMap, but they seem can't fit my need.
Anyone who could help me? Thank you.

Pauly
09-13-2000, 05:46 AM
You need to look up the OpenGL extension function glColorTableEXT. I've got some code that loads paletted .tga files and uses glColorTableEXT to render them on my site.

Be warned paletted textures in hardware have patchy support.