}
/* 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 =
*/
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);
}
}