[patch] Use dlsym instead of glXGetProcAddress in xdriinfo
brian.paul at tungstengraphics.com
Thu Nov 24 07:41:18 PST 2005
Andy Ritger wrote:
> On Wed, 23 Nov 2005, Vladimir Vukicevic wrote:
>>On 11/21/05, Felix Kühling <fxkuehl at gmx.de> wrote:
>>>The attached patches (monolithic and modular) should fix dynamic linking
>>>problems with xdriinfo, that NVidia users were complaining about. Their
>>>libGL doesn't define glXGetProcAddress but only glXGetProcAddressARB.
>>Has anyone contacted nVidia to see if they'd be willing to export the
>>relevant GLX symbols (glXGetProcAddress in particular, but possibly
>>others as well) from their libGL? It seems like the least painful
>>solution, especially since it can potentially lower the amount of
>>support issues regarding 6.9 that they have to deal with.
> Thanks for asking, Vladimir. I apologize for not contributing to
> this thread sooner. Between Matthias, Ian, and others, most of the
> major points have already been mentioned, but I'll reiterate:
> - the Linux OpenGL ABI
> (http://oss.sgi.com/projects/ogl-sample/ABI/) requires
> the GLX_ARB_get_proc_address extension (which provides
> - glXGetProcAddress is a part of the GLX 1.4 draft spec
> - the GLX 1.4 spec has never been ratified (it's not available,
> as far as I can tell, on opengl.org, and the only version of
> the spec I've ever seen was only labeled "Draft")
> - it is undesirable to advertise a version of GLX that is not
> ratified (if it hasn't been ratified, then it's still possible
> to change; if the spec changes, how will applications know
> if an implementation's GLX 1.4 is the ratified 1.4 or the
> earlier draft version of 1.4); in this case, this point
> is probably just academic -- Mesa has claimed GLX 1.4 long
> enough that I doubt anyone would want to try to change the
> GLX 1.4 draft spec.
I think what happened (long time ago) was that GLX 1.4 was spec'd and
ratification was imminent, but for some reason, it never happened. In
anticipation of 1.4 I added glXGetProcAddress to Mesa and bumped the
version number for the next Mesa release. I neglected to
remove/disable the 1.4 stuff prior to the Mesa release and it went out
that way, and stayed that way. I didn't even realize that 1.4 wasn't
ratified until much later.
> - it is undesirable to expose OpenGL API entry points if the
> version string or extension string does not properly reflect
> that the entry point is available (eg: glXGetProcAddress should
> not be expoed by an implementation unless that implementation
> also claims GLX 1.4), mostly because it encourages poor
> versioning practices in OpenGL applications. Ulrich Drepper
> has good things to say about entry point control in his
> DSO HowTo (http://people.redhat.com/drepper/dsohowto.pdf).
> I think the lesson here should be that if you want to write an OpenGL
> application on Linux that will be portable to anything other than
> GLX 1.4 implementations, you should use "glXGetProcAddressARB",
> rather than "glXGetProcAddress". The former is required by the
> Linux OpenGL ABI, so it's a safe assumption, while the latter is
> only provided by GLX 1.4 implementations.
> That said, I'd like to update NVIDIA's GLX implementation to GLX 1.4.
> I've pinged the GLX-ARB working group about the official status of
> GLX 1.4, and hopefully we can just make GLX 1.4 official, at which
> point NVIDIA's implementation will be updated, the version string
> will be reved, and glXGetProcAddress entry point will be exposed.
That would be great. Thanks, Andy.
More information about the xorg