[patch] Use dlsym instead of glXGetProcAddress in xdriinfo
mhopf at suse.de
Wed Nov 23 05:46:44 PST 2005
On Nov 21, 05 18:08:48 -0500, Felix Kühling 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.
> The cleanest solution that works with any libGL is to use dlopen and
> dlsym instead. This has the nice side effect that it removes all
> build-time dependencies on libGL and GLX headers. There is only one
> catch: does Xorg currently support any architectures that don't have
> dlopen/dlsym in dlfcn.h?
I don't think using dlym is actually allowed, as the OpenGL calls are
not neccessarily expected to be exported (and can even be context
However, a valid solution used by most games is to dynamically load
libGL, and use dlsyn to get either glXGetProcAddress or
glXGetProcAddressARB, whatever is defined.
Matthias Hopf <mhopf at suse.de> __ __ __
Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ mat at mshopf.de
Phone +49-911-74053-715 __) |_| __) |__ labs www.mshopf.de
More information about the xorg