summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2008-05-01 14:54:56 +0100
committerAlan Hourihane <[email protected]>2008-05-01 14:56:11 +0100
commite97bedb302701e2e50cef664690b83a1fe6c95ed (patch)
tree99e83fb774bc101f7834ce6bb338d82b7f333dbe /src/mesa/main/context.c
parent073bb94a4150d7b3c78ea5420383cb7ed8f97566 (diff)
Fix build problem with MSVC
Diffstat (limited to 'src/mesa/main/context.c')
-rwxr-xr-x[-rw-r--r--]src/mesa/main/context.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index d06644f65dd..7b8d9341701 100644..100755
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1504,15 +1504,19 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
* or not bound to a user-created FBO.
*/
if (!newCtx->DrawBuffer || newCtx->DrawBuffer->Name == 0) {
- _mesa_reference_framebuffer(&newCtx->DrawBuffer, drawBuffer);
/* fix up the fb fields - these will end up wrong otherwise
- if the DRIdrawable changes, and everything relies on them.
- This is a bit messy (same as needed in _mesa_BindFramebufferEXT) */
+ * if the DRIdrawable changes, and everything relies on them.
+ * This is a bit messy (same as needed in _mesa_BindFramebufferEXT)
+ */
int i;
GLenum buffers[MAX_DRAW_BUFFERS];
+
+ _mesa_reference_framebuffer(&newCtx->DrawBuffer, drawBuffer);
+
for(i = 0; i < newCtx->Const.MaxDrawBuffers; i++) {
buffers[i] = newCtx->Color.DrawBuffer[i];
}
+
_mesa_drawbuffers(newCtx, newCtx->Const.MaxDrawBuffers, buffers, NULL);
}
if (!newCtx->ReadBuffer || newCtx->ReadBuffer->Name == 0) {