2 * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
3 * Copyright 2000-2012 Haiku, Inc. All Rights Reserved.
4 * Distributed under the terms of the MIT License.
7 * Brian Paul <brian.e.paul@gmail.com>
8 * Philippe Houdoin <philippe.houdoin@free.fr>
9 * Alexander von Gluck IV <kallisti5@unixzen.com>
14 #include "glapi/glapi.h"
15 #include "glapi/glapi_priv.h"
18 * NOTE: this file portion implements C-based dispatch of the OpenGL entrypoints
19 * (glAccum, glBegin, etc).
20 * This code IS NOT USED if we're compiling on an x86 system and using
21 * the glapi_x86.S assembly code.
23 #if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM))
25 #define KEYWORD1 PUBLIC
27 #define NAME(func) gl##func
29 #define DISPATCH(func, args, msg) \
30 const struct _glapi_table* dispatch; \
31 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
34 #define RETURN_DISPATCH(func, args, msg) \
35 const struct _glapi_table* dispatch; \
36 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
37 return (dispatch->func) args
43 /* NOTE: this file portion implement a thin OpenGL entrypoints dispatching
47 #include "GLDispatcher.h"
49 BGLDispatcher::BGLDispatcher()
54 BGLDispatcher::~BGLDispatcher()
60 BGLDispatcher::CheckTable(const struct _glapi_table
* table
)
62 _glapi_check_table(table
? table
: _glapi_get_dispatch());
68 BGLDispatcher::SetTable(struct _glapi_table
* table
)
70 _glapi_set_dispatch(table
);