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 static void GLAPIENTRY
TAG(ArrayElement
)( GLint i
)
34 PRE_LOOPBACK( ArrayElement
);
35 GL_CALL(ArrayElement
)( i
);
38 static void GLAPIENTRY
TAG(Color3f
)( GLfloat r
, GLfloat g
, GLfloat b
)
40 PRE_LOOPBACK( Color3f
);
41 GL_CALL(Color3f
)( r
, g
, b
);
44 static void GLAPIENTRY
TAG(Color3fv
)( const GLfloat
*v
)
46 PRE_LOOPBACK( Color3fv
);
47 GL_CALL(Color3fv
)( v
);
50 static void GLAPIENTRY
TAG(Color4f
)( GLfloat r
, GLfloat g
, GLfloat b
, GLfloat a
)
52 PRE_LOOPBACK( Color4f
);
53 GL_CALL(Color4f
)( r
, g
, b
, a
);
56 static void GLAPIENTRY
TAG(Color4fv
)( const GLfloat
*v
)
58 PRE_LOOPBACK( Color4fv
);
59 GL_CALL(Color4fv
)( v
);
62 static void GLAPIENTRY
TAG(EdgeFlag
)( GLboolean e
)
64 PRE_LOOPBACK( EdgeFlag
);
65 GL_CALL(EdgeFlag
)( e
);
68 static void GLAPIENTRY
TAG(EdgeFlagv
)( const GLboolean
*v
)
70 PRE_LOOPBACK( EdgeFlagv
);
71 GL_CALL(EdgeFlagv
)( v
);
74 static void GLAPIENTRY
TAG(EvalCoord1f
)( GLfloat s
)
76 PRE_LOOPBACK( EvalCoord1f
);
77 GL_CALL(EvalCoord1f
)( s
);
80 static void GLAPIENTRY
TAG(EvalCoord1fv
)( const GLfloat
*v
)
82 PRE_LOOPBACK( EvalCoord1fv
);
83 GL_CALL(EvalCoord1fv
)( v
);
86 static void GLAPIENTRY
TAG(EvalCoord2f
)( GLfloat s
, GLfloat t
)
88 PRE_LOOPBACK( EvalCoord2f
);
89 GL_CALL(EvalCoord2f
)( s
, t
);
92 static void GLAPIENTRY
TAG(EvalCoord2fv
)( const GLfloat
*v
)
94 PRE_LOOPBACK( EvalCoord2fv
);
95 GL_CALL(EvalCoord2fv
)( v
);
98 static void GLAPIENTRY
TAG(EvalPoint1
)( GLint i
)
100 PRE_LOOPBACK( EvalPoint1
);
101 GL_CALL(EvalPoint1
)( i
);
104 static void GLAPIENTRY
TAG(EvalPoint2
)( GLint i
, GLint j
)
106 PRE_LOOPBACK( EvalPoint2
);
107 GL_CALL(EvalPoint2
)( i
, j
);
110 static void GLAPIENTRY
TAG(FogCoordfEXT
)( GLfloat f
)
112 PRE_LOOPBACK( FogCoordfEXT
);
113 GL_CALL(FogCoordfEXT
)( f
);
116 static void GLAPIENTRY
TAG(FogCoordfvEXT
)( const GLfloat
*v
)
118 PRE_LOOPBACK( FogCoordfvEXT
);
119 GL_CALL(FogCoordfvEXT
)( v
);
122 static void GLAPIENTRY
TAG(Indexf
)( GLfloat f
)
124 PRE_LOOPBACK( Indexf
);
125 GL_CALL(Indexf
)( f
);
128 static void GLAPIENTRY
TAG(Indexfv
)( const GLfloat
*v
)
130 PRE_LOOPBACK( Indexfv
);
131 GL_CALL(Indexfv
)( v
);
134 static void GLAPIENTRY
TAG(Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
*v
)
136 PRE_LOOPBACK( Materialfv
);
137 GL_CALL(Materialfv
)( face
, pname
, v
);
140 static void GLAPIENTRY
TAG(MultiTexCoord1fARB
)( GLenum target
, GLfloat a
)
142 PRE_LOOPBACK( MultiTexCoord1fARB
);
143 GL_CALL(MultiTexCoord1fARB
)( target
, a
);
146 static void GLAPIENTRY
TAG(MultiTexCoord1fvARB
)( GLenum target
, const GLfloat
*tc
)
148 PRE_LOOPBACK( MultiTexCoord1fvARB
);
149 GL_CALL(MultiTexCoord1fvARB
)( target
, tc
);
152 static void GLAPIENTRY
TAG(MultiTexCoord2fARB
)( GLenum target
, GLfloat s
, GLfloat t
)
154 PRE_LOOPBACK( MultiTexCoord2fARB
);
155 GL_CALL(MultiTexCoord2fARB
)( target
, s
, t
);
158 static void GLAPIENTRY
TAG(MultiTexCoord2fvARB
)( GLenum target
, const GLfloat
*tc
)
160 PRE_LOOPBACK( MultiTexCoord2fvARB
);
161 GL_CALL(MultiTexCoord2fvARB
)( target
, tc
);
164 static void GLAPIENTRY
TAG(MultiTexCoord3fARB
)( GLenum target
, GLfloat s
,
165 GLfloat t
, GLfloat r
)
167 PRE_LOOPBACK( MultiTexCoord3fARB
);
168 GL_CALL(MultiTexCoord3fARB
)( target
, s
, t
, r
);
171 static void GLAPIENTRY
TAG(MultiTexCoord3fvARB
)( GLenum target
, const GLfloat
*tc
)
173 PRE_LOOPBACK( MultiTexCoord3fvARB
);
174 GL_CALL(MultiTexCoord3fvARB
)( target
, tc
);
177 static void GLAPIENTRY
TAG(MultiTexCoord4fARB
)( GLenum target
, GLfloat s
,
178 GLfloat t
, GLfloat r
, GLfloat q
)
180 PRE_LOOPBACK( MultiTexCoord4fARB
);
181 GL_CALL(MultiTexCoord4fARB
)( target
, s
, t
, r
, q
);
184 static void GLAPIENTRY
TAG(MultiTexCoord4fvARB
)( GLenum target
, const GLfloat
*tc
)
186 PRE_LOOPBACK( MultiTexCoord4fvARB
);
187 GL_CALL(MultiTexCoord4fvARB
)( target
, tc
);
190 static void GLAPIENTRY
TAG(Normal3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
192 PRE_LOOPBACK( Normal3f
);
193 GL_CALL(Normal3f
)( x
, y
, z
);
196 static void GLAPIENTRY
TAG(Normal3fv
)( const GLfloat
*v
)
198 PRE_LOOPBACK( Normal3fv
);
199 GL_CALL(Normal3fv
)( v
);
202 static void GLAPIENTRY
TAG(SecondaryColor3fEXT
)( GLfloat r
, GLfloat g
, GLfloat b
)
204 PRE_LOOPBACK( SecondaryColor3fEXT
);
205 GL_CALL(SecondaryColor3fEXT
)( r
, g
, b
);
208 static void GLAPIENTRY
TAG(SecondaryColor3fvEXT
)( const GLfloat
*v
)
210 PRE_LOOPBACK( SecondaryColor3fvEXT
);
211 GL_CALL(SecondaryColor3fvEXT
)( v
);
214 static void GLAPIENTRY
TAG(TexCoord1f
)( GLfloat s
)
216 PRE_LOOPBACK( TexCoord1f
);
217 GL_CALL(TexCoord1f
)( s
);
220 static void GLAPIENTRY
TAG(TexCoord1fv
)( const GLfloat
*tc
)
222 PRE_LOOPBACK( TexCoord1fv
);
223 GL_CALL(TexCoord1fv
)( tc
);
226 static void GLAPIENTRY
TAG(TexCoord2f
)( GLfloat s
, GLfloat t
)
228 PRE_LOOPBACK( TexCoord2f
);
229 GL_CALL(TexCoord2f
)( s
, t
);
232 static void GLAPIENTRY
TAG(TexCoord2fv
)( const GLfloat
*tc
)
234 PRE_LOOPBACK( TexCoord2fv
);
235 GL_CALL(TexCoord2fv
)( tc
);
238 static void GLAPIENTRY
TAG(TexCoord3f
)( GLfloat s
, GLfloat t
, GLfloat r
)
240 PRE_LOOPBACK( TexCoord3f
);
241 GL_CALL(TexCoord3f
)( s
, t
, r
);
244 static void GLAPIENTRY
TAG(TexCoord3fv
)( const GLfloat
*tc
)
246 PRE_LOOPBACK( TexCoord3fv
);
247 GL_CALL(TexCoord3fv
)( tc
);
250 static void GLAPIENTRY
TAG(TexCoord4f
)( GLfloat s
, GLfloat t
, GLfloat r
, GLfloat q
)
252 PRE_LOOPBACK( TexCoord4f
);
253 GL_CALL(TexCoord4f
)( s
, t
, r
, q
);
256 static void GLAPIENTRY
TAG(TexCoord4fv
)( const GLfloat
*tc
)
258 PRE_LOOPBACK( TexCoord4fv
);
259 GL_CALL(TexCoord4fv
)( tc
);
262 static void GLAPIENTRY
TAG(Vertex2f
)( GLfloat x
, GLfloat y
)
264 PRE_LOOPBACK( Vertex2f
);
265 GL_CALL(Vertex2f
)( x
, y
);
268 static void GLAPIENTRY
TAG(Vertex2fv
)( const GLfloat
*v
)
270 PRE_LOOPBACK( Vertex2fv
);
271 GL_CALL(Vertex2fv
)( v
);
274 static void GLAPIENTRY
TAG(Vertex3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
276 PRE_LOOPBACK( Vertex3f
);
277 GL_CALL(Vertex3f
)( x
, y
, z
);
280 static void GLAPIENTRY
TAG(Vertex3fv
)( const GLfloat
*v
)
282 PRE_LOOPBACK( Vertex3fv
);
283 GL_CALL(Vertex3fv
)( v
);
286 static void GLAPIENTRY
TAG(Vertex4f
)( GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
288 PRE_LOOPBACK( Vertex4f
);
289 GL_CALL(Vertex4f
)( x
, y
, z
, w
);
292 static void GLAPIENTRY
TAG(Vertex4fv
)( const GLfloat
*v
)
294 PRE_LOOPBACK( Vertex4fv
);
295 GL_CALL(Vertex4fv
)( v
);
298 static void GLAPIENTRY
TAG(CallList
)( GLuint i
)
300 PRE_LOOPBACK( CallList
);
301 GL_CALL(CallList
)( i
);
304 static void GLAPIENTRY
TAG(CallLists
)( GLsizei sz
, GLenum type
, const GLvoid
*v
)
306 PRE_LOOPBACK( CallLists
);
307 GL_CALL(CallLists
)( sz
, type
, v
);
310 static void GLAPIENTRY
TAG(Begin
)( GLenum mode
)
312 PRE_LOOPBACK( Begin
);
313 GL_CALL(Begin
)( mode
);
316 static void GLAPIENTRY
TAG(End
)( void )
322 static void GLAPIENTRY
TAG(Rectf
)( GLfloat x1
, GLfloat y1
, GLfloat x2
, GLfloat y2
)
324 PRE_LOOPBACK( Rectf
);
325 GL_CALL(Rectf
)( x1
, y1
, x2
, y2
);
328 static void GLAPIENTRY
TAG(DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
)
330 PRE_LOOPBACK( DrawArrays
);
331 GL_CALL(DrawArrays
)( mode
, start
, count
);
334 static void GLAPIENTRY
TAG(DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
335 const GLvoid
*indices
)
337 PRE_LOOPBACK( DrawElements
);
338 GL_CALL(DrawElements
)( mode
, count
, type
, indices
);
341 static void GLAPIENTRY
TAG(DrawRangeElements
)( GLenum mode
, GLuint start
,
342 GLuint end
, GLsizei count
,
343 GLenum type
, const GLvoid
*indices
)
345 PRE_LOOPBACK( DrawRangeElements
);
346 GL_CALL(DrawRangeElements
)( mode
, start
, end
, count
, type
, indices
);
349 static void GLAPIENTRY
TAG(EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
)
351 PRE_LOOPBACK( EvalMesh1
);
352 GL_CALL(EvalMesh1
)( mode
, i1
, i2
);
355 static void GLAPIENTRY
TAG(EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
,
358 PRE_LOOPBACK( EvalMesh2
);
359 GL_CALL(EvalMesh2
)( mode
, i1
, i2
, j1
, j2
);
362 static void GLAPIENTRY
TAG(VertexAttrib1fNV
)( GLuint index
, GLfloat x
)
364 PRE_LOOPBACK( VertexAttrib1fNV
);
365 GL_CALL(VertexAttrib1fNV
)( index
, x
);
368 static void GLAPIENTRY
TAG(VertexAttrib1fvNV
)( GLuint index
, const GLfloat
*v
)
370 PRE_LOOPBACK( VertexAttrib1fvNV
);
371 GL_CALL(VertexAttrib1fvNV
)( index
, v
);
374 static void GLAPIENTRY
TAG(VertexAttrib2fNV
)( GLuint index
, GLfloat x
, GLfloat y
)
376 PRE_LOOPBACK( VertexAttrib2fNV
);
377 GL_CALL(VertexAttrib2fNV
)( index
, x
, y
);
380 static void GLAPIENTRY
TAG(VertexAttrib2fvNV
)( GLuint index
, const GLfloat
*v
)
382 PRE_LOOPBACK( VertexAttrib2fvNV
);
383 GL_CALL(VertexAttrib2fvNV
)( index
, v
);
386 static void GLAPIENTRY
TAG(VertexAttrib3fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
388 PRE_LOOPBACK( VertexAttrib3fNV
);
389 GL_CALL(VertexAttrib3fNV
)( index
, x
, y
, z
);
392 static void GLAPIENTRY
TAG(VertexAttrib3fvNV
)( GLuint index
, const GLfloat
*v
)
394 PRE_LOOPBACK( VertexAttrib3fvNV
);
395 GL_CALL(VertexAttrib3fvNV
)( index
, v
);
398 static void GLAPIENTRY
TAG(VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
400 PRE_LOOPBACK( VertexAttrib4fNV
);
401 GL_CALL(VertexAttrib4fNV
)( index
, x
, y
, z
, w
);
404 static void GLAPIENTRY
TAG(VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
)
406 PRE_LOOPBACK( VertexAttrib4fvNV
);
407 GL_CALL(VertexAttrib4fvNV
)( index
, v
);
411 static void GLAPIENTRY
TAG(VertexAttrib1fARB
)( GLuint index
, GLfloat x
)
413 PRE_LOOPBACK( VertexAttrib1fARB
);
414 GL_CALL(VertexAttrib1fARB
)( index
, x
);
417 static void GLAPIENTRY
TAG(VertexAttrib1fvARB
)( GLuint index
, const GLfloat
*v
)
419 PRE_LOOPBACK( VertexAttrib1fvARB
);
420 GL_CALL(VertexAttrib1fvARB
)( index
, v
);
423 static void GLAPIENTRY
TAG(VertexAttrib2fARB
)( GLuint index
, GLfloat x
, GLfloat y
)
425 PRE_LOOPBACK( VertexAttrib2fARB
);
426 GL_CALL(VertexAttrib2fARB
)( index
, x
, y
);
429 static void GLAPIENTRY
TAG(VertexAttrib2fvARB
)( GLuint index
, const GLfloat
*v
)
431 PRE_LOOPBACK( VertexAttrib2fvARB
);
432 GL_CALL(VertexAttrib2fvARB
)( index
, v
);
435 static void GLAPIENTRY
TAG(VertexAttrib3fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
437 PRE_LOOPBACK( VertexAttrib3fARB
);
438 GL_CALL(VertexAttrib3fARB
)( index
, x
, y
, z
);
441 static void GLAPIENTRY
TAG(VertexAttrib3fvARB
)( GLuint index
, const GLfloat
*v
)
443 PRE_LOOPBACK( VertexAttrib3fvARB
);
444 GL_CALL(VertexAttrib3fvARB
)( index
, v
);
447 static void GLAPIENTRY
TAG(VertexAttrib4fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
449 PRE_LOOPBACK( VertexAttrib4fARB
);
450 GL_CALL(VertexAttrib4fARB
)( index
, x
, y
, z
, w
);
453 static void GLAPIENTRY
TAG(VertexAttrib4fvARB
)( GLuint index
, const GLfloat
*v
)
455 PRE_LOOPBACK( VertexAttrib4fvARB
);
456 GL_CALL(VertexAttrib4fvARB
)( index
, v
);
460 static GLvertexformat
TAG(vtxfmt
) = {
479 TAG(MultiTexCoord1fARB
),
480 TAG(MultiTexCoord1fvARB
),
481 TAG(MultiTexCoord2fARB
),
482 TAG(MultiTexCoord2fvARB
),
483 TAG(MultiTexCoord3fARB
),
484 TAG(MultiTexCoord3fvARB
),
485 TAG(MultiTexCoord4fARB
),
486 TAG(MultiTexCoord4fvARB
),
489 TAG(SecondaryColor3fEXT
),
490 TAG(SecondaryColor3fvEXT
),
509 TAG(VertexAttrib1fNV
),
510 TAG(VertexAttrib1fvNV
),
511 TAG(VertexAttrib2fNV
),
512 TAG(VertexAttrib2fvNV
),
513 TAG(VertexAttrib3fNV
),
514 TAG(VertexAttrib3fvNV
),
515 TAG(VertexAttrib4fNV
),
516 TAG(VertexAttrib4fvNV
),
517 TAG(VertexAttrib1fARB
),
518 TAG(VertexAttrib1fvARB
),
519 TAG(VertexAttrib2fARB
),
520 TAG(VertexAttrib2fvARB
),
521 TAG(VertexAttrib3fARB
),
522 TAG(VertexAttrib3fvARB
),
523 TAG(VertexAttrib4fARB
),
524 TAG(VertexAttrib4fvARB
),
528 TAG(DrawRangeElements
),