Skip to main content
gamedev.net
🔒 Locked

GL_BGR

Started by stefu 3 replies 950+ views
Original Post
stefu
stefu
I just downloaded Lesson08 Linux/SDL version but compiled it in Win98. It works after a minor change. The lesson used GL_BGR to create textures, but my Visual C++ told they are undefined. So after checking gl.h header file I changed GL_BGR to GL_RGB and it compiled and runs ok. I''m just bothered why? Isn''t GL_BGR supported in win or isn''t GL_RGB (whuch I is what I''v always used) supported in linux environment? Do I have to select different pixel format in each platform?
Ben_
Ben_
Hello

I bet it is only a writing mistake, but I''m not completly sure. In either case you could contact the auther, if it was a only a typing mistake, he can coorect it, if else he will surely tell you.


Greetings Ben
jenova
jenova
try "GL_BGR_EXT" and "GL_ABGR_EXT" assuming they are supported by your video card if you are using hardware OpenGL. they are defined in the "gl.h" assuming VC++ 6.0.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
stefu
stefu
Thanks!

It works also with GL_BGR_EXT. In the case I define the GL_BGR in the gl header file do I need to check for OpenGL 1.2 support or do they work in all cases with 1.1?

By the way is there any performance advantage using GL_BGR(_EXT) instead of GL_RGB?
I maybe have read somewhere that there might be a big advantage on some hardwares but I''m not sure and I don''t remember where I read it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.