Mesa (master): apple: Set the glapi dispatch table on context bind
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Tue Jun 14 07:54:16 UTC 2011
Module: Mesa
Branch: master
Commit: a128355ecb5b782a69461a04991e4cffb32249db
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a128355ecb5b782a69461a04991e4cffb32249db
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Tue Jun 14 00:45:12 2011 -0700
apple: Set the glapi dispatch table on context bind
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
---
src/glx/apple/apple_glapi.c | 2 +-
src/glx/apple/apple_glx.c | 1 -
src/glx/apple/apple_glx.h | 2 +-
src/glx/applegl_glx.c | 2 ++
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/glx/apple/apple_glapi.c b/src/glx/apple/apple_glapi.c
index 66933f5..0c89f46 100644
--- a/src/glx/apple/apple_glapi.c
+++ b/src/glx/apple/apple_glapi.c
@@ -52,7 +52,7 @@
struct _glapi_table * __ogl_framework_api = NULL;
struct _glapi_table * __applegl_api = NULL;
-void apple_xgl_init_direct(void) {
+void apple_glapi_set_dispatch(void) {
static void *handle;
const char *opengl_framework_path;
diff --git a/src/glx/apple/apple_glx.c b/src/glx/apple/apple_glx.c
index a76cb4c..d94c1e0 100644
--- a/src/glx/apple/apple_glx.c
+++ b/src/glx/apple/apple_glx.c
@@ -131,7 +131,6 @@ apple_init_glx(Display * dpy)
}
apple_cgl_init();
- apple_xgl_init_direct();
(void) apple_glx_get_client_id();
XAppleDRISetSurfaceNotifyHandler(surface_notify_handler);
diff --git a/src/glx/apple/apple_glx.h b/src/glx/apple/apple_glx.h
index 25f5ea6..c70fc00 100644
--- a/src/glx/apple/apple_glx.h
+++ b/src/glx/apple/apple_glx.h
@@ -45,6 +45,6 @@ void apple_glx_swap_buffers(void *ptr);
void apple_glx_waitx(Display * dpy, void *ptr);
int apple_get_dri_event_base(void);
-void apple_xgl_init_direct(void);
+void apple_glapi_set_dispatch(void);
#endif
diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c
index 92c785f..4bf4672 100644
--- a/src/glx/applegl_glx.c
+++ b/src/glx/applegl_glx.c
@@ -59,6 +59,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;
}
More information about the mesa-commit
mailing list