diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/glxclient.h | 12 | ||||
-rw-r--r-- | src/glx/glxcmds.c | 4 | ||||
-rw-r--r-- | src/glx/glxext.c | 7 |
3 files changed, 20 insertions, 3 deletions
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index f9ab222d16e..9262f86f1f3 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -769,7 +769,19 @@ GarbageCollectDRIDrawables(struct glx_screen *psc); extern __GLXDRIdrawable * GetGLXDRIDrawable(Display *dpy, GLXDrawable drawable); +#endif + +#ifdef GLX_USE_APPLEGL +extern struct glx_screen * +applegl_create_screen(int screen, struct glx_display * priv); + +extern struct glx_context * +applegl_create_context(struct glx_screen *psc, + struct glx_config *mode, + struct glx_context *shareList, int renderType); +extern int +applegl_create_display(struct glx_display *display); #endif extern struct glx_context dummyContext; diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 5bd989e7dcf..783a1594512 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -224,10 +224,14 @@ CreateContext(Display *dpy, int generic_id, struct glx_config *config, return NULL; gc = NULL; +#ifdef GLX_USE_APPLEGL + gc = applegl_create_context(psc, config, shareList, renderType); +#else if (allowDirect && psc->vtable->create_context) gc = psc->vtable->create_context(psc, config, shareList, renderType); if (!gc) gc = indirect_create_context(psc, config, shareList, renderType); +#endif if (!gc) return NULL; diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 278c71978fa..73c332793a0 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -779,11 +779,12 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv) psc = (*priv->driswDisplay->createScreen) (i, priv); #endif #if defined(GLX_USE_APPLEGL) - if (psc == NULL && priv->appleglDisplay) - psc = (*priv->appleglDisplay->createScreen) (i, priv); -#endif + if (psc == NULL) + psc = applegl_create_screen(i, priv); +#else if (psc == NULL) psc = indirect_create_screen(i, priv); +#endif priv->screens[i] = psc; } SyncHandle(); |