/** * Swap front and back color buffers and have winsys display front buffer. * If there's no front color buffer no swap actually occurs. */ PUBLIC void XMesaSwapBuffers( XMesaBuffer b ) { XMesaContext xmctx = XMesaGetCurrentContext(); if (xmctx && xmctx->xm_buffer == b) { xmctx->st->flush( xmctx->st, ST_FLUSH_FRONT, NULL); } xmesa_swap_st_framebuffer(b->stfb); }
/** * Swap front and back color buffers and have winsys display front buffer. * If there's no front color buffer no swap actually occurs. */ PUBLIC void XMesaSwapBuffers( XMesaBuffer b ) { XMesaContext xmctx = XMesaGetCurrentContext(); if (xmctx && xmctx->xm_buffer == b) { xmctx->st->flush( xmctx->st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_SWAPBUFFERS | PIPE_FLUSH_FRAME, NULL); } xmesa_swap_st_framebuffer(b->stfb); }
/** * Swap front and back color buffers and have winsys display front buffer. * If there's no front color buffer no swap actually occurs. */ PUBLIC void XMesaSwapBuffers( XMesaBuffer b ) { XMesaContext xmctx = XMesaGetCurrentContext(); /* Need to draw HUD before flushing */ if (xmctx && xmctx->hud) { struct pipe_resource *back = xmesa_get_framebuffer_resource(b->stfb, ST_ATTACHMENT_BACK_LEFT); hud_draw(xmctx->hud, back); } if (xmctx && xmctx->xm_buffer == b) { xmctx->st->flush( xmctx->st, ST_FLUSH_FRONT, NULL); } xmesa_swap_st_framebuffer(b->stfb); }