fix bug when pushing ReadBuffer state for GL_PIXEL_MODE_BIT
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 4 Aug 2006 13:41:25 +0000 (13:41 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 4 Aug 2006 13:41:25 +0000 (13:41 +0000)
src/mesa/main/attrib.c

index 1f292de3c7a9c573abb269630c984250570e735c..ef970ad9eb6f35c896df9975f03c79e1d71f51b5 100644 (file)
@@ -276,6 +276,8 @@ _mesa_PushAttrib(GLbitfield mask)
       struct gl_pixel_attrib *attr;
       attr = MALLOC_STRUCT( gl_pixel_attrib );
       MEMCPY( attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib) );
+      /* push the Read FBO's ReadBuffer state, not ctx->Pixel.ReadBuffer */
+      attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer;
       newnode = new_attrib_node( GL_PIXEL_MODE_BIT );
       newnode->data = attr;
       newnode->next = head;