GL_TEXTURE_COLOR_TABLE_SGI

Does anyone have a simple demo code illustrating how this extension is supposed to work on SGI or SUN ?

I am trying to get some simple volume rendering code (i.e. non shaded) based on 3D texture mapping going but all I get are solid white cubes

So far I tried to load my 3D texture using
glTexImage3D(GL_TEXTURE_3D, 0, GL_INTENSITY8, width, height, depth, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, data);

and define the lookup table using:
glColorTableSGI(GL_TEXTURE_COLOR_TABLE_SGI, GL_RGBA8, 256, GL_RGBA, GL_UNSIGNED_BYTE, colorMap);

3D_texture is enable as well as GL_TEXTURE_COLOR_TABLE_SGI

but all I get is a white solide cube

Thanks for any input

Try using GL_LUMINACE rather than GL_COLOR_INDEX for format. I use this and it works for me. Everything else you’re doing seems fine. This should work on SGI and SUN systems but I’m not real familiar with SUN hardware.

Mark

Hi Marc, and thanls for the tip ! indeed using GL-LUMINANCE worked right away on my sun. I thought I had tried that before but I tried so many combinations !

It took the rest of the day to find out whi it was not working on one of our SGI. For some reason, the glTexImage3D on this machine creates a value error for any volume larger than 64x64x64 (even though this machine has hardware support for texture mapping and the GL_MAX_TEXTURE_SIZE return 512 !)

I guess we will have to update or patch OpenGL on this machine.

Anyways … thanks again

Originally posted by macosta:
[b]Try using GL_LUMINACE rather than GL_COLOR_INDEX for format. I use this and it works for me. Everything else you’re doing seems fine. This should work on SGI and SUN systems but I’m not real familiar with SUN hardware.

Mark[/b]