2 Copyright © 2011-2019, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
8 #include <proto/exec.h>
9 #include <proto/utility.h>
10 #include <proto/graphics.h>
12 #include "mesa3dgl_support.h"
13 #include "mesa3dgl_gallium.h"
15 /*****************************************************************************
23 struct TagItem
* tagList
)
27 Sets a new rendering target for an existing context
32 tagList - a pointer to tags to be used during creation.
36 GLA_Window - pointer to Window onto which scene is to be rendered. Must
49 *****************************************************************************/
51 struct mesa3dgl_context
* _ctx
= (struct mesa3dgl_context
*)ctx
;
53 D(bug("[MESA3DGL] %s()\n", __func__
));
57 /* Check if at least one of window, rastport or screen have been passed */
58 if ((GetTagData(GLA_Screen
, 0, tagList
) != 0) ||
59 (GetTagData(GLA_Window
, 0, tagList
) != 0) ||
60 (GetTagData(GLA_RastPort
, 0, tagList
) != 0))
62 /* If there already is visible_rp, free it */
64 FreeRastPort(_ctx
->visible_rp
);
65 /* Do standard rast port selection */
66 MESA3DGLSelectRastPort(_ctx
, tagList
);
68 /* Do standard initialization */
69 MESA3DGLStandardInit(_ctx
, tagList
);
71 /* TODO: what to do with visual and framebuffer, if BPP changes, we are in trouble */
73 /* After the new render target has been attached, invoke framebuffer recalculation */
74 MESA3DGLCheckAndUpdateBufferSize(_ctx
);