I was just looking at OpenGL updates on OS X Lion when I discovered what I was now scared to useglext.h .
So here is the mistake. Lion OpenGL.framework has the glext.hfollowing definition.
typedef void *GLhandleARB;
But glext.hfrom the registry, OpenGL has the following.
typedef unsigned int GLhandleARB;
Now the problem is that when building for x86_64 on Lion we have sizeof(void*)==8, but sizeof(unsigned int)==4. So what do you trust? Lion heading? Or the OpenGL registry header? Well, of course, you trust the system headers because, apparently, they claim that the ABI on the 64-bit Lion is of the 64-bit type GLhandleARB.
Now, this causes several problems in my head about various platforms:
If you must use Apple glext.h, but Apple glext.hdoes not provide access to anything later than OpenGL 2.1, then how can you access the 3.0+ features on new cards?
/ li>Is it unsafe to use the OpenGL registry glext.hon Linux? Or should you also use the system glext.h? In this case, question No. 1 also applies here.
How do you deal with things on Windows where the system has never been glext.h? You obviously cannot use a driver provider glext.h, because different providers may not agree with the sizes of different types. (Or is it not?) What is the deal here?
source
share