summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-29 10:24:27 -0600
committerBrian Paul <brianp@vmware.com>2009-09-30 15:15:10 -0600
commit521e4b9b7e3c79e7362f7cbd594a2e8cf74cdfe4 (patch)
tree5fec00e8c23d54bc9ef83073bf79fbf011345678 /src/glx
parent49fbdd18ed738feaf73b7faba4d3577cd9cc3e59 (diff)
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.
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/glxcmds.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index af3e559f99..cd4aede74e 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;
}