diff options
author | Brian Paul <[email protected]> | 2001-04-26 19:14:35 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-04-26 19:14:35 +0000 |
commit | 11785d441da6c729e89243183b5fcb466c622e8f (patch) | |
tree | 4f8d225ac104a4d90d8d00496ea6287703e2c341 /src | |
parent | 908be619fdba608b057ae512834dcc7a76aa3224 (diff) |
flush pipeline in WMesaSwapBuffers (Frank Warmerdam)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/windows/wmesa.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/windows/wmesa.c b/src/mesa/drivers/windows/wmesa.c index ff256e266ed..581106cb4f8 100644 --- a/src/mesa/drivers/windows/wmesa.c +++ b/src/mesa/drivers/windows/wmesa.c @@ -1,4 +1,4 @@ -/* $Id: wmesa.c,v 1.14 2001/03/03 20:33:29 brianp Exp $ */ +/* $Id: wmesa.c,v 1.15 2001/04/26 19:14:35 brianp Exp $ */ /* * Windows (Win32) device driver for Mesa 3.4 @@ -1368,6 +1368,14 @@ void /*APIENTRY*/ WMesaMakeCurrent( WMesaContext c ) void /*APIENTRY*/ WMesaSwapBuffers( void ) { HDC DC = Current->hDC; + GET_CURRENT_CONTEXT(ctx); + + /* If we're swapping the buffer associated with the current context + * we have to flush any pending rendering commands first. + */ + if (Current && Current->gl_ctx == ctx) + _mesa_swapbuffers(ctx); + if (Current->db_flag) wmFlush(Current); } |