Module: Mesa
Branch: master
Commit: 521e4b9b7e3c79e7362f7cbd594a2e8cf74cdfe4
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=521e4b9b7e3c79e7362f7cbd594a2e8cf74cdfe4

Author: Brian Paul <[email protected]>
Date:   Tue Sep 29 10:24:27 2009 -0600

glx: fix glXQueryContext(GLX_RENDER_TYPE)

The renderType parameter to CreateContext() was never used.  Also, it
was often passed as zero.  Now when it's zero we check if the context
is RGBA or CI mode and set it accordingly.

Fixes bug 24211.

---

 src/glx/x11/glxcmds.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index af3e559..cd4aede 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -398,6 +398,10 @@ CreateContext(Display * dpy, XVisualInfo * vis,
                _XError(dpy, &error);
                return None;
             }
+            if (renderType == 0) {
+               /* Initialize renderType now */
+               renderType = mode->rgbMode ? GLX_RGBA_TYPE : 
GLX_COLOR_INDEX_TYPE;
+            }
          }
          else {
             mode = fbconfig;
@@ -484,6 +488,8 @@ CreateContext(Display * dpy, XVisualInfo * vis,
       gc->imported = GL_TRUE;
    }
 
+   gc->renderType = renderType;
+
    return gc;
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to