1 /* $XFree86: xc/lib/GL/glx/dispatch.c,v 1.5 2003/06/30 01:45:10 torrey Exp $ */
2 /**************************************************************************
4 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
7 Permission is hereby granted, free of charge, to any person obtaining a
8 copy of this software and associated documentation files (the
9 "Software"), to deal in the Software without restriction, including
10 without limitation the rights to use, copy, modify, merge, publish,
11 distribute, sub license, and/or sell copies of the Software, and to
12 permit persons to whom the Software is furnished to do so, subject to
13 the following conditions:
15 The above copyright notice and this permission notice (including the
16 next paragraph) shall be included in all copies or substantial portions
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
23 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 **************************************************************************/
31 * Brian Paul <brian@precisioninsight.com>
35 #ifndef GLX_USE_APPLEGL
39 #include "glapitable.h"
43 * NOTE: this file implements C-based dispatch of the OpenGL entrypoints
44 * (glAccum, glBegin, etc).
45 * This code IS NOT USED if we're compiling on an x86 system and using
46 * the glapi_x86.S assembly code.
50 #if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM))
56 #define NAME(func) gl##func
58 #define DISPATCH(func, args, msg) \
59 const struct _glapi_table *dispatch; \
60 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
63 #define RETURN_DISPATCH(func, args, msg) \
64 const struct _glapi_table *dispatch; \
65 dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
66 return (dispatch->func) args
69 #include "glapitemp.h"
71 #endif /* USE_X86_ASM */
73 #endif /* !GLX_USE_APPLEGL */