[Xquartz-changes] [366] AppleSGLX/trunk/apple_xgl_api_stereo.c

source_changes at macosforge.org source_changes at macosforge.org
Wed Aug 5 22:19:13 PDT 2009


Revision: 366
          http://trac.macosforge.org/projects/xquartz/changeset/366
Author:   jeremyhu at freedesktop.org
Date:     2009-08-05 22:19:11 -0700 (Wed, 05 Aug 2009)
Log Message:
-----------
Ensure that we have a proper GLX context when we call glDrawBuffer

Modified Paths:
--------------
    AppleSGLX/trunk/apple_xgl_api_stereo.c

Modified: AppleSGLX/trunk/apple_xgl_api_stereo.c
===================================================================
--- AppleSGLX/trunk/apple_xgl_api_stereo.c	2009-08-06 03:07:09 UTC (rev 365)
+++ AppleSGLX/trunk/apple_xgl_api_stereo.c	2009-08-06 05:19:11 UTC (rev 366)
@@ -38,9 +38,9 @@
  * differences in MacOS X.
  */ 
 void glDrawBuffer(GLenum mode) {
-    GLXContext gc = __glXGetCurrentContext();
+    GLXContext gc = glXGetCurrentContext();
 
-    if(apple_glx_context_uses_stereo(gc->apple)) {
+    if(gc && apple_glx_context_uses_stereo(gc->apple)) {
 	GLenum buf[2];
 	GLsizei n = 0;
 	
@@ -70,9 +70,9 @@
 
 	 
 void glDrawBuffers(GLsizei n, const GLenum *bufs) {
-    GLXContext gc = __glXGetCurrentContext();
+    GLXContext gc = glXGetCurrentContext();
 
-    if(apple_glx_context_uses_stereo(gc->apple)) {
+    if(gc && apple_glx_context_uses_stereo(gc->apple)) {
 	GLenum newbuf[n + 2];
 	GLsizei i, outi = 0;
 	bool have_back = false;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090805/22747670/attachment.html>


More information about the Xquartz-changes mailing list