diff options
Diffstat (limited to 'src/glx/applegl_glx.c')
-rw-r--r-- | src/glx/applegl_glx.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c index 9b8605f4075..8766c88a136 100644 --- a/src/glx/applegl_glx.c +++ b/src/glx/applegl_glx.c @@ -34,16 +34,18 @@ #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 applegl_destroy_context(struct glx_context *gc) { - apple_glx_destroy_context(&gc->driContext, gc->currentDpy); + apple_glx_destroy_context(&gc->driContext, gc->psc->dpy); } static int @@ -59,6 +61,8 @@ applegl_bind_context(struct glx_context *gc, struct glx_context *old, if (error) return 1; /* GLXBadContext is the same as Success (0) */ + apple_glapi_set_dispatch(); + return Success; } @@ -80,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, @@ -89,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 * @@ -116,7 +127,6 @@ applegl_create_context(struct glx_screen *psc, gc->vtable = &applegl_context_vtable; gc->driContext = NULL; - gc->do_destroy = False; /* TODO: darwin: Integrate with above to do indirect */ if(apple_glx_create_context(&gc->driContext, dpy, screen, config, |