PDA

View Full Version : Platform dependent parts of open GL API



Chaitra CJ
01-16-2012, 09:04 PM
Which parts of open GL API's are platform dependent??? Kindly help me in this regard.i.e. What makes open GL API for windows different from that of linux.

tksuoran
01-17-2012, 03:30 AM
Operating system specific parts are outside GL*API.

For Windows, there is WGL.
For Linux (and others), there is GLX.

See http://www.opengl.org/wiki/Platform_specifics

Ragnemalm
01-17-2012, 11:46 PM
And for Mac, there is AGL, CGL and NSOpenGL. Yes, three different, for Carbon windows, for full-screen and for Cocoa views.

menzel
01-18-2012, 01:54 AM
I think on MacOS X NSOpenGL is the way to go as carbon will die out. 64 bit apps are only possible on Cocoa afaik.

OpenGL extensions can also be platform dependent but everything that's in the specs itself should be available as long as the OpenGL version and profile is supported (e.g. MacOS X only supports 3.2 core right now if you need > 2.1).

mhagain
01-18-2012, 02:18 AM
If this is related to your prior post about OpenGL source code, you seem to have some fundamental misunderstanding about what OpenGL is and what it does.

The OpenGL API has nothing to do with the platform it's running on.

OpenGL itself does not actually do any drawing. None. None at all. Your graphics hardware does the drawing.

OpenGL is just a layer that sits between your program and your hardware: "a software interface to graphics hardware" as page 1, line 1 of just about any OpenGL material says.

Ragnemalm
01-23-2012, 06:04 AM
I think on MacOS X NSOpenGL is the way to go as carbon will die out. 64 bit apps are only possible on Cocoa afaik.

Sure AGL is not for 64-bit and therefore not suitable for new software, but you ignored CGL, why?

V-man
01-23-2012, 09:26 AM
The platform dependent parts are the initialization and destruction routines for the pixelformat/context.

There are some other things as well such as setting up vsync or choosing which GPU you want to run the context on, getting GL function addresses.

There is a small list here
http://www.opengl.org/wiki/Platform_specifics:_Windows#glX_vs_wgl