2
* \file miniglx/dispatch.c
4
* \brief C-based dispatch of the OpenGL entry points (glAccum(), glBegin(),
7
* \author Brian Paul <brian@precisioninsight.com>
9
* \note This code IS NOT USED if we're compiling on an x86 system and using
10
* the glapi_x86.S assembly code.
14
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
15
* All Rights Reserved.
17
* Permission is hereby granted, free of charge, to any person obtaining a
18
* copy of this software and associated documentation files (the
19
* "Software"), to deal in the Software without restriction, including
20
* without limitation the rights to use, copy, modify, merge, publish,
21
* distribute, sub license, and/or sell copies of the Software, and to
22
* permit persons to whom the Software is furnished to do so, subject to
23
* the following conditions:
25
* The above copyright notice and this permission notice (including the
26
* next paragraph) shall be included in all copies or substantial portions
29
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
30
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
32
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
33
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
34
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
35
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40
#include "glapitable.h"
43
#if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM))
49
#define NAME(func) gl##func
51
#define DISPATCH(func, args, msg) \
52
const struct _glapi_table *dispatch; \
53
dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
56
#define RETURN_DISPATCH(func, args, msg) \
57
const struct _glapi_table *dispatch; \
58
dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
59
return (dispatch->func) args
62
#include "glapitemp.h"
64
#endif /* USE_X86_ASM */