using 12-bits intensity texture with colortable

Started by
2 comments, last by V-man 15 years, 8 months ago
Hi, I have an image with 12-bit data (0-4095 values) and I need to display it. I need a look up table from the image values to RGBA format. I thought I should load the image buffer into an opengl texture, and use the glColorTable to control how the values are rendered. Is my direction correct ? I'm using pyOpenGL, can someone point me to an example code that uses GL_INTENSITY values of 12 bits, and example of using glColorTable ? Thanks, Yoav
Advertisement
Recent GPUs don't support color tables.
You would need to upload your color table as a texture and do a lookup by yourself using a fragment shader.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Thanks!

Can anyone recommend a shader creation and compilation tool for Ubuntu linux ?


Yoav
There is Shader Designer which has a Linux version.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement