Textures-reduced to 4 bits per color?

If I look to the histogram of the textured images I can conlcude that there are only 4 bits to code the colors of the textures.
(I use GL_NEAREST and a textured object over the whole screen - with GL_REPLACE to see thid effect)

How it could be changed?

Here is the code:

glPixelStorei(GL_UNPACK_ALIGNMENT, 1);



glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, columns,rows, 0, GL_RGBA, GL_UNSIGNED_BYTE,
(unsigned char*)checkImage);

This happens because you choose GL_RGBA as internal texture format. GL_RGBA tells OpenGL to use RGBA format, but not how many bits, so it’s up to the driver to choose the EXACT pixelformat. This can be solved by setting the exact pixelformat yourself, for example, choose GL_RGBA8 (or whatever it’s called). This will “force” OpenGL to use 8 bits per element. However, if your driver can’t use 32-bit internal texture formats, it will choose another anyway.

Thank you Bob! I should have looked it up better in the Red Book.