Texture from resource gets blue...

Hi there,

I’m having problems with some colors of textures loaded from the resource (using “LoadImage”)…

Some color components seem to be switched… does the resource use some BGR format?

If so, how can I convert it to RGB?


Yeah, some image formats like BMP files are stored in BGR format, not RGB. You can either go through and swap all the bytes of data, or you can use the GL_BGR_EXT as the format parameter of glTexImage2D or glDrawPixels