summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/allegro
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/allegro')
-rw-r--r--src/mesa/drivers/allegro/amesa.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/drivers/allegro/amesa.c b/src/mesa/drivers/allegro/amesa.c
index cb46efa56a..594668affd 100644
--- a/src/mesa/drivers/allegro/amesa.c
+++ b/src/mesa/drivers/allegro/amesa.c
@@ -145,10 +145,20 @@ static void get_buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
}
+/**
+ * We only implement this function as a mechanism to check if the
+ * framebuffer size has changed (and update corresponding state).
+ */
static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
/* poll for window size change and realloc software Z/stencil/etc if needed */
- _mesa_ResizeBuffersMESA();
+ GLuint newWidth, newHeight;
+ GLframebuffer *buffer = ctx->WinSysDrawBuffer;
+ get_buffer_size( &newWidth, &newHeight );
+ if (buffer->Width != newWidth || buffer->Height != newHeight) {
+ _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight );
+ }
+
}