From 559e4f8ebcb186b491d7d687ac43f22a62448fc1 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 15 Jun 2011 00:27:55 -0700 Subject: glx: Allow a context-specific fallback for glXGetProcAddress In applegl, GLX advertises the same extensions provided by OpenGL.framework even if such extensions are not provided by glapi. This allows a client to get access to such API. Signed-off-by: Jeremy Huddleston --- src/glx/applegl_glx.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/glx/applegl_glx.c') diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c index 4bf4672cede..8766c88a136 100644 --- a/src/glx/applegl_glx.c +++ b/src/glx/applegl_glx.c @@ -34,10 +34,12 @@ #if defined(GLX_USE_APPLEGL) #include +#include #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 * -- cgit v1.2.1