mesa: Also update the color draw buffer if it's explicitly set to GL_NONE.
authorHenri Verbeet <hverbeet@gmail.com>
Thu, 7 Apr 2011 21:48:28 +0000 (23:48 +0200)
committerHenri Verbeet <hverbeet@gmail.com>
Sun, 10 Apr 2011 16:53:33 +0000 (18:53 +0200)
NOTE: This is a candidate for the 7.10 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
src/mesa/main/buffers.c

index 5c37f3d1a86874d8e85d5fbd86cb0bd039cfec12..96ee1ace728e695f8f572e016e6b6d3b154d379c 100644 (file)
@@ -407,7 +407,6 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
                fb->_ColorDrawBufferIndexes[buf] = bufIndex;
                newState = GL_TRUE;
             }
-            fb->ColorDrawBuffer[buf] = buffers[buf];
             count = buf + 1;
          }
          else {
@@ -416,6 +415,7 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
                newState = GL_TRUE;
             }
          }
+         fb->ColorDrawBuffer[buf] = buffers[buf];
       }
       /* set remaining outputs to -1 (GL_NONE) */
       while (buf < ctx->Const.MaxDrawBuffers) {