diff options
| author | Keith Whitwell <keith@tungstengraphics.com> | 2006-09-22 11:36:30 +0000 | 
|---|---|---|
| committer | Keith Whitwell <keith@tungstengraphics.com> | 2006-09-22 11:36:30 +0000 | 
| commit | f9bfdb1ce47380a23218a8253ac1dde923ee13fc (patch) | |
| tree | dbd359299c1e111d26a7b4bcdf1624bbfc47f63c | |
| parent | f118b9b40d5928c36fba9759e508d8f84fc2909d (diff) | |
resize buffers in MakeCurrent
| -rw-r--r-- | src/mesa/main/buffers.c | 14 | ||||
| -rw-r--r-- | src/mesa/main/buffers.h | 2 | ||||
| -rw-r--r-- | src/mesa/main/context.c | 2 | 
3 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 6f4a51e107..3031c6c9f0 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -591,11 +591,9 @@ _mesa_ReadBuffer(GLenum buffer)   * \note This function should only be called through the GL API, not   * from device drivers (as was done in the past).   */ -void GLAPIENTRY -_mesa_ResizeBuffersMESA( void ) -{ -   GET_CURRENT_CONTEXT(ctx); +void _mesa_resizebuffers( GLcontext *ctx ) +{     ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );     if (MESA_VERBOSE & VERBOSE_API) @@ -637,6 +635,14 @@ _mesa_ResizeBuffersMESA( void )     ctx->NewState |= _NEW_BUFFERS;  /* to update scissor / window bounds */  } +void GLAPIENTRY +_mesa_ResizeBuffersMESA( void ) +{ +   GET_CURRENT_CONTEXT(ctx); + +   _mesa_resizebuffers( ctx ); +} +  /*   * XXX move somewhere else someday? diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index b61bdad433..fcc2152342 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -78,4 +78,6 @@ extern void  _mesa_set_scissor(GLcontext *ctx,                     GLint x, GLint y, GLsizei width, GLsizei height); +extern void _mesa_resizebuffers( GLcontext *ctx ); +  #endif diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index afe6048c80..f78a8cedf1 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1713,6 +1713,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,           if (readBuffer != drawBuffer && !readBuffer->Initialized) {              initialize_framebuffer_size(newCtx, readBuffer);           } + +	 _mesa_resizebuffers(newCtx);  #endif           if (newCtx->FirstTimeCurrent) {              /* set initial viewport and scissor size now */  | 
