2 Copyright 2011-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/utility.h>
10 #include <proto/graphics.h>
11 #include <aros/debug.h>
13 void AROSMesaSetRast(AROSMesaContext amesa
, struct TagItem
* tagList
);
15 /*****************************************************************************
19 AROS_LH2(void, AROSMesaSetRast
,
22 AROS_LHA(AROSMesaContext
, amesa
, A0
),
23 AROS_LHA(struct TagItem
*, tagList
, A1
),
26 struct Library
*, MesaBase
, 12, Mesa
)
30 Sets a new rendering target for an existing context
34 tagList - a pointer to tags to be used during creation.
38 AMA_Window - pointer to Window onto which scene is to be rendered. Must
51 *****************************************************************************/
55 AROSMesaSetRast(amesa
, tagList
);
60 void AROSMesaSetRast(AROSMesaContext amesa
, struct TagItem
* tagList
)
64 /* Check if at least one of window, rastport or screen have been passed */
65 if ((GetTagData(AMA_Screen
, 0, tagList
) != 0) ||
66 (GetTagData(AMA_Window
, 0, tagList
) != 0) ||
67 (GetTagData(AMA_RastPort
, 0, tagList
) != 0))
69 /* If there already is visible_rp, free it */
70 if (amesa
->visible_rp
)
71 FreeRastPort(amesa
->visible_rp
);
72 /* Do standard rast port selection */
73 AROSMesaSelectRastPort(amesa
, tagList
);
75 /* Do standard initialization */
76 AROSMesaStandardInit(amesa
, tagList
);
78 /* TODO: what to do with visual and framebuffer, if BPP changes, we are in trouble */
80 /* After the new render target has been attached, invoke framebuffer recalculation */
81 AROSMesaCheckAndUpdateBufferSize(amesa
);