This implements __glXLookupVendorByName(), which is responsible for
checking a hash table for existing loaded vendors with the given name,
and loading the vendor with that name if no existing vendors are found.
This also implements __glXGetGLXDispatchAddress(), which iterates
through this hash table checking whether each loaded vendor supports
dispatching to the given GLX entrypoint.
This function, which looks up a vendor given a screen number, is used
by several helper functions which look up core GL and GLX dispatch
tables given a screen number, and directly by the API library's make
curent proc. This relies on the (still unimplemented) function
__glXLookupVendorByName().
This also doubles as a way to store addresses of locally-exported GLX
functions; we use a pthread_once() callback to initialize the table
with these addresses.
libglxmapping.c implements functions needed for libGLX to map function
calls to vendors for dispatching.
libglxnoop.h contains a pointer to a no-op dispatch table.
These will be re-implemented in a later change.
This is a wrapper library around libpthread which implements
single-threaded fallbacks in case the API library is loaded in an
application which does not link against pthreads.
This makes use of a (still unimplemented) helper function called
MakeContextCurrentInternal() to actually perform the required API
library work for make current.
- libglxabipriv.h: This is a simple wrapper around libglxabi.h which
defines the static dispatch table to be the same as the set of
functions exported by the vendor (they could potentially differ).
- libglxcurrent.h: This defines a current "API state" struct which
encapsulates the API library's knowledge of the current display,
read/draw drawables, dispatch tables, and vendor (owning the current
context). The glXGetCurrent*() functions are implemented by
retrieving various fields from this API state.
- libglxmapping.h: This defines a "vendor info" struct which contains
information about a loaded vendor. It also provides accessor functions
for retrieving the dispatch table given a screen, and functions for
adding/removing mappings from various keys (Context, FBConfig,
Drawable) to screens.
- libglx.c: Replace the dummy GetStaticDispatch() function with calls to
the API in libglxmapping.h to retrieve the right dispatch table.
Add a makefile to build libGLX.
Update dispatch functions for each of the GLX 1.4 entrypoints
as well as stubs for glXGetProcAddress() and glXMake{Context,}Current()
to use the new vendor library ABI.