2 * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
3 * Copyright 2000-2015 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>
13 #include "glapi/glapi.h"
14 #include "glapi/glapi_priv.h"
19 * NOTE: this file portion implements C-based dispatch of the OpenGL entrypoints
20 * (glAccum, glBegin, etc).
21 * This code IS NOT USED if we're compiling on an x86 system and using
22 * the glapi_x86.S assembly code.
24 #if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM))
26 #define KEYWORD1 PUBLIC
28 #define NAME(func) gl##func
30 #define DISPATCH(func, args, msg) \
31 const struct _glapi_table* dispatch; \
32 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
35 #define RETURN_DISPATCH(func, args, msg) \
36 const struct _glapi_table* dispatch; \
37 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
38 return (dispatch->func) args
44 /* NOTE: this file portion implement a thin OpenGL entrypoints dispatching
48 #include "GLDispatcher.h"
50 BGLDispatcher::BGLDispatcher()
55 BGLDispatcher::~BGLDispatcher()
61 BGLDispatcher::SetTable(struct _glapi_table
* table
)
63 _glapi_set_dispatch(table
);