PDA

View Full Version : Texture from resource gets blue...



NOAH IV
11-11-2002, 04:57 AM
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?

Thanks

Deiussum
11-11-2002, 05:41 AM
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