use a custom color paletted texture

Hello.
Is there a built-in feature of OpenGL 3.3+ to draw a paletted texture?
From Google I found an old page specifying an extension.
Ideally I’d draw a custom palette (arbitrary number of bits, i.e. colors) texture. I looked at
www.opengl.org/sdk/docs/man3/xhtml/glTexImage2D.xml
for a way with glTexParameter for glTexImage2D but didn’t find anything for paletted textures.
Do I have to enable an EXT?
Can someone please tell me what code do I need for a paletted texture draw?

AFAIK older versions (and compatibillity profile) did support color index mode and color index textures, but current, core profile GL
does not support that anymore.

But it can be easily emulated in a shader by reading integer indices from the indexed texture and reading the actual color values from
a 1D color map texture.

Is there a particular reason why you cannot convert your color indexed textures at load time, or offline and use 24bpp RGB images instead?

But it can be easily emulated in a shader by reading integer indices from the indexed texture and reading the actual color values from

It should also be noted that emulating paletted textures in a shader requires you to do your own filtering.

Thank you both for help.

It should also be noted that emulating paletted textures in a shader requires you to do your own filtering.

and this wraps it up.

I did the math on several images both photos and gradients and using paletted textures turns out to be an efficient kind of compression (~1.4:1) depending on the texture, taking note of its biggest pro: it’s lossless. Of course, it’s not fit for cases when lossless = useless.
What I don’t know is the efficiency of looking up the index in the table but I think it must be fast.
BTW did you see the artifacts of DXT on gradients? Unacceptable :slight_smile: