change gl_buffer_object's Size field to GLsizeiptrARB type
[mesa.git] / src / mesa / main / dispatch.c
1 /*
2 * Mesa 3-D graphics library
3 * Version: 6.3
4 *
5 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26 /*
27 * This file generates all the gl* function entrypoints.
28 * But if we're using X86-optimized dispatch (X86/glapi_x86.S) then
29 * we don't use this code.
30 *
31 * NOTE: This file should _not_ be used when compiling Mesa for a DRI-
32 * based device driver.
33 *
34 */
35
36
37 #include "glheader.h"
38 #include "glapi.h"
39 #include "glapitable.h"
40 #include "glthread.h"
41
42
43 #if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM))
44
45 #if defined(WIN32)
46 #define KEYWORD1 GLAPI
47 #else
48 #define KEYWORD1 PUBLIC
49 #endif
50
51 #define KEYWORD2 GLAPIENTRY
52
53 #if defined(USE_MGL_NAMESPACE)
54 #define NAME(func) mgl##func
55 #else
56 #define NAME(func) gl##func
57 #endif
58
59 #if 0 /* Use this to log GL calls to stdout (for DEBUG only!) */
60
61 #define F stdout
62 #define DISPATCH(FUNC, ARGS, MESSAGE) \
63 fprintf MESSAGE; \
64 GL_CALL(FUNC) ARGS;
65
66 #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
67 fprintf MESSAGE; \
68 return GL_CALL(FUNC) ARGS;
69
70 #else
71
72 #define DISPATCH(FUNC, ARGS, MESSAGE) \
73 GL_CALL(FUNC) ARGS;
74
75 #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
76 return GL_CALL(FUNC) ARGS;
77
78 #endif /* logging */
79
80
81 #ifndef GLAPIENTRY
82 #define GLAPIENTRY
83 #endif
84
85 #include "glapitemp.h"
86
87
88 #endif /* USE_X86_ASM */