summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_api.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-03-16 00:53:15 +0000
committerBrian Paul <[email protected]>2002-03-16 00:53:15 +0000
commit18a285a5e244b7405b85feb7315a30d99920ec5d (patch)
tree02fbfa95292ef56eef26bb2e8456f65cf1348f18 /src/mesa/drivers/x11/xm_api.c
parent8d687e7e58a148f3f16573636023e54755372010 (diff)
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().
Diffstat (limited to 'src/mesa/drivers/x11/xm_api.c')
-rw-r--r--src/mesa/drivers/x11/xm_api.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index ce5576d68d5..9ee36a45ca0 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1,8 +1,8 @@
-/* $Id: xm_api.c,v 1.34 2002/03/12 21:55:50 brianp Exp $ */
+/* $Id: xm_api.c,v 1.35 2002/03/16 00:53:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 4.0.2
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
@@ -2329,9 +2329,8 @@ void XMesaSwapBuffers( XMesaBuffer b )
/* If we're swapping the buffer associated with the current context
* we have to flush any pending rendering commands first.
*/
- if (ctx && ctx->DrawBuffer == &(b->mesa_buffer)) {
+ if (ctx && ctx->DrawBuffer == &(b->mesa_buffer))
_mesa_swapbuffers(ctx);
- }
if (b->db_state) {
#ifdef FX
@@ -2630,3 +2629,13 @@ unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y,
}
+/*
+ * This is typically called when the window size changes and we need
+ * to reallocate the buffer's back/depth/stencil/accum buffers.
+ */
+void XMesaResizeBuffers( XMesaBuffer b )
+{
+ xmesa_resize_buffers( &(b->mesa_buffer) );
+
+}
+