summaryrefslogtreecommitdiff
path: root/src/glx/glxcurrent.c
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2010-04-01 11:17:04 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2010-04-01 12:33:46 -0700
commit23215ef4d60a86d9f3b3fdc08e3fdadc59e98890 (patch)
tree6b2a796ec7e9d229f96c0b4139bc3383b14a1720 /src/glx/glxcurrent.c
parent9495e3703062d1ddaf3161f4efc23f0b51284d9b (diff)
apple: Change ifdefs for DRI to be DRI && !APPLE
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'src/glx/glxcurrent.c')
-rw-r--r--src/glx/glxcurrent.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c
index 115fab4012..691e8dfadf 100644
--- a/src/glx/glxcurrent.c
+++ b/src/glx/glxcurrent.c
@@ -169,7 +169,7 @@ __glXSetCurrentContextNull(void)
{
__glXSetCurrentContext(&dummyContext);
#ifndef GLX_USE_APPLEGL
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
_glapi_set_dispatch(NULL); /* no-op functions */
_glapi_set_context(NULL);
#endif
@@ -284,7 +284,7 @@ SendMakeCurrentRequest(Display * dpy, CARD8 opcode,
}
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
static __GLXDRIdrawable *
FetchDRIDrawable(Display * dpy, GLXDrawable glxDrawable, GLXContext gc)
{
@@ -342,8 +342,8 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
const GLXContext oldGC = __glXGetCurrentContext();
#ifdef GLX_USE_APPLEGL
bool error = apple_glx_make_current_context(dpy,
- (oldGC && oldGC != &dummyContext) ? oldGC->apple : NULL,
- gc ? gc->apple : NULL, draw);
+ (oldGC && oldGC != &dummyContext) ? oldGC->driContext : NULL,
+ gc ? gc->driContext : NULL, draw);
apple_glx_diagnostic("%s: error %s\n", __func__, error ? "YES" : "NO");
if(error)
@@ -386,7 +386,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
return False;
}
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
/* Bind the direct rendering context to the drawable */
if (gc && gc->driContext) {
__GLXDRIdrawable *pdraw = FetchDRIDrawable(dpy, draw, gc);
@@ -421,7 +421,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
return False;
}
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
if ((dpy != oldGC->currentDpy || (gc && gc->driContext)) &&
!oldGC->isDirect && oldGC != &dummyContext) {
#else
@@ -439,7 +439,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
oldGC->currentContextTag, None, None,
&dummy_reply);
}
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
else if (oldGC->driContext && oldGC != gc) {
oldGC->driContext->unbindContext(oldGC->driContext);
}
@@ -485,7 +485,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
* previously destroyed, so we need to free the memory
* for the old handle.
*/
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
/* Destroy the old direct rendering context */
if (oldGC->driContext) {
oldGC->driContext->destroyContext(oldGC->driContext,
@@ -507,7 +507,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
#ifndef GLX_USE_APPLEGL
gc->thread_id = _glthread_GetID();
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
if (!gc->driContext) {
#endif
if (!IndirectAPI)
@@ -522,7 +522,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
(void) glGetString(GL_VERSION);
__glXInitVertexArrayState(gc);
}
-#ifdef GLX_DIRECT_RENDERING
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
}
else {
gc->currentContextTag = -1;