Archived

This topic is now archived and is closed to further replies.

stefu

GL_BGR

Recommended Posts

stefu    120
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?

Share this post


Link to post
Share on other sites
Ben_    122
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
GL_RGB and GL_BGR and numerous otheres are all valid.
Its just that they were only madestandard in gl1.2 and as such arent in the slighlty lacking gl headers. Theansweris to define them yourself or to download some extention headers. I lot of things that whould be standard have to be definedand called extention style due to the inadiquate headeres.
You''ll prolly be able to find a link to some in the Nvidia developers section opengl.org or sgi site amoung others.
Hope I beeen vaguely useful.

Share this post


Link to post
Share on other sites
jenova    122
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.

Share this post


Link to post
Share on other sites
stefu    120
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.

Share this post


Link to post
Share on other sites