At 12:25 PM 10/14/99 -0600, you wrote:
>#if defined(WINDOWS)
> ptr = wglGetProcAddress(xxx);
>#else if defined(X11)
> ptr = glXGetProcAddress(xxx);
>#else if defined(MACINTOSH)
> ptr = aglGetProcAddress(xxx);
>#else if defined(BEOS)
> ptr = beosGetProcAddress(xxx);
>etc...
>#endif
or better:
#if defined(WINDOWS)
#define glGetProcAddress wglGetProcAddress
#else if defined(X11)
#define glGetProcAddress glXGetProcAddress
#else if defined(MACINTOSH)
#define glGetProcAddress aglGetProcAddress
#else if defined(BEOS)
#define glGetProcAddress beosGetProcAddress
etc...
#endif
elsewhere:
ptr = glGetProcAddress(xxx);
so the ifdef's only have to happen once.
But wglGetProcAddress is context dependent so all the supporting code must
assume that, and we have now re-invented the previous spec.
>- GLUT could offer a neutral wrapper for wgl/glx/aglGetProcAddress
... which would have to be context-dependent because of wglGetProcAddress.
For better or worse, MS has blazed the trail on this one, and
cross-platform portability demands that we accomodate the least common
denominator.
In case i'm confusing anyone with my stance, I feel we must have one of:
a) context-dependent glGetProcAddress (can we handle remote GLX with this?)
b) context-independent glXGetProcAddress
c) context-dependent glXGetProcAddress
but not:
d) context-independent glGetProcAddress
Not really sure I care which one we choose anymore, as long as the burden
on the implementation is minimized.