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 )
33 #include "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(EdgeFlagv
)( const GLboolean
*v
)
73 PRE_LOOPBACK( EdgeFlagv
);
74 CALL_EdgeFlagv(GET_DISPATCH(), ( v
));
77 static void GLAPIENTRY
TAG(EvalCoord1f
)( GLfloat s
)
79 PRE_LOOPBACK( EvalCoord1f
);
80 CALL_EvalCoord1f(GET_DISPATCH(), ( s
));
83 static void GLAPIENTRY
TAG(EvalCoord1fv
)( const GLfloat
*v
)
85 PRE_LOOPBACK( EvalCoord1fv
);
86 CALL_EvalCoord1fv(GET_DISPATCH(), ( v
));
89 static void GLAPIENTRY
TAG(EvalCoord2f
)( GLfloat s
, GLfloat t
)
91 PRE_LOOPBACK( EvalCoord2f
);
92 CALL_EvalCoord2f(GET_DISPATCH(), ( s
, t
));
95 static void GLAPIENTRY
TAG(EvalCoord2fv
)( const GLfloat
*v
)
97 PRE_LOOPBACK( EvalCoord2fv
);
98 CALL_EvalCoord2fv(GET_DISPATCH(), ( v
));
101 static void GLAPIENTRY
TAG(EvalPoint1
)( GLint i
)
103 PRE_LOOPBACK( EvalPoint1
);
104 CALL_EvalPoint1(GET_DISPATCH(), ( i
));
107 static void GLAPIENTRY
TAG(EvalPoint2
)( GLint i
, GLint j
)
109 PRE_LOOPBACK( EvalPoint2
);
110 CALL_EvalPoint2(GET_DISPATCH(), ( i
, j
));
113 static void GLAPIENTRY
TAG(FogCoordfEXT
)( GLfloat f
)
115 PRE_LOOPBACK( FogCoordfEXT
);
116 CALL_FogCoordfEXT(GET_DISPATCH(), ( f
));
119 static void GLAPIENTRY
TAG(FogCoordfvEXT
)( const GLfloat
*v
)
121 PRE_LOOPBACK( FogCoordfvEXT
);
122 CALL_FogCoordfvEXT(GET_DISPATCH(), ( v
));
125 static void GLAPIENTRY
TAG(Indexf
)( GLfloat f
)
127 PRE_LOOPBACK( Indexf
);
128 CALL_Indexf(GET_DISPATCH(), ( f
));
131 static void GLAPIENTRY
TAG(Indexfv
)( const GLfloat
*v
)
133 PRE_LOOPBACK( Indexfv
);
134 CALL_Indexfv(GET_DISPATCH(), ( v
));
137 static void GLAPIENTRY
TAG(Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
*v
)
139 PRE_LOOPBACK( Materialfv
);
140 CALL_Materialfv(GET_DISPATCH(), ( face
, pname
, v
));
143 static void GLAPIENTRY
TAG(MultiTexCoord1fARB
)( GLenum target
, GLfloat a
)
145 PRE_LOOPBACK( MultiTexCoord1fARB
);
146 CALL_MultiTexCoord1fARB(GET_DISPATCH(), ( target
, a
));
149 static void GLAPIENTRY
TAG(MultiTexCoord1fvARB
)( GLenum target
, const GLfloat
*tc
)
151 PRE_LOOPBACK( MultiTexCoord1fvARB
);
152 CALL_MultiTexCoord1fvARB(GET_DISPATCH(), ( target
, tc
));
155 static void GLAPIENTRY
TAG(MultiTexCoord2fARB
)( GLenum target
, GLfloat s
, GLfloat t
)
157 PRE_LOOPBACK( MultiTexCoord2fARB
);
158 CALL_MultiTexCoord2fARB(GET_DISPATCH(), ( target
, s
, t
));
161 static void GLAPIENTRY
TAG(MultiTexCoord2fvARB
)( GLenum target
, const GLfloat
*tc
)
163 PRE_LOOPBACK( MultiTexCoord2fvARB
);
164 CALL_MultiTexCoord2fvARB(GET_DISPATCH(), ( target
, tc
));
167 static void GLAPIENTRY
TAG(MultiTexCoord3fARB
)( GLenum target
, GLfloat s
,
168 GLfloat t
, GLfloat r
)
170 PRE_LOOPBACK( MultiTexCoord3fARB
);
171 CALL_MultiTexCoord3fARB(GET_DISPATCH(), ( target
, s
, t
, r
));
174 static void GLAPIENTRY
TAG(MultiTexCoord3fvARB
)( GLenum target
, const GLfloat
*tc
)
176 PRE_LOOPBACK( MultiTexCoord3fvARB
);
177 CALL_MultiTexCoord3fvARB(GET_DISPATCH(), ( target
, tc
));
180 static void GLAPIENTRY
TAG(MultiTexCoord4fARB
)( GLenum target
, GLfloat s
,
181 GLfloat t
, GLfloat r
, GLfloat q
)
183 PRE_LOOPBACK( MultiTexCoord4fARB
);
184 CALL_MultiTexCoord4fARB(GET_DISPATCH(), ( target
, s
, t
, r
, q
));
187 static void GLAPIENTRY
TAG(MultiTexCoord4fvARB
)( GLenum target
, const GLfloat
*tc
)
189 PRE_LOOPBACK( MultiTexCoord4fvARB
);
190 CALL_MultiTexCoord4fvARB(GET_DISPATCH(), ( target
, tc
));
193 static void GLAPIENTRY
TAG(Normal3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
195 PRE_LOOPBACK( Normal3f
);
196 CALL_Normal3f(GET_DISPATCH(), ( x
, y
, z
));
199 static void GLAPIENTRY
TAG(Normal3fv
)( const GLfloat
*v
)
201 PRE_LOOPBACK( Normal3fv
);
202 CALL_Normal3fv(GET_DISPATCH(), ( v
));
205 static void GLAPIENTRY
TAG(SecondaryColor3fEXT
)( GLfloat r
, GLfloat g
, GLfloat b
)
207 PRE_LOOPBACK( SecondaryColor3fEXT
);
208 CALL_SecondaryColor3fEXT(GET_DISPATCH(), ( r
, g
, b
));
211 static void GLAPIENTRY
TAG(SecondaryColor3fvEXT
)( const GLfloat
*v
)
213 PRE_LOOPBACK( SecondaryColor3fvEXT
);
214 CALL_SecondaryColor3fvEXT(GET_DISPATCH(), ( v
));
217 static void GLAPIENTRY
TAG(TexCoord1f
)( GLfloat s
)
219 PRE_LOOPBACK( TexCoord1f
);
220 CALL_TexCoord1f(GET_DISPATCH(), ( s
));
223 static void GLAPIENTRY
TAG(TexCoord1fv
)( const GLfloat
*tc
)
225 PRE_LOOPBACK( TexCoord1fv
);
226 CALL_TexCoord1fv(GET_DISPATCH(), ( tc
));
229 static void GLAPIENTRY
TAG(TexCoord2f
)( GLfloat s
, GLfloat t
)
231 PRE_LOOPBACK( TexCoord2f
);
232 CALL_TexCoord2f(GET_DISPATCH(), ( s
, t
));
235 static void GLAPIENTRY
TAG(TexCoord2fv
)( const GLfloat
*tc
)
237 PRE_LOOPBACK( TexCoord2fv
);
238 CALL_TexCoord2fv(GET_DISPATCH(), ( tc
));
241 static void GLAPIENTRY
TAG(TexCoord3f
)( GLfloat s
, GLfloat t
, GLfloat r
)
243 PRE_LOOPBACK( TexCoord3f
);
244 CALL_TexCoord3f(GET_DISPATCH(), ( s
, t
, r
));
247 static void GLAPIENTRY
TAG(TexCoord3fv
)( const GLfloat
*tc
)
249 PRE_LOOPBACK( TexCoord3fv
);
250 CALL_TexCoord3fv(GET_DISPATCH(), ( tc
));
253 static void GLAPIENTRY
TAG(TexCoord4f
)( GLfloat s
, GLfloat t
, GLfloat r
, GLfloat q
)
255 PRE_LOOPBACK( TexCoord4f
);
256 CALL_TexCoord4f(GET_DISPATCH(), ( s
, t
, r
, q
));
259 static void GLAPIENTRY
TAG(TexCoord4fv
)( const GLfloat
*tc
)
261 PRE_LOOPBACK( TexCoord4fv
);
262 CALL_TexCoord4fv(GET_DISPATCH(), ( tc
));
265 static void GLAPIENTRY
TAG(Vertex2f
)( GLfloat x
, GLfloat y
)
267 PRE_LOOPBACK( Vertex2f
);
268 CALL_Vertex2f(GET_DISPATCH(), ( x
, y
));
271 static void GLAPIENTRY
TAG(Vertex2fv
)( const GLfloat
*v
)
273 PRE_LOOPBACK( Vertex2fv
);
274 CALL_Vertex2fv(GET_DISPATCH(), ( v
));
277 static void GLAPIENTRY
TAG(Vertex3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
279 PRE_LOOPBACK( Vertex3f
);
280 CALL_Vertex3f(GET_DISPATCH(), ( x
, y
, z
));
283 static void GLAPIENTRY
TAG(Vertex3fv
)( const GLfloat
*v
)
285 PRE_LOOPBACK( Vertex3fv
);
286 CALL_Vertex3fv(GET_DISPATCH(), ( v
));
289 static void GLAPIENTRY
TAG(Vertex4f
)( GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
291 PRE_LOOPBACK( Vertex4f
);
292 CALL_Vertex4f(GET_DISPATCH(), ( x
, y
, z
, w
));
295 static void GLAPIENTRY
TAG(Vertex4fv
)( const GLfloat
*v
)
297 PRE_LOOPBACK( Vertex4fv
);
298 CALL_Vertex4fv(GET_DISPATCH(), ( v
));
301 static void GLAPIENTRY
TAG(CallList
)( GLuint i
)
303 PRE_LOOPBACK( CallList
);
304 CALL_CallList(GET_DISPATCH(), ( i
));
307 static void GLAPIENTRY
TAG(CallLists
)( GLsizei sz
, GLenum type
, const GLvoid
*v
)
309 PRE_LOOPBACK( CallLists
);
310 CALL_CallLists(GET_DISPATCH(), ( sz
, type
, v
));
313 static void GLAPIENTRY
TAG(Begin
)( GLenum mode
)
315 PRE_LOOPBACK( Begin
);
316 CALL_Begin(GET_DISPATCH(), ( mode
));
319 static void GLAPIENTRY
TAG(End
)( void )
322 CALL_End(GET_DISPATCH(), ());
325 static void GLAPIENTRY
TAG(Rectf
)( GLfloat x1
, GLfloat y1
, GLfloat x2
, GLfloat y2
)
327 PRE_LOOPBACK( Rectf
);
328 CALL_Rectf(GET_DISPATCH(), ( x1
, y1
, x2
, y2
));
331 static void GLAPIENTRY
TAG(DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
)
333 PRE_LOOPBACK( DrawArrays
);
334 CALL_DrawArrays(GET_DISPATCH(), ( mode
, start
, count
));
337 static void GLAPIENTRY
TAG(DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
338 const GLvoid
*indices
)
340 PRE_LOOPBACK( DrawElements
);
341 CALL_DrawElements(GET_DISPATCH(), ( mode
, count
, type
, indices
));
344 static void GLAPIENTRY
TAG(DrawRangeElements
)( GLenum mode
, GLuint start
,
345 GLuint end
, GLsizei count
,
346 GLenum type
, const GLvoid
*indices
)
348 PRE_LOOPBACK( DrawRangeElements
);
349 CALL_DrawRangeElements(GET_DISPATCH(), ( mode
, start
, end
, count
, type
, indices
));
352 static void GLAPIENTRY
TAG(EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
)
354 PRE_LOOPBACK( EvalMesh1
);
355 CALL_EvalMesh1(GET_DISPATCH(), ( mode
, i1
, i2
));
358 static void GLAPIENTRY
TAG(EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
,
361 PRE_LOOPBACK( EvalMesh2
);
362 CALL_EvalMesh2(GET_DISPATCH(), ( mode
, i1
, i2
, j1
, j2
));
365 static void GLAPIENTRY
TAG(VertexAttrib1fNV
)( GLuint index
, GLfloat x
)
367 PRE_LOOPBACK( VertexAttrib1fNV
);
368 CALL_VertexAttrib1fNV(GET_DISPATCH(), ( index
, x
));
371 static void GLAPIENTRY
TAG(VertexAttrib1fvNV
)( GLuint index
, const GLfloat
*v
)
373 PRE_LOOPBACK( VertexAttrib1fvNV
);
374 CALL_VertexAttrib1fvNV(GET_DISPATCH(), ( index
, v
));
377 static void GLAPIENTRY
TAG(VertexAttrib2fNV
)( GLuint index
, GLfloat x
, GLfloat y
)
379 PRE_LOOPBACK( VertexAttrib2fNV
);
380 CALL_VertexAttrib2fNV(GET_DISPATCH(), ( index
, x
, y
));
383 static void GLAPIENTRY
TAG(VertexAttrib2fvNV
)( GLuint index
, const GLfloat
*v
)
385 PRE_LOOPBACK( VertexAttrib2fvNV
);
386 CALL_VertexAttrib2fvNV(GET_DISPATCH(), ( index
, v
));
389 static void GLAPIENTRY
TAG(VertexAttrib3fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
391 PRE_LOOPBACK( VertexAttrib3fNV
);
392 CALL_VertexAttrib3fNV(GET_DISPATCH(), ( index
, x
, y
, z
));
395 static void GLAPIENTRY
TAG(VertexAttrib3fvNV
)( GLuint index
, const GLfloat
*v
)
397 PRE_LOOPBACK( VertexAttrib3fvNV
);
398 CALL_VertexAttrib3fvNV(GET_DISPATCH(), ( index
, v
));
401 static void GLAPIENTRY
TAG(VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
403 PRE_LOOPBACK( VertexAttrib4fNV
);
404 CALL_VertexAttrib4fNV(GET_DISPATCH(), ( index
, x
, y
, z
, w
));
407 static void GLAPIENTRY
TAG(VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
)
409 PRE_LOOPBACK( VertexAttrib4fvNV
);
410 CALL_VertexAttrib4fvNV(GET_DISPATCH(), ( index
, v
));
414 static void GLAPIENTRY
TAG(VertexAttrib1fARB
)( GLuint index
, GLfloat x
)
416 PRE_LOOPBACK( VertexAttrib1fARB
);
417 CALL_VertexAttrib1fARB(GET_DISPATCH(), ( index
, x
));
420 static void GLAPIENTRY
TAG(VertexAttrib1fvARB
)( GLuint index
, const GLfloat
*v
)
422 PRE_LOOPBACK( VertexAttrib1fvARB
);
423 CALL_VertexAttrib1fvARB(GET_DISPATCH(), ( index
, v
));
426 static void GLAPIENTRY
TAG(VertexAttrib2fARB
)( GLuint index
, GLfloat x
, GLfloat y
)
428 PRE_LOOPBACK( VertexAttrib2fARB
);
429 CALL_VertexAttrib2fARB(GET_DISPATCH(), ( index
, x
, y
));
432 static void GLAPIENTRY
TAG(VertexAttrib2fvARB
)( GLuint index
, const GLfloat
*v
)
434 PRE_LOOPBACK( VertexAttrib2fvARB
);
435 CALL_VertexAttrib2fvARB(GET_DISPATCH(), ( index
, v
));
438 static void GLAPIENTRY
TAG(VertexAttrib3fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
440 PRE_LOOPBACK( VertexAttrib3fARB
);
441 CALL_VertexAttrib3fARB(GET_DISPATCH(), ( index
, x
, y
, z
));
444 static void GLAPIENTRY
TAG(VertexAttrib3fvARB
)( GLuint index
, const GLfloat
*v
)
446 PRE_LOOPBACK( VertexAttrib3fvARB
);
447 CALL_VertexAttrib3fvARB(GET_DISPATCH(), ( index
, v
));
450 static void GLAPIENTRY
TAG(VertexAttrib4fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
452 PRE_LOOPBACK( VertexAttrib4fARB
);
453 CALL_VertexAttrib4fARB(GET_DISPATCH(), ( index
, x
, y
, z
, w
));
456 static void GLAPIENTRY
TAG(VertexAttrib4fvARB
)( GLuint index
, const GLfloat
*v
)
458 PRE_LOOPBACK( VertexAttrib4fvARB
);
459 CALL_VertexAttrib4fvARB(GET_DISPATCH(), ( index
, v
));
463 static GLvertexformat
TAG(vtxfmt
) = {
482 TAG(MultiTexCoord1fARB
),
483 TAG(MultiTexCoord1fvARB
),
484 TAG(MultiTexCoord2fARB
),
485 TAG(MultiTexCoord2fvARB
),
486 TAG(MultiTexCoord3fARB
),
487 TAG(MultiTexCoord3fvARB
),
488 TAG(MultiTexCoord4fARB
),
489 TAG(MultiTexCoord4fvARB
),
492 TAG(SecondaryColor3fEXT
),
493 TAG(SecondaryColor3fvEXT
),
512 TAG(VertexAttrib1fNV
),
513 TAG(VertexAttrib1fvNV
),
514 TAG(VertexAttrib2fNV
),
515 TAG(VertexAttrib2fvNV
),
516 TAG(VertexAttrib3fNV
),
517 TAG(VertexAttrib3fvNV
),
518 TAG(VertexAttrib4fNV
),
519 TAG(VertexAttrib4fvNV
),
520 TAG(VertexAttrib1fARB
),
521 TAG(VertexAttrib1fvARB
),
522 TAG(VertexAttrib2fARB
),
523 TAG(VertexAttrib2fvARB
),
524 TAG(VertexAttrib3fARB
),
525 TAG(VertexAttrib3fvARB
),
526 TAG(VertexAttrib4fARB
),
527 TAG(VertexAttrib4fvARB
),
531 TAG(DrawRangeElements
),