summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-11-25 14:20:36 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-11-25 14:20:36 +0100
commit42108629e80c4ad39da80dca1853c20fd65ad22c (patch)
tree1a6ece1b4f0393d5798e281b17a2a1b23af91d62
parent7dd5ced962e78df68cb902b88b95b7a842a310ab (diff)
libGL: Make sure a valid value is returned for GLX_BIND_TO_MIPMAP_TEXTURE_EXT.
If the server didn't send a value, assume it's not supported. A more generic solution might be better for this kind of problem, but an attempt for this failed (see https://bugs.freedesktop.org/show_bug.cgi?id=9264) and this allows compiz to work with drivers that support GL_EXT_framebuffer_object.
-rw-r--r--src/glx/x11/glcontextmodes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glx/x11/glcontextmodes.c b/src/glx/x11/glcontextmodes.c
index 79bdce799..58c548a8f 100644
--- a/src/glx/x11/glcontextmodes.c
+++ b/src/glx/x11/glcontextmodes.c
@@ -333,7 +333,8 @@ _gl_get_context_mode_data(const __GLcontextModes *mode, int attribute,
*value_return = mode->bindToTextureRgba;
return 0;
case GLX_BIND_TO_MIPMAP_TEXTURE_EXT:
- *value_return = mode->bindToMipmapTexture;
+ *value_return = mode->bindToMipmapTexture == GL_TRUE ? GL_TRUE :
+ GL_FALSE;
return 0;
case GLX_BIND_TO_TEXTURE_TARGETS_EXT:
*value_return = mode->bindToTextureTargets;