add place-holder directory for the a3000 wd533c93 scsi controller implementation.
[AROS.git] / workbench / libs / mesa / mesa3dgl_glamakecurrent.c
blobb432e8a90e8aa889b73ce6cd0fa624667b7c52a7
1 /*
2 Copyright © 2009-2019, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
8 #include <proto/exec.h>
10 #include "mesa3dgl_types.h"
11 #include "mesa3dgl_support.h"
13 /*****************************************************************************
15 NAME */
17 void glAMakeCurrent(
19 /* SYNOPSIS */
20 GLAContext ctx)
22 /* FUNCTION
23 Make the selected GL rendering context active.
25 INPUTS
26 ctx - GL rendering context to be made active for all following GL
27 calls.
29 RESULT
31 BUGS
33 INTERNALS
35 HISTORY
37 *****************************************************************************/
39 struct mesa3dgl_context *_ctx = (struct mesa3dgl_context *)ctx;
41 D(bug("[MESA3DGL] %s()\n", __func__));
43 if (_ctx)
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));
54 /* Attach */
55 glstapi->make_current(glstapi, _ctx->st,
56 &_ctx->framebuffer->base, &_ctx->framebuffer->base);
59 else
61 /* Detach */
62 glstapi->make_current(glstapi, NULL, NULL, NULL);
64 D(bug("[MESA3DGL] %s: done\n", __func__));