Bernd Kreimeier wrote:
>
> Thomas Roell writes:
> > For shake of portability with wglGetProcAddress, I would recommand
> > that there is only a glXGetProcAddress() that returns pointers to GL
> > and GLX functions. The way a port could be done very trivially for an
> > application:
> >
> > #ifdef linux
> > #define wglGetProcAddress glXGetProcAddress
> > #endif
>
> I second this. It would easily fit into the pointer twiddling
> that Q-style games do for abstracting wgl, GLX, and fxMesa.
> It also solves the recursion Brian mentioned. That was the one
> question in my first comments that Jon skipped - why not
> only a glX function operating on the current context?
I'm against this sort of #ifdef'ing. While our concern here is
Linux/OpenGL, we're also defining something which could be of use
to many other flavors of Unix, or even Windows. It would be a
shame to inadvertantly "design-out" other platforms.
A glGetProcAddressEXT() function could be implemented in any OpenGL
on any platform. Also, any reference to glXGetProcAddress or
wglGetProcAddress in a GLUT-based program sticks out like a sore
thumb. Unfortunately, use of wglGetProcAddress may be unavoidable
for some time to come.
I'm in favor of separate glGetProcAddressEXT, gluGetProcAddressEXT,
glxGetProcAddress, etc functions.
-Brian