I’m looking for a solution to load GL extensions manually on Mac OS X without the need of a library like Glew.
On Windows I use:
#include <windows.h> #include <glcorearb.h> LoadLibraryA("opengl32.dll"); GetProcAddress…and it works beautifully.
On Linux I use:
#include <GL/glx.h> #include <glcorearb.h> install libX11-dev link to X11 lib glXGetProcAddress…and the world is a wonderful place.
Now, afaik, glx doesn’t support context above version 2.1 on OS X and I’m trying to find a solution but I’m not sure which direction to take. I’m already digging into XQuartz but I can’t find any relevant example how to create a 4.x context so far.
To help me in my decision making, here is a few questions that could clear things up a bit:
1 - What is the most up to date technique to use OpenGL 4.x on Linux and OS X?
2 - Is there a common way to use OpenGL 4.x between Linux and OS X?
3 - With distribution in mind, is there a way to gather GL dependencies within the API root folder? Think of this as running a GL API on a vanilla OS without the need of installing anything.
Any help would be greatly appreciated.
Edited by Neosettler, 15 December 2012 - 12:56 PM.