X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glxwrap.c;h=d7d4191ce528ae5b59c5f8a9317b8e99a179d679;hb=fd9a68595eecba23d48729bda3f470934a0048ed;hp=84bf48522565e489de274cd87e752d5a470ebd01;hpb=65892e28812cc06cceba26c22caca6e6b83960e0;p=fips diff --git a/glxwrap.c b/glxwrap.c index 84bf485..d7d4191 100644 --- a/glxwrap.c +++ b/glxwrap.c @@ -21,6 +21,8 @@ #include "fips.h" +#include "fips-dispatch.h" + #include #include #include @@ -38,7 +40,7 @@ glXSwapBuffers (Display *dpy, GLXDrawable drawable) } /* glXGetProcAddressARB is a function which accepts a string and - * returns a generic function pointer (which nominall accepts void and + * returns a generic function pointer (which nominally accepts void and * has void return type). Of course, the user is expected to cast the * returned function pointer to a function pointer of the expected * type. @@ -57,3 +59,26 @@ void (*glXGetProcAddressARB (const GLubyte *func))(void) return ret; } + +void (*glXGetProcAddress (const GLubyte *func))(void) +{ + /* This comment must not be removed. It ensures that the + * glXGetProcAddress function ends up in our exported symbol + * list even though there's not otherwise any code saying: + * + * GLWRAP_DEFER_WITH_RETURN (ret, glXGetProcAddress, func); + */ + return glXGetProcAddressARB(func); +} + +Bool +glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx) +{ + Bool ret; + + fips_dispatch_init (FIPS_API_GLX); + + GLWRAP_DEFER_WITH_RETURN (ret, glXMakeCurrent, dpy, drawable, ctx); + + return ret; +}