Hello there,
i have the following problem. I used the QT-Toolkit from which i use the QImage object as buffer object for new image bits.
It is a 8bit grayscale image, which means that the color range
reaches from 0 to 255. The color black is 0 and 255 is white.
In the draw function i use the glTextlTexImage2D() function to draw the image bits into the texture. Before anyone ask… it works, very well with a high CPU performance.
Here is the code snippet:
glTexImage2D(
GL_TEXTURE_2D,
0,
GL_RGB8,
m_image.width(),
m_image.height(),
0, GL_LUMINANCE,
GL_UNSIGNED_BYTE,
m_image.bits());
Now i change the color table from the image object, that the
color 255 is only used for the red part of the RGB definition.
example:
RGB(255, 0, 0)
Now i have guessed that the color white change to red if i draw the image to the texture but it isn’t so.
Is it possible that i have to change also the color table from the 2D texture or could anyone give me a hint to solve this problem.
regards
Treehouse