2 Copyright © 2009-2019, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
8 #include <proto/exec.h>
10 #include "mesa3dgl_types.h"
11 #include "mesa3dgl_support.h"
13 /*****************************************************************************
23 Make the selected GL rendering context active.
26 ctx - GL rendering context to be made active for all following GL
37 *****************************************************************************/
39 struct mesa3dgl_context
*_ctx
= (struct mesa3dgl_context
*)ctx
;
41 D(bug("[MESA3DGL] %s()\n", __func__
));
45 struct st_context_iface
* cur_ctx
= glstapi
->get_current(glstapi
);
47 if (_ctx
->st
!= cur_ctx
)
49 /* Recalculate buffer dimensions */
50 MESA3DGLRecalculateBufferWidthHeight(_ctx
);
52 D(bug("[MESA3DGL] %s: calling glstapi @ 0x%p -> make_current @ 0x%p\n", __func__
, glstapi
, glstapi
->make_current
));
53 D(bug("[MESA3DGL] %s: _ctx->framebuffer @ 0x%p base @ 0x%p\n", __func__
, _ctx
->framebuffer
, &_ctx
->framebuffer
->base
));
55 glstapi
->make_current(glstapi
, _ctx
->st
,
56 &_ctx
->framebuffer
->base
, &_ctx
->framebuffer
->base
);
62 glstapi
->make_current(glstapi
, NULL
, NULL
, NULL
);
64 D(bug("[MESA3DGL] %s: done\n", __func__
));