From 18a285a5e244b7405b85feb7315a30d99920ec5d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 16 Mar 2002 00:53:15 +0000 Subject: Lots of changes related to framebuffer/window buffer resizing. Basically, instead of passing a GLcontext* to ResizeBuffers(), pass a GLframebuffer*. The idea is that a window can be resized without it being bound to a rendering context. This makes for a nice clean-up in the XFree86 server-side GLX code. Renamed ctx->Driver.ResizeBuffersMESA() to ctx->Driver.ResizeBuffers(). --- src/mesa/drivers/dos/dmesa.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dos') diff --git a/src/mesa/drivers/dos/dmesa.c b/src/mesa/drivers/dos/dmesa.c index 454b891c08..d150cdca5a 100644 --- a/src/mesa/drivers/dos/dmesa.c +++ b/src/mesa/drivers/dos/dmesa.c @@ -540,8 +540,13 @@ static GLboolean set_draw_buffer (GLcontext *ctx, GLenum mode) * If anything special has to been done when the buffer/window is * resized, do it now. */ -static void get_buffer_size (GLcontext *ctx, GLuint *width, GLuint *height) +static void get_buffer_size (GLframebuffer *buffer, GLuint *width, GLuint *height) { + /* XXX this may not be right. We should query the size of the DOS window + * associated with . This function should work whether or + * not there is a current context. + */ + GET_CURRENT_CONTEXT(ctx); DMesaContext c = (DMesaContext)ctx->DriverCtx; *width = c->Buffer->width; @@ -636,7 +641,7 @@ void dmesa_init_pointers (GLcontext *ctx) ctx->Driver.Accum = _swrast_Accum; ctx->Driver.Bitmap = _swrast_Bitmap; ctx->Driver.Clear = clear; - ctx->Driver.ResizeBuffersMESA = _swrast_alloc_buffers; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; ctx->Driver.CopyPixels = _swrast_CopyPixels; ctx->Driver.DrawPixels = _swrast_DrawPixels; ctx->Driver.ReadPixels = _swrast_ReadPixels; -- cgit v1.2.3