mesa/st: Fix piglit read-front with new drawable invalidation v2
[mesa.git] / src / glx / applegl_glx.c
index 4bf4672cede4a3eef84f9d2ea5f85b9d98eaea0b..8766c88a136ac1ddab7af5c6bed8645a31dc4fca 100644 (file)
 #if defined(GLX_USE_APPLEGL)
 
 #include <stdbool.h>
+#include <dlfcn.h>
 
 #include "glxclient.h"
 #include "apple_glx_context.h"
 #include "apple_glx.h"
+#include "apple_cgl.h"
 #include "glx_error.h"
 
 static void
@@ -82,6 +84,12 @@ applegl_wait_x(struct glx_context *gc)
    apple_glx_waitx(dpy, gc->driContext);
 }
 
+static void *
+applegl_get_proc_address(const char *symbol)
+{
+   return dlsym(apple_cgl_get_dl_handle(), symbol);
+}
+
 static const struct glx_context_vtable applegl_context_vtable = {
    applegl_destroy_context,
    applegl_bind_context,
@@ -91,6 +99,7 @@ static const struct glx_context_vtable applegl_context_vtable = {
    DRI_glXUseXFont,
    NULL, /* bind_tex_image, */
    NULL, /* release_tex_image, */
+   applegl_get_proc_address,
 };
 
 struct glx_context *