Red and Blue texture switch

Hello, I finally got my textures working, and ran into a problem . The graphic artist I’m working with walked by and said that I switched the red and the blue around! Well, I thought it should be a really simple matter telling OpenGL that I want it to read it in that order instead…but the documentation does not appear to match reality . I am currently using the format parameter GL_RGB, which is documented on Pg. 95 of the GL API documentation from this site. Also on that page is a format called “GL_BGR”. My compiler accepts the first and rejects the latter. Why?! Any suggestions? Or do I have to figure out how to read the texture and switch the red bits with the blue bits during read-time?

Try using GL_BGR_EXT.

Yeah, that fixed it. Thanks! Is there any place that has the correct formats listed so I can reference that instead of the other thing I was using?

You could check MSDN for info like that. Or there’s always the old stand-by of checking the headers as well.

You were probably looking at docs for 1.2 or higher, and the headers and library for Windows is 1.1. In order to get 1.2 functions, etc. you can also find glext.h ( has it somewhere) and use wglGetProcAddress to get funcion pointers to the 1.2+ functions.