diff options
author | Brian Paul <[email protected]> | 2002-04-04 00:54:02 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-04-04 00:54:02 +0000 |
commit | 02ee456248c75cfee324164ec6fd81a3b77ec2bf (patch) | |
tree | c352edafbd154df4c12a898da9a12f6cb60e1eb4 | |
parent | db30cc8d0011b3668d2ff371675796a10da80ae2 (diff) |
call _mesa_ResizeBuffersMESA() in OSMesaMakeCurrent() to reconcile buffer size changes
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 258f367a7f7..b7b667dd739 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.76 2002/03/29 17:20:48 brianp Exp $ */ +/* $Id: osmesa.c,v 1.77 2002/04/04 00:54:02 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -37,6 +37,7 @@ #include "glheader.h" #include "GL/osmesa.h" +#include "buffers.h" #include "context.h" #include "colormac.h" #include "depth.h" @@ -473,12 +474,16 @@ OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type, compute_row_addresses( ctx ); /* init viewport */ - if (ctx->gl_ctx.Viewport.Width==0) { + if (ctx->gl_ctx.Viewport.Width == 0) { /* initialize viewport and scissor box to buffer size */ _mesa_Viewport( 0, 0, width, height ); ctx->gl_ctx.Scissor.Width = width; ctx->gl_ctx.Scissor.Height = height; } + else { + /* this will make ensure we recognize the new buffer size */ + _mesa_ResizeBuffersMESA(); + } return GL_TRUE; } |