Test either GL_FRONT_LEFT or GL_FRONT for front-buffer rendering
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 28 Apr 2009 17:08:57 +0000 (10:08 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 1 May 2009 16:49:06 +0000 (09:49 -0700)
For non-stereo visuals, which is all we support, we treat
GL_FRONT_LEFT as GL_FRONT.  However, they are technically different,
and they have different enum values.  Test for either one to determine
if we're in front-buffer rendering mode.

This fix was suggested by Pierre Willenbrock.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/intel/intel_buffers.c

index ecac5bf0207944428dff92c97260d428991f6ed2..b86cafea241a81ec0f5e0f4bb2443e0f0ffd3302 100644 (file)
@@ -326,7 +326,8 @@ intelDrawBuffer(GLcontext * ctx, GLenum mode)
       const GLboolean was_front_buffer_rendering =
        intel->is_front_buffer_rendering;
 
-      intel->is_front_buffer_rendering = (mode == GL_FRONT_LEFT);
+      intel->is_front_buffer_rendering = (mode == GL_FRONT_LEFT)
+       || (mode == GL_FRONT);
 
       /* If we weren't front-buffer rendering before but we are now, make sure
        * that the front-buffer has actually been allocated.