summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/ggi
diff options
context:
space:
mode:
authorJon Taylor <taylorj@ggi-project.org>1999-08-27 21:06:30 +0000
committerJon Taylor <taylorj@ggi-project.org>1999-08-27 21:06:30 +0000
commita43cfd71da2fddd6df201f64814d4a8a6d8e7eb9 (patch)
tree3ad9024fd00f51dbe466d56e5391fbde927ab14d /src/mesa/drivers/ggi
parent443dd9fd4dba5a5769a0ead41ab15329a87314dc (diff)
Fixed double buffering bug when running in X
Diffstat (limited to 'src/mesa/drivers/ggi')
-rw-r--r--src/mesa/drivers/ggi/ggimesa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/ggi/ggimesa.c b/src/mesa/drivers/ggi/ggimesa.c
index 5c5fd30172..7983c930c8 100644
--- a/src/mesa/drivers/ggi/ggimesa.c
+++ b/src/mesa/drivers/ggi/ggimesa.c
@@ -373,7 +373,8 @@ int GGIMesaSetVisual(GGIMesaContext ctx, ggi_visual_t vis,
}
/* FIXME: Use separate buffers */
- ctx->lfb[1] = ctx->lfb[0];
+ ctx->lfb[1] = malloc(ctx->stride * ctx->height);
+ ctx->bufsize = (ctx->stride * ctx->height);
ctx->gl_ctx->Visual = ctx->gl_vis;
ctx->gl_ctx->Pixel.ReadBuffer =
@@ -424,13 +425,12 @@ GGIMesaContext GGIMesaGetCurrentContext(void)
*/
void GGIMesaSwapBuffers(void)
{
+ gl_ggiDEBUG("GGIMesaSwapBuffers\n");
FLUSH_VB(GGIMesa->gl_ctx, "swap buffers");
+ gl_ggiFlush(GGIMesa->gl_ctx);
if (GGIMesa->gl_vis->DBflag)
{
- void *buftemp;
- buftemp = GGIMesa->lfb[0];
- GGIMesa->lfb[0] = GGIMesa->lfb[1];
- GGIMesa->lfb[1] = buftemp;
+ memcpy(GGIMesa->lfb[0], GGIMesa->lfb[1], GGIMesa->bufsize);
}
}