From f0da327c878057d120d98e15b47a45dbf36fce73 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Sep 2005 23:21:40 +0000 Subject: minor tweaks to _mesa_ResizeBuffersMESA() --- src/mesa/main/buffers.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/mesa/main/buffers.c') diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index e930531bf1..afdefccba4 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -593,9 +593,11 @@ _mesa_ResizeBuffersMESA( void ) if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glResizeBuffersMESA\n"); - if (ctx->DrawBuffer && ctx->DrawBuffer->Name == 0) { + if (ctx->WinSysDrawBuffer) { GLuint newWidth, newHeight; - GLframebuffer *buffer = ctx->DrawBuffer; + GLframebuffer *buffer = ctx->WinSysDrawBuffer; + + assert(buffer->Name == 0); /* ask device driver for size of output buffer */ ctx->Driver.GetBufferSize( buffer, &newWidth, &newHeight ); @@ -607,10 +609,12 @@ _mesa_ResizeBuffersMESA( void ) } } - if (ctx->ReadBuffer && ctx->ReadBuffer != ctx->DrawBuffer - && ctx->ReadBuffer->Name == 0) { + if (ctx->WinSysReadBuffer + && ctx->WinSysReadBuffer != ctx->WinSysDrawBuffer) { GLuint newWidth, newHeight; - GLframebuffer *buffer = ctx->ReadBuffer; + GLframebuffer *buffer = ctx->WinSysReadBuffer; + + assert(buffer->Name == 0); /* ask device driver for size of read buffer */ ctx->Driver.GetBufferSize( buffer, &newWidth, &newHeight ); -- cgit v1.2.3