@ @David:
Actually, this is the version of the Apple OpenGL software renderer.
To have a better view of the different supported versions, there is GLView available free on the AppStore:
https://itunes.apple.com/app/opengl-extensions-viewer/id444052073?mt=12#
It gives indeed all the correct versions, 2.1 for legacy and 4.1 Core on my MBPro.
With all these informations (and the charts, thanks again Michael) I can now summarize:
- It is safe to assume OpenGL Legacy v2.1 is available on all Macbook available nowadays.
- It is safe to assume OpenGL Core at least v3.3 is available on all Macbook available nowadays.
@ @Will:
I’m working on a product I plan to sell in a near future, all bindings to OpenGL will be include but I may release those bindings separately as well, for free.
Regarding OpenGLSurface.Configure, it wont suffice to set OpenGL Profiles. It only gives the opportunity to (slightly) adjust the ‘basic’ pixel format use by ‘basic’ OpenGL contexts. In order to go one step further, you use this ‘basic’ context to retrieve the OpenGL extensions, in fact the WGL/GLX extensions (on Windows/Linux, for Mac I have yet to understand precisely how it works) needed to set up advanced Pixel Formats and Profiles.
The kCGLOGLPVersion_3_2_Core constant you mention has to be use with Profile setup, not Pixel Format (but again, on Mac I’m trying to figure out how this works as it seems this is a different approach than for Windows/Linux).
Then you are right, using a Core Profile is a totally different story than using Legacy OpenGL and you need to retrieve all the functions by yourself.
Declare wont help though, at least on Windows/Linux (again I have to figure out how it works on Mac ), because those OpenGL extensions has to be queried at runtime (wglGetProcAddress() for instance on Windows) and only once you have set up your OpenGL context with the right Pixel Format and Profile. This is very important, as a function pointer may be different from one profile to another one for the same function. That explain you can’t use Declare (except perhaps on Mac, but again… ).
Cheers,
Guy.