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(MultiDrawElementsEXT
)( GLenum mode
,
339 const GLsizei
*count
,
341 const GLvoid
**indices
,
344 PRE_LOOPBACK( MultiDrawElementsEXT
);
345 CALL_MultiDrawElementsEXT(GET_DISPATCH(), ( mode
, count
, type
, indices
,
349 static void GLAPIENTRY
TAG(DrawRangeElements
)( GLenum mode
, GLuint start
,
350 GLuint end
, GLsizei count
,
351 GLenum type
, const GLvoid
*indices
)
353 PRE_LOOPBACK( DrawRangeElements
);
354 CALL_DrawRangeElements(GET_DISPATCH(), ( mode
, start
, end
, count
, type
, indices
));
357 static void GLAPIENTRY
TAG(EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
)
359 PRE_LOOPBACK( EvalMesh1
);
360 CALL_EvalMesh1(GET_DISPATCH(), ( mode
, i1
, i2
));
363 static void GLAPIENTRY
TAG(EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
,
366 PRE_LOOPBACK( EvalMesh2
);
367 CALL_EvalMesh2(GET_DISPATCH(), ( mode
, i1
, i2
, j1
, j2
));
370 static void GLAPIENTRY
TAG(VertexAttrib1fNV
)( GLuint index
, GLfloat x
)
372 PRE_LOOPBACK( VertexAttrib1fNV
);
373 CALL_VertexAttrib1fNV(GET_DISPATCH(), ( index
, x
));
376 static void GLAPIENTRY
TAG(VertexAttrib1fvNV
)( GLuint index
, const GLfloat
*v
)
378 PRE_LOOPBACK( VertexAttrib1fvNV
);
379 CALL_VertexAttrib1fvNV(GET_DISPATCH(), ( index
, v
));
382 static void GLAPIENTRY
TAG(VertexAttrib2fNV
)( GLuint index
, GLfloat x
, GLfloat y
)
384 PRE_LOOPBACK( VertexAttrib2fNV
);
385 CALL_VertexAttrib2fNV(GET_DISPATCH(), ( index
, x
, y
));
388 static void GLAPIENTRY
TAG(VertexAttrib2fvNV
)( GLuint index
, const GLfloat
*v
)
390 PRE_LOOPBACK( VertexAttrib2fvNV
);
391 CALL_VertexAttrib2fvNV(GET_DISPATCH(), ( index
, v
));
394 static void GLAPIENTRY
TAG(VertexAttrib3fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
396 PRE_LOOPBACK( VertexAttrib3fNV
);
397 CALL_VertexAttrib3fNV(GET_DISPATCH(), ( index
, x
, y
, z
));
400 static void GLAPIENTRY
TAG(VertexAttrib3fvNV
)( GLuint index
, const GLfloat
*v
)
402 PRE_LOOPBACK( VertexAttrib3fvNV
);
403 CALL_VertexAttrib3fvNV(GET_DISPATCH(), ( index
, v
));
406 static void GLAPIENTRY
TAG(VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
408 PRE_LOOPBACK( VertexAttrib4fNV
);
409 CALL_VertexAttrib4fNV(GET_DISPATCH(), ( index
, x
, y
, z
, w
));
412 static void GLAPIENTRY
TAG(VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
)
414 PRE_LOOPBACK( VertexAttrib4fvNV
);
415 CALL_VertexAttrib4fvNV(GET_DISPATCH(), ( index
, v
));
419 static void GLAPIENTRY
TAG(VertexAttrib1fARB
)( GLuint index
, GLfloat x
)
421 PRE_LOOPBACK( VertexAttrib1fARB
);
422 CALL_VertexAttrib1fARB(GET_DISPATCH(), ( index
, x
));
425 static void GLAPIENTRY
TAG(VertexAttrib1fvARB
)( GLuint index
, const GLfloat
*v
)
427 PRE_LOOPBACK( VertexAttrib1fvARB
);
428 CALL_VertexAttrib1fvARB(GET_DISPATCH(), ( index
, v
));
431 static void GLAPIENTRY
TAG(VertexAttrib2fARB
)( GLuint index
, GLfloat x
, GLfloat y
)
433 PRE_LOOPBACK( VertexAttrib2fARB
);
434 CALL_VertexAttrib2fARB(GET_DISPATCH(), ( index
, x
, y
));
437 static void GLAPIENTRY
TAG(VertexAttrib2fvARB
)( GLuint index
, const GLfloat
*v
)
439 PRE_LOOPBACK( VertexAttrib2fvARB
);
440 CALL_VertexAttrib2fvARB(GET_DISPATCH(), ( index
, v
));
443 static void GLAPIENTRY
TAG(VertexAttrib3fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
445 PRE_LOOPBACK( VertexAttrib3fARB
);
446 CALL_VertexAttrib3fARB(GET_DISPATCH(), ( index
, x
, y
, z
));
449 static void GLAPIENTRY
TAG(VertexAttrib3fvARB
)( GLuint index
, const GLfloat
*v
)
451 PRE_LOOPBACK( VertexAttrib3fvARB
);
452 CALL_VertexAttrib3fvARB(GET_DISPATCH(), ( index
, v
));
455 static void GLAPIENTRY
TAG(VertexAttrib4fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
457 PRE_LOOPBACK( VertexAttrib4fARB
);
458 CALL_VertexAttrib4fARB(GET_DISPATCH(), ( index
, x
, y
, z
, w
));
461 static void GLAPIENTRY
TAG(VertexAttrib4fvARB
)( GLuint index
, const GLfloat
*v
)
463 PRE_LOOPBACK( VertexAttrib4fvARB
);
464 CALL_VertexAttrib4fvARB(GET_DISPATCH(), ( index
, v
));
468 static GLvertexformat
TAG(vtxfmt
) = {
486 TAG(MultiTexCoord1fARB
),
487 TAG(MultiTexCoord1fvARB
),
488 TAG(MultiTexCoord2fARB
),
489 TAG(MultiTexCoord2fvARB
),
490 TAG(MultiTexCoord3fARB
),
491 TAG(MultiTexCoord3fvARB
),
492 TAG(MultiTexCoord4fARB
),
493 TAG(MultiTexCoord4fvARB
),
496 TAG(SecondaryColor3fEXT
),
497 TAG(SecondaryColor3fvEXT
),
516 TAG(VertexAttrib1fNV
),
517 TAG(VertexAttrib1fvNV
),
518 TAG(VertexAttrib2fNV
),
519 TAG(VertexAttrib2fvNV
),
520 TAG(VertexAttrib3fNV
),
521 TAG(VertexAttrib3fvNV
),
522 TAG(VertexAttrib4fNV
),
523 TAG(VertexAttrib4fvNV
),
524 TAG(VertexAttrib1fARB
),
525 TAG(VertexAttrib1fvARB
),
526 TAG(VertexAttrib2fARB
),
527 TAG(VertexAttrib2fvARB
),
528 TAG(VertexAttrib3fARB
),
529 TAG(VertexAttrib3fvARB
),
530 TAG(VertexAttrib4fARB
),
531 TAG(VertexAttrib4fvARB
),
535 TAG(DrawRangeElements
),
536 TAG(MultiDrawElementsEXT
),