2 Copyright 2011-2015, The AROS Development Team. All rights reserved.
7 #include <aros/debug.h>
9 #include <proto/exec.h>
10 #include <proto/utility.h>
11 #include <proto/graphics.h>
13 #include "mesa3dgl_support.h"
14 #include "mesa3dgl_gallium.h"
16 /*****************************************************************************
24 struct TagItem
* tagList
)
28 Sets a new rendering target for an existing context
33 tagList - a pointer to tags to be used during creation.
37 GLA_Window - pointer to Window onto which scene is to be rendered. Must
50 *****************************************************************************/
52 struct mesa3dgl_context
* _ctx
= (struct mesa3dgl_context
*)ctx
;
56 /* Check if at least one of window, rastport or screen have been passed */
57 if ((GetTagData(GLA_Screen
, 0, tagList
) != 0) ||
58 (GetTagData(GLA_Window
, 0, tagList
) != 0) ||
59 (GetTagData(GLA_RastPort
, 0, tagList
) != 0))
61 /* If there already is visible_rp, free it */
63 FreeRastPort(_ctx
->visible_rp
);
64 /* Do standard rast port selection */
65 MESA3DGLSelectRastPort(_ctx
, tagList
);
67 /* Do standard initialization */
68 MESA3DGLStandardInit(_ctx
, tagList
);
70 /* TODO: what to do with visual and framebuffer, if BPP changes, we are in trouble */
72 /* After the new render target has been attached, invoke framebuffer recalculation */
73 MESA3DGLCheckAndUpdateBufferSize(_ctx
);