2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
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:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
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.
29 #define PRE_LOOPBACK( FUNC )
32 #include "glapi/dispatch.h"
33 #include "glapi/glapioffsets.h"
35 static void GLAPIENTRY
TAG(ArrayElement
)( GLint i
)
37 PRE_LOOPBACK( ArrayElement
);
38 CALL_ArrayElement(GET_DISPATCH(), ( i
));
41 static void GLAPIENTRY
TAG(Color3f
)( GLfloat r
, GLfloat g
, GLfloat b
)
43 PRE_LOOPBACK( Color3f
);
44 CALL_Color3f(GET_DISPATCH(), ( r
, g
, b
));
47 static void GLAPIENTRY
TAG(Color3fv
)( const GLfloat
*v
)
49 PRE_LOOPBACK( Color3fv
);
50 CALL_Color3fv(GET_DISPATCH(), ( v
));
53 static void GLAPIENTRY
TAG(Color4f
)( GLfloat r
, GLfloat g
, GLfloat b
, GLfloat a
)
55 PRE_LOOPBACK( Color4f
);
56 CALL_Color4f(GET_DISPATCH(), ( r
, g
, b
, a
));
59 static void GLAPIENTRY
TAG(Color4fv
)( const GLfloat
*v
)
61 PRE_LOOPBACK( Color4fv
);
62 CALL_Color4fv(GET_DISPATCH(), ( v
));
65 static void GLAPIENTRY
TAG(EdgeFlag
)( GLboolean e
)
67 PRE_LOOPBACK( EdgeFlag
);
68 CALL_EdgeFlag(GET_DISPATCH(), ( e
));
71 static void GLAPIENTRY
TAG(EvalCoord1f
)( GLfloat s
)
73 PRE_LOOPBACK( EvalCoord1f
);
74 CALL_EvalCoord1f(GET_DISPATCH(), ( s
));
77 static void GLAPIENTRY
TAG(EvalCoord1fv
)( const GLfloat
*v
)
79 PRE_LOOPBACK( EvalCoord1fv
);
80 CALL_EvalCoord1fv(GET_DISPATCH(), ( v
));
83 static void GLAPIENTRY
TAG(EvalCoord2f
)( GLfloat s
, GLfloat t
)
85 PRE_LOOPBACK( EvalCoord2f
);
86 CALL_EvalCoord2f(GET_DISPATCH(), ( s
, t
));
89 static void GLAPIENTRY
TAG(EvalCoord2fv
)( const GLfloat
*v
)
91 PRE_LOOPBACK( EvalCoord2fv
);
92 CALL_EvalCoord2fv(GET_DISPATCH(), ( v
));
95 static void GLAPIENTRY
TAG(EvalPoint1
)( GLint i
)
97 PRE_LOOPBACK( EvalPoint1
);
98 CALL_EvalPoint1(GET_DISPATCH(), ( i
));
101 static void GLAPIENTRY
TAG(EvalPoint2
)( GLint i
, GLint j
)
103 PRE_LOOPBACK( EvalPoint2
);
104 CALL_EvalPoint2(GET_DISPATCH(), ( i
, j
));
107 static void GLAPIENTRY
TAG(FogCoordfEXT
)( GLfloat f
)
109 PRE_LOOPBACK( FogCoordfEXT
);
110 CALL_FogCoordfEXT(GET_DISPATCH(), ( f
));
113 static void GLAPIENTRY
TAG(FogCoordfvEXT
)( const GLfloat
*v
)
115 PRE_LOOPBACK( FogCoordfvEXT
);
116 CALL_FogCoordfvEXT(GET_DISPATCH(), ( v
));
119 static void GLAPIENTRY
TAG(Indexf
)( GLfloat f
)
121 PRE_LOOPBACK( Indexf
);
122 CALL_Indexf(GET_DISPATCH(), ( f
));
125 static void GLAPIENTRY
TAG(Indexfv
)( const GLfloat
*v
)
127 PRE_LOOPBACK( Indexfv
);
128 CALL_Indexfv(GET_DISPATCH(), ( v
));
131 static void GLAPIENTRY
TAG(Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
*v
)
133 PRE_LOOPBACK( Materialfv
);
134 CALL_Materialfv(GET_DISPATCH(), ( face
, pname
, v
));
137 static void GLAPIENTRY
TAG(MultiTexCoord1fARB
)( GLenum target
, GLfloat a
)
139 PRE_LOOPBACK( MultiTexCoord1fARB
);
140 CALL_MultiTexCoord1fARB(GET_DISPATCH(), ( target
, a
));
143 static void GLAPIENTRY
TAG(MultiTexCoord1fvARB
)( GLenum target
, const GLfloat
*tc
)
145 PRE_LOOPBACK( MultiTexCoord1fvARB
);
146 CALL_MultiTexCoord1fvARB(GET_DISPATCH(), ( target
, tc
));
149 static void GLAPIENTRY
TAG(MultiTexCoord2fARB
)( GLenum target
, GLfloat s
, GLfloat t
)
151 PRE_LOOPBACK( MultiTexCoord2fARB
);
152 CALL_MultiTexCoord2fARB(GET_DISPATCH(), ( target
, s
, t
));
155 static void GLAPIENTRY
TAG(MultiTexCoord2fvARB
)( GLenum target
, const GLfloat
*tc
)
157 PRE_LOOPBACK( MultiTexCoord2fvARB
);
158 CALL_MultiTexCoord2fvARB(GET_DISPATCH(), ( target
, tc
));
161 static void GLAPIENTRY
TAG(MultiTexCoord3fARB
)( GLenum target
, GLfloat s
,
162 GLfloat t
, GLfloat r
)
164 PRE_LOOPBACK( MultiTexCoord3fARB
);
165 CALL_MultiTexCoord3fARB(GET_DISPATCH(), ( target
, s
, t
, r
));
168 static void GLAPIENTRY
TAG(MultiTexCoord3fvARB
)( GLenum target
, const GLfloat
*tc
)
170 PRE_LOOPBACK( MultiTexCoord3fvARB
);
171 CALL_MultiTexCoord3fvARB(GET_DISPATCH(), ( target
, tc
));
174 static void GLAPIENTRY
TAG(MultiTexCoord4fARB
)( GLenum target
, GLfloat s
,
175 GLfloat t
, GLfloat r
, GLfloat q
)
177 PRE_LOOPBACK( MultiTexCoord4fARB
);
178 CALL_MultiTexCoord4fARB(GET_DISPATCH(), ( target
, s
, t
, r
, q
));
181 static void GLAPIENTRY
TAG(MultiTexCoord4fvARB
)( GLenum target
, const GLfloat
*tc
)
183 PRE_LOOPBACK( MultiTexCoord4fvARB
);
184 CALL_MultiTexCoord4fvARB(GET_DISPATCH(), ( target
, tc
));
187 static void GLAPIENTRY
TAG(Normal3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
189 PRE_LOOPBACK( Normal3f
);
190 CALL_Normal3f(GET_DISPATCH(), ( x
, y
, z
));
193 static void GLAPIENTRY
TAG(Normal3fv
)( const GLfloat
*v
)
195 PRE_LOOPBACK( Normal3fv
);
196 CALL_Normal3fv(GET_DISPATCH(), ( v
));
199 static void GLAPIENTRY
TAG(SecondaryColor3fEXT
)( GLfloat r
, GLfloat g
, GLfloat b
)
201 PRE_LOOPBACK( SecondaryColor3fEXT
);
202 CALL_SecondaryColor3fEXT(GET_DISPATCH(), ( r
, g
, b
));
205 static void GLAPIENTRY
TAG(SecondaryColor3fvEXT
)( const GLfloat
*v
)
207 PRE_LOOPBACK( SecondaryColor3fvEXT
);
208 CALL_SecondaryColor3fvEXT(GET_DISPATCH(), ( v
));
211 static void GLAPIENTRY
TAG(TexCoord1f
)( GLfloat s
)
213 PRE_LOOPBACK( TexCoord1f
);
214 CALL_TexCoord1f(GET_DISPATCH(), ( s
));
217 static void GLAPIENTRY
TAG(TexCoord1fv
)( const GLfloat
*tc
)
219 PRE_LOOPBACK( TexCoord1fv
);
220 CALL_TexCoord1fv(GET_DISPATCH(), ( tc
));
223 static void GLAPIENTRY
TAG(TexCoord2f
)( GLfloat s
, GLfloat t
)
225 PRE_LOOPBACK( TexCoord2f
);
226 CALL_TexCoord2f(GET_DISPATCH(), ( s
, t
));
229 static void GLAPIENTRY
TAG(TexCoord2fv
)( const GLfloat
*tc
)
231 PRE_LOOPBACK( TexCoord2fv
);
232 CALL_TexCoord2fv(GET_DISPATCH(), ( tc
));
235 static void GLAPIENTRY
TAG(TexCoord3f
)( GLfloat s
, GLfloat t
, GLfloat r
)
237 PRE_LOOPBACK( TexCoord3f
);
238 CALL_TexCoord3f(GET_DISPATCH(), ( s
, t
, r
));
241 static void GLAPIENTRY
TAG(TexCoord3fv
)( const GLfloat
*tc
)
243 PRE_LOOPBACK( TexCoord3fv
);
244 CALL_TexCoord3fv(GET_DISPATCH(), ( tc
));
247 static void GLAPIENTRY
TAG(TexCoord4f
)( GLfloat s
, GLfloat t
, GLfloat r
, GLfloat q
)
249 PRE_LOOPBACK( TexCoord4f
);
250 CALL_TexCoord4f(GET_DISPATCH(), ( s
, t
, r
, q
));
253 static void GLAPIENTRY
TAG(TexCoord4fv
)( const GLfloat
*tc
)
255 PRE_LOOPBACK( TexCoord4fv
);
256 CALL_TexCoord4fv(GET_DISPATCH(), ( tc
));
259 static void GLAPIENTRY
TAG(Vertex2f
)( GLfloat x
, GLfloat y
)
261 PRE_LOOPBACK( Vertex2f
);
262 CALL_Vertex2f(GET_DISPATCH(), ( x
, y
));
265 static void GLAPIENTRY
TAG(Vertex2fv
)( const GLfloat
*v
)
267 PRE_LOOPBACK( Vertex2fv
);
268 CALL_Vertex2fv(GET_DISPATCH(), ( v
));
271 static void GLAPIENTRY
TAG(Vertex3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
273 PRE_LOOPBACK( Vertex3f
);
274 CALL_Vertex3f(GET_DISPATCH(), ( x
, y
, z
));
277 static void GLAPIENTRY
TAG(Vertex3fv
)( const GLfloat
*v
)
279 PRE_LOOPBACK( Vertex3fv
);
280 CALL_Vertex3fv(GET_DISPATCH(), ( v
));
283 static void GLAPIENTRY
TAG(Vertex4f
)( GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
285 PRE_LOOPBACK( Vertex4f
);
286 CALL_Vertex4f(GET_DISPATCH(), ( x
, y
, z
, w
));
289 static void GLAPIENTRY
TAG(Vertex4fv
)( const GLfloat
*v
)
291 PRE_LOOPBACK( Vertex4fv
);
292 CALL_Vertex4fv(GET_DISPATCH(), ( v
));
295 static void GLAPIENTRY
TAG(CallList
)( GLuint i
)
297 PRE_LOOPBACK( CallList
);
298 CALL_CallList(GET_DISPATCH(), ( i
));
301 static void GLAPIENTRY
TAG(CallLists
)( GLsizei sz
, GLenum type
, const GLvoid
*v
)
303 PRE_LOOPBACK( CallLists
);
304 CALL_CallLists(GET_DISPATCH(), ( sz
, type
, v
));
307 static void GLAPIENTRY
TAG(Begin
)( GLenum mode
)
309 PRE_LOOPBACK( Begin
);
310 CALL_Begin(GET_DISPATCH(), ( mode
));
313 static void GLAPIENTRY
TAG(End
)( void )
316 CALL_End(GET_DISPATCH(), ());
319 static void GLAPIENTRY
TAG(Rectf
)( GLfloat x1
, GLfloat y1
, GLfloat x2
, GLfloat y2
)
321 PRE_LOOPBACK( Rectf
);
322 CALL_Rectf(GET_DISPATCH(), ( x1
, y1
, x2
, y2
));
325 static void GLAPIENTRY
TAG(DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
)
327 PRE_LOOPBACK( DrawArrays
);
328 CALL_DrawArrays(GET_DISPATCH(), ( mode
, start
, count
));
331 static void GLAPIENTRY
TAG(DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
332 const GLvoid
*indices
)
334 PRE_LOOPBACK( DrawElements
);
335 CALL_DrawElements(GET_DISPATCH(), ( mode
, count
, type
, indices
));
338 static void GLAPIENTRY
TAG(DrawRangeElements
)( GLenum mode
, GLuint start
,
339 GLuint end
, GLsizei count
,
340 GLenum type
, const GLvoid
*indices
)
342 PRE_LOOPBACK( DrawRangeElements
);
343 CALL_DrawRangeElements(GET_DISPATCH(), ( mode
, start
, end
, count
, type
, indices
));
346 static void GLAPIENTRY
TAG(EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
)
348 PRE_LOOPBACK( EvalMesh1
);
349 CALL_EvalMesh1(GET_DISPATCH(), ( mode
, i1
, i2
));
352 static void GLAPIENTRY
TAG(EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
,
355 PRE_LOOPBACK( EvalMesh2
);
356 CALL_EvalMesh2(GET_DISPATCH(), ( mode
, i1
, i2
, j1
, j2
));
359 static void GLAPIENTRY
TAG(VertexAttrib1fNV
)( GLuint index
, GLfloat x
)
361 PRE_LOOPBACK( VertexAttrib1fNV
);
362 CALL_VertexAttrib1fNV(GET_DISPATCH(), ( index
, x
));
365 static void GLAPIENTRY
TAG(VertexAttrib1fvNV
)( GLuint index
, const GLfloat
*v
)
367 PRE_LOOPBACK( VertexAttrib1fvNV
);
368 CALL_VertexAttrib1fvNV(GET_DISPATCH(), ( index
, v
));
371 static void GLAPIENTRY
TAG(VertexAttrib2fNV
)( GLuint index
, GLfloat x
, GLfloat y
)
373 PRE_LOOPBACK( VertexAttrib2fNV
);
374 CALL_VertexAttrib2fNV(GET_DISPATCH(), ( index
, x
, y
));
377 static void GLAPIENTRY
TAG(VertexAttrib2fvNV
)( GLuint index
, const GLfloat
*v
)
379 PRE_LOOPBACK( VertexAttrib2fvNV
);
380 CALL_VertexAttrib2fvNV(GET_DISPATCH(), ( index
, v
));
383 static void GLAPIENTRY
TAG(VertexAttrib3fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
385 PRE_LOOPBACK( VertexAttrib3fNV
);
386 CALL_VertexAttrib3fNV(GET_DISPATCH(), ( index
, x
, y
, z
));
389 static void GLAPIENTRY
TAG(VertexAttrib3fvNV
)( GLuint index
, const GLfloat
*v
)
391 PRE_LOOPBACK( VertexAttrib3fvNV
);
392 CALL_VertexAttrib3fvNV(GET_DISPATCH(), ( index
, v
));
395 static void GLAPIENTRY
TAG(VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
397 PRE_LOOPBACK( VertexAttrib4fNV
);
398 CALL_VertexAttrib4fNV(GET_DISPATCH(), ( index
, x
, y
, z
, w
));
401 static void GLAPIENTRY
TAG(VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
)
403 PRE_LOOPBACK( VertexAttrib4fvNV
);
404 CALL_VertexAttrib4fvNV(GET_DISPATCH(), ( index
, v
));
408 static void GLAPIENTRY
TAG(VertexAttrib1fARB
)( GLuint index
, GLfloat x
)
410 PRE_LOOPBACK( VertexAttrib1fARB
);
411 CALL_VertexAttrib1fARB(GET_DISPATCH(), ( index
, x
));
414 static void GLAPIENTRY
TAG(VertexAttrib1fvARB
)( GLuint index
, const GLfloat
*v
)
416 PRE_LOOPBACK( VertexAttrib1fvARB
);
417 CALL_VertexAttrib1fvARB(GET_DISPATCH(), ( index
, v
));
420 static void GLAPIENTRY
TAG(VertexAttrib2fARB
)( GLuint index
, GLfloat x
, GLfloat y
)
422 PRE_LOOPBACK( VertexAttrib2fARB
);
423 CALL_VertexAttrib2fARB(GET_DISPATCH(), ( index
, x
, y
));
426 static void GLAPIENTRY
TAG(VertexAttrib2fvARB
)( GLuint index
, const GLfloat
*v
)
428 PRE_LOOPBACK( VertexAttrib2fvARB
);
429 CALL_VertexAttrib2fvARB(GET_DISPATCH(), ( index
, v
));
432 static void GLAPIENTRY
TAG(VertexAttrib3fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
434 PRE_LOOPBACK( VertexAttrib3fARB
);
435 CALL_VertexAttrib3fARB(GET_DISPATCH(), ( index
, x
, y
, z
));
438 static void GLAPIENTRY
TAG(VertexAttrib3fvARB
)( GLuint index
, const GLfloat
*v
)
440 PRE_LOOPBACK( VertexAttrib3fvARB
);
441 CALL_VertexAttrib3fvARB(GET_DISPATCH(), ( index
, v
));
444 static void GLAPIENTRY
TAG(VertexAttrib4fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
446 PRE_LOOPBACK( VertexAttrib4fARB
);
447 CALL_VertexAttrib4fARB(GET_DISPATCH(), ( index
, x
, y
, z
, w
));
450 static void GLAPIENTRY
TAG(VertexAttrib4fvARB
)( GLuint index
, const GLfloat
*v
)
452 PRE_LOOPBACK( VertexAttrib4fvARB
);
453 CALL_VertexAttrib4fvARB(GET_DISPATCH(), ( index
, v
));
457 static GLvertexformat
TAG(vtxfmt
) = {
475 TAG(MultiTexCoord1fARB
),
476 TAG(MultiTexCoord1fvARB
),
477 TAG(MultiTexCoord2fARB
),
478 TAG(MultiTexCoord2fvARB
),
479 TAG(MultiTexCoord3fARB
),
480 TAG(MultiTexCoord3fvARB
),
481 TAG(MultiTexCoord4fARB
),
482 TAG(MultiTexCoord4fvARB
),
485 TAG(SecondaryColor3fEXT
),
486 TAG(SecondaryColor3fvEXT
),
505 TAG(VertexAttrib1fNV
),
506 TAG(VertexAttrib1fvNV
),
507 TAG(VertexAttrib2fNV
),
508 TAG(VertexAttrib2fvNV
),
509 TAG(VertexAttrib3fNV
),
510 TAG(VertexAttrib3fvNV
),
511 TAG(VertexAttrib4fNV
),
512 TAG(VertexAttrib4fvNV
),
513 TAG(VertexAttrib1fARB
),
514 TAG(VertexAttrib1fvARB
),
515 TAG(VertexAttrib2fARB
),
516 TAG(VertexAttrib2fvARB
),
517 TAG(VertexAttrib3fARB
),
518 TAG(VertexAttrib3fvARB
),
519 TAG(VertexAttrib4fARB
),
520 TAG(VertexAttrib4fvARB
),
524 TAG(DrawRangeElements
),