]> git.cworth.org Git - fips/commit
Generalize glXGetProcAddressARB wrapper to work for all wrapper functions
authorCarl Worth <cworth@cworth.org>
Thu, 25 Apr 2013 05:55:01 +0000 (22:55 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 25 Apr 2013 05:55:01 +0000 (22:55 -0700)
commit7f48ed429b393b28cb6362af5dcddd9bb27c3901
tree31fb78e1c514b1810b37d2d1903a378280ad2802
parent11b56832eafd3a37e7a9f92bc0f19fbdc187ffac
Generalize glXGetProcAddressARB wrapper to work for all wrapper functions

The originally implementation here had a whitelist of function names for
which we would return a wrapped symbol, (a very short whitelist consisting
only of "glXSwapBuffers"). A hard-coded list here would be a maintenance
nightmare.

Instead, we now simply perform a dlsym lookup on the wrapper library itself
and if there's a function that exists in the library matching the name
being requested, we return that.

This way we can add functions to our wrapper library without needing to
change the implementation of glXGetProcAddressARB at all.
glxwrap.c