HELP !!! URGENT !!!

I have a tough problem ((
i found out how to get a pointer to the pixel data of a bmp file !! and how to get the info about size etc.!!
The problem ?
i can use the data for an texture BUT red changes to blue, blue changes to red and green is the only color that is not changed. I have read in a book about windows programming that the internal order of an RGB image is rather BGR.
Now i have opengl 1.1 and therefore the GL_BGR format option isn`t available ! How can i solve this problem ??

By accident i have found a code line in some tutorial program that contained the symbolic constant GL_BGR_EXT. Now my program works.This was not mentioned in the RED BOOK. Maybe it is part of the ‘extension system’ ?? How do i find out what else might be supported, but not mentioned in the RED BOOK ?

Sincerely,
Martin.

GL_BGR_EXT is an extension that Windows default software implementation of OpenGL even supports. To get a list of extensions that your card supports, you can use glGetString(GL_EXTENSIONS); To get information on those extensions, you can check the extension registry. There is a link to the extension registry somewhere on this site. I couldn’t tell you where exactly it is offhand, though.

Another option is the switch from the BMP file format to TGA for you textures.
Easy to read file format, lot’s of examples of loading TGA’s and a format not owned by Micro$oft.

:slight_smile:

Originally posted by Tresher:
I have a tough problem ((
i found out how to get a pointer to the pixel data of a bmp file !! and how to get the info about size etc.!!
The problem ?
i can use the data for an texture BUT red changes to blue, blue changes to red and green is the only color that is not changed. I have read in a book about windows programming that the internal order of an RGB image is rather BGR.
Now i have opengl 1.1 and therefore the GL_BGR format option isn`t available ! How can i solve this problem ??