2 Copyright 2009-2014, The AROS Development Team. All rights reserved.
6 #include "arosmesa_funcs.h"
7 #include "arosmesa_funcs_gallium.h"
8 #include <proto/exec.h>
9 #include <proto/gallium.h>
10 #include <gallium/pipe/p_screen.h>
11 #include <gallium/util/u_inlines.h>
13 void AROSMesaSwapBuffers(AROSMesaContext amesa
);
15 /*****************************************************************************
19 AROS_LH1(void, AROSMesaSwapBuffers
,
22 AROS_LHA(AROSMesaContext
, amesa
, A0
),
25 struct Library
*, MesaBase
, 9, Mesa
)
28 Swaps the back with front buffers. MUST BE used to display the effect
29 of rendering onto the target RastPort, since AROSMesa always work in
33 amesa - GL rendering context on which swap is to be performed.
43 *****************************************************************************/
47 AROSMesaSwapBuffers(amesa
);
52 void AROSMesaSwapBuffers(AROSMesaContext amesa
)
54 if (amesa
->framebuffer
->render_resource
)
56 /* Flush rendering cache before blitting */
57 amesa
->st
->flush(amesa
->st
, ST_FLUSH_FRONT
, NULL
);
59 BltPipeResourceRastPort(amesa
->framebuffer
->render_resource
, 0, 0,
60 amesa
->visible_rp
, amesa
->left
, amesa
->top
,
61 amesa
->framebuffer
->width
, amesa
->framebuffer
->height
);
64 AROSMesaCheckAndUpdateBufferSize(amesa
);