grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / mesa / src / aros / mesa3dgl / mesa3dgl_glaswapbuffers.c
blob15c9119699174288d9e0365537ebb2c7ff6f29ba
1 /*
2 Copyright 2009-2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
7 #include <proto/gallium.h>
9 #include <gallium/pipe/p_screen.h>
10 #include <gallium/util/u_inlines.h>
12 #include "mesa3dgl_types.h"
13 #include "mesa3dgl_support.h"
14 #include "mesa3dgl_gallium.h"
17 /*****************************************************************************
19 NAME */
21 void glASwapBuffers(
23 /* SYNOPSIS */
24 GLAContext ctx)
26 /* FUNCTION
27 Swaps the back with front buffers. MUST BE used to display the effect
28 of rendering onto the target RastPort, since GLA always work in
29 double buffer mode.
31 INPUTS
32 ctx - GL rendering context on which swap is to be performed.
34 RESULT
36 BUGS
38 INTERNALS
40 HISTORY
42 *****************************************************************************/
44 struct mesa3dgl_context *_ctx = (struct mesa3dgl_context *)ctx;
46 if (_ctx->framebuffer->render_resource)
48 /* Flush rendering cache before blitting */
49 _ctx->st->flush(_ctx->st, ST_FLUSH_FRONT, NULL);
51 BltPipeResourceRastPort(_ctx->framebuffer->render_resource, 0, 0,
52 _ctx->visible_rp, _ctx->left, _ctx->top,
53 _ctx->framebuffer->width, _ctx->framebuffer->height);
56 MESA3DGLCheckAndUpdateBufferSize(_ctx);