in my project i load a bitmap image and then i put it into a texture using glTexImage2D. After i do this, when i draw something e.x a circle, i use black color it is black, if i try any other color the results are not what they should be. For example if i draw white the output color is dark red (that depends on the colors of the image). This seems unreasonable but maybe you know something i dont.
when the image has only black and white colors i have no problem. The problem occures when i load a coloured image.
The code i use to load the image is not mine, i found it ready but i dont think its the problem cause i tried other codes with the same result.
with this code i make it a texture
glTexImage2D(GL_TEXTURE_2D, 0, 4, in_image->sizeX, in_image->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, in_image->data);
So if i try to draw a white rectangle like this
some other color is drawn(depending on the image).
If you can help me understand why is that and fix it, i’ll be very gratefull.