PDA

View Full Version : WinNT - Extension: Shared Texture Palette



PittjePuck
03-16-2000, 10:17 PM
Hi !
I tried to use the shared texture palette extension under WinNT with the ELSA Gloria Synergy card. In my application I want to change the palette for a huge amount of textures simultaneously.

If I just use the paletted texture extension (one texture <-> one palette) it worked really well without a new definition of the textures.

But when I wanted use the "shared" palette extension, this function worked only in my application if it is defined during texture creation.

When I used this extension later in conjunction with the glBindTexture and a following geometric primitive assignment, it did not work. All textures appeared white and solid.
I permuted the open GL states and my whole source code, but no way.

Is it correct just to enable the shared palette extension and to use the colortable functions of the "normal" paletted texture ? Did I miss the point ? B-)

Does anybody have a similiar problem - or better a solution :-) ?

Thanks a lot folks
Pittje

cix>foo
04-01-2000, 05:09 PM
Pittje,
sorry I can't help you with your particular problem yet, but so far on the entire internet you're the only evidence I've found of someone who's got 8-bit paletted textures in some code.

I've tried using 8-bit textures but mysteriously all I get is "white square" syndrome - similar to when you forget to enable GL_TEXTURE_2D.

I'm specifying the texture thus:
glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, image.getWidth(), image.getHeight(), 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, image.getData());

And the palette like this (4 entries for brevity):

byte[] palette = {...various numbers...};
glColorTableEXT(GL_TEXTURE_2D, GL_RGB, 256, GL_RGB, GL_UNSIGNED_BYTE, palette);

But it's just not working. Any ideas?