3 * Mesa 3-D graphics library
6 * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 #define PRE_LOOPBACK( FUNC )
33 static void GLAPIENTRY
TAG(ArrayElement
)( GLint i
)
35 PRE_LOOPBACK( ArrayElement
);
36 _glapi_Dispatch
->ArrayElement( i
);
39 static void GLAPIENTRY
TAG(Color3f
)( GLfloat r
, GLfloat g
, GLfloat b
)
41 PRE_LOOPBACK( Color3f
);
42 _glapi_Dispatch
->Color3f( r
, g
, b
);
45 static void GLAPIENTRY
TAG(Color3fv
)( const GLfloat
*v
)
47 PRE_LOOPBACK( Color3fv
);
48 _glapi_Dispatch
->Color3fv( v
);
51 static void GLAPIENTRY
TAG(Color4f
)( GLfloat r
, GLfloat g
, GLfloat b
, GLfloat a
)
53 PRE_LOOPBACK( Color4f
);
54 _glapi_Dispatch
->Color4f( r
, g
, b
, a
);
57 static void GLAPIENTRY
TAG(Color4fv
)( const GLfloat
*v
)
59 PRE_LOOPBACK( Color4fv
);
60 _glapi_Dispatch
->Color4fv( v
);
63 static void GLAPIENTRY
TAG(EdgeFlag
)( GLboolean e
)
65 PRE_LOOPBACK( EdgeFlag
);
66 _glapi_Dispatch
->EdgeFlag( e
);
69 static void GLAPIENTRY
TAG(EdgeFlagv
)( const GLboolean
*v
)
71 PRE_LOOPBACK( EdgeFlagv
);
72 _glapi_Dispatch
->EdgeFlagv( v
);
75 static void GLAPIENTRY
TAG(EvalCoord1f
)( GLfloat s
)
77 PRE_LOOPBACK( EvalCoord1f
);
78 _glapi_Dispatch
->EvalCoord1f( s
);
81 static void GLAPIENTRY
TAG(EvalCoord1fv
)( const GLfloat
*v
)
83 PRE_LOOPBACK( EvalCoord1fv
);
84 _glapi_Dispatch
->EvalCoord1fv( v
);
87 static void GLAPIENTRY
TAG(EvalCoord2f
)( GLfloat s
, GLfloat t
)
89 PRE_LOOPBACK( EvalCoord2f
);
90 _glapi_Dispatch
->EvalCoord2f( s
, t
);
93 static void GLAPIENTRY
TAG(EvalCoord2fv
)( const GLfloat
*v
)
95 PRE_LOOPBACK( EvalCoord2fv
);
96 _glapi_Dispatch
->EvalCoord2fv( v
);
99 static void GLAPIENTRY
TAG(EvalPoint1
)( GLint i
)
101 PRE_LOOPBACK( EvalPoint1
);
102 _glapi_Dispatch
->EvalPoint1( i
);
105 static void GLAPIENTRY
TAG(EvalPoint2
)( GLint i
, GLint j
)
107 PRE_LOOPBACK( EvalPoint2
);
108 _glapi_Dispatch
->EvalPoint2( i
, j
);
111 static void GLAPIENTRY
TAG(FogCoordfEXT
)( GLfloat f
)
113 PRE_LOOPBACK( FogCoordfEXT
);
114 _glapi_Dispatch
->FogCoordfEXT( f
);
117 static void GLAPIENTRY
TAG(FogCoordfvEXT
)( const GLfloat
*v
)
119 PRE_LOOPBACK( FogCoordfvEXT
);
120 _glapi_Dispatch
->FogCoordfvEXT( v
);
123 static void GLAPIENTRY
TAG(Indexf
)( GLfloat f
)
125 PRE_LOOPBACK( Indexf
);
126 _glapi_Dispatch
->Indexf( f
);
129 static void GLAPIENTRY
TAG(Indexfv
)( const GLfloat
*v
)
131 PRE_LOOPBACK( Indexfv
);
132 _glapi_Dispatch
->Indexfv( v
);
135 static void GLAPIENTRY
TAG(Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
*v
)
137 PRE_LOOPBACK( Materialfv
);
138 _glapi_Dispatch
->Materialfv( face
, pname
, v
);
141 static void GLAPIENTRY
TAG(MultiTexCoord1fARB
)( GLenum target
, GLfloat a
)
143 PRE_LOOPBACK( MultiTexCoord1fARB
);
144 _glapi_Dispatch
->MultiTexCoord1fARB( target
, a
);
147 static void GLAPIENTRY
TAG(MultiTexCoord1fvARB
)( GLenum target
, const GLfloat
*tc
)
149 PRE_LOOPBACK( MultiTexCoord1fvARB
);
150 _glapi_Dispatch
->MultiTexCoord1fvARB( target
, tc
);
153 static void GLAPIENTRY
TAG(MultiTexCoord2fARB
)( GLenum target
, GLfloat s
, GLfloat t
)
155 PRE_LOOPBACK( MultiTexCoord2fARB
);
156 _glapi_Dispatch
->MultiTexCoord2fARB( target
, s
, t
);
159 static void GLAPIENTRY
TAG(MultiTexCoord2fvARB
)( GLenum target
, const GLfloat
*tc
)
161 PRE_LOOPBACK( MultiTexCoord2fvARB
);
162 _glapi_Dispatch
->MultiTexCoord2fvARB( target
, tc
);
165 static void GLAPIENTRY
TAG(MultiTexCoord3fARB
)( GLenum target
, GLfloat s
,
166 GLfloat t
, GLfloat r
)
168 PRE_LOOPBACK( MultiTexCoord3fARB
);
169 _glapi_Dispatch
->MultiTexCoord3fARB( target
, s
, t
, r
);
172 static void GLAPIENTRY
TAG(MultiTexCoord3fvARB
)( GLenum target
, const GLfloat
*tc
)
174 PRE_LOOPBACK( MultiTexCoord3fvARB
);
175 _glapi_Dispatch
->MultiTexCoord3fvARB( target
, tc
);
178 static void GLAPIENTRY
TAG(MultiTexCoord4fARB
)( GLenum target
, GLfloat s
,
179 GLfloat t
, GLfloat r
, GLfloat q
)
181 PRE_LOOPBACK( MultiTexCoord4fARB
);
182 _glapi_Dispatch
->MultiTexCoord4fARB( target
, s
, t
, r
, q
);
185 static void GLAPIENTRY
TAG(MultiTexCoord4fvARB
)( GLenum target
, const GLfloat
*tc
)
187 PRE_LOOPBACK( MultiTexCoord4fvARB
);
188 _glapi_Dispatch
->MultiTexCoord4fvARB( target
, tc
);
191 static void GLAPIENTRY
TAG(Normal3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
193 PRE_LOOPBACK( Normal3f
);
194 _glapi_Dispatch
->Normal3f( x
, y
, z
);
197 static void GLAPIENTRY
TAG(Normal3fv
)( const GLfloat
*v
)
199 PRE_LOOPBACK( Normal3fv
);
200 _glapi_Dispatch
->Normal3fv( v
);
203 static void GLAPIENTRY
TAG(SecondaryColor3fEXT
)( GLfloat r
, GLfloat g
, GLfloat b
)
205 PRE_LOOPBACK( SecondaryColor3fEXT
);
206 _glapi_Dispatch
->SecondaryColor3fEXT( r
, g
, b
);
209 static void GLAPIENTRY
TAG(SecondaryColor3fvEXT
)( const GLfloat
*v
)
211 PRE_LOOPBACK( SecondaryColor3fvEXT
);
212 _glapi_Dispatch
->SecondaryColor3fvEXT( v
);
215 static void GLAPIENTRY
TAG(TexCoord1f
)( GLfloat s
)
217 PRE_LOOPBACK( TexCoord1f
);
218 _glapi_Dispatch
->TexCoord1f( s
);
221 static void GLAPIENTRY
TAG(TexCoord1fv
)( const GLfloat
*tc
)
223 PRE_LOOPBACK( TexCoord1fv
);
224 _glapi_Dispatch
->TexCoord1fv( tc
);
227 static void GLAPIENTRY
TAG(TexCoord2f
)( GLfloat s
, GLfloat t
)
229 PRE_LOOPBACK( TexCoord2f
);
230 _glapi_Dispatch
->TexCoord2f( s
, t
);
233 static void GLAPIENTRY
TAG(TexCoord2fv
)( const GLfloat
*tc
)
235 PRE_LOOPBACK( TexCoord2fv
);
236 _glapi_Dispatch
->TexCoord2fv( tc
);
239 static void GLAPIENTRY
TAG(TexCoord3f
)( GLfloat s
, GLfloat t
, GLfloat r
)
241 PRE_LOOPBACK( TexCoord3f
);
242 _glapi_Dispatch
->TexCoord3f( s
, t
, r
);
245 static void GLAPIENTRY
TAG(TexCoord3fv
)( const GLfloat
*tc
)
247 PRE_LOOPBACK( TexCoord3fv
);
248 _glapi_Dispatch
->TexCoord3fv( tc
);
251 static void GLAPIENTRY
TAG(TexCoord4f
)( GLfloat s
, GLfloat t
, GLfloat r
, GLfloat q
)
253 PRE_LOOPBACK( TexCoord4f
);
254 _glapi_Dispatch
->TexCoord4f( s
, t
, r
, q
);
257 static void GLAPIENTRY
TAG(TexCoord4fv
)( const GLfloat
*tc
)
259 PRE_LOOPBACK( TexCoord4fv
);
260 _glapi_Dispatch
->TexCoord4fv( tc
);
263 static void GLAPIENTRY
TAG(Vertex2f
)( GLfloat x
, GLfloat y
)
265 PRE_LOOPBACK( Vertex2f
);
266 _glapi_Dispatch
->Vertex2f( x
, y
);
269 static void GLAPIENTRY
TAG(Vertex2fv
)( const GLfloat
*v
)
271 PRE_LOOPBACK( Vertex2fv
);
272 _glapi_Dispatch
->Vertex2fv( v
);
275 static void GLAPIENTRY
TAG(Vertex3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
277 PRE_LOOPBACK( Vertex3f
);
278 _glapi_Dispatch
->Vertex3f( x
, y
, z
);
281 static void GLAPIENTRY
TAG(Vertex3fv
)( const GLfloat
*v
)
283 PRE_LOOPBACK( Vertex3fv
);
284 _glapi_Dispatch
->Vertex3fv( v
);
287 static void GLAPIENTRY
TAG(Vertex4f
)( GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
289 PRE_LOOPBACK( Vertex4f
);
290 _glapi_Dispatch
->Vertex4f( x
, y
, z
, w
);
293 static void GLAPIENTRY
TAG(Vertex4fv
)( const GLfloat
*v
)
295 PRE_LOOPBACK( Vertex4fv
);
296 _glapi_Dispatch
->Vertex4fv( v
);
299 static void GLAPIENTRY
TAG(CallList
)( GLuint i
)
301 PRE_LOOPBACK( CallList
);
302 _glapi_Dispatch
->CallList( i
);
305 static void GLAPIENTRY
TAG(CallLists
)( GLsizei sz
, GLenum type
, const GLvoid
*v
)
307 PRE_LOOPBACK( CallLists
);
308 _glapi_Dispatch
->CallLists( sz
, type
, v
);
311 static void GLAPIENTRY
TAG(Begin
)( GLenum mode
)
313 PRE_LOOPBACK( Begin
);
314 _glapi_Dispatch
->Begin( mode
);
317 static void GLAPIENTRY
TAG(End
)( void )
320 _glapi_Dispatch
->End();
323 static void GLAPIENTRY
TAG(Rectf
)( GLfloat x1
, GLfloat y1
, GLfloat x2
, GLfloat y2
)
325 PRE_LOOPBACK( Rectf
);
326 _glapi_Dispatch
->Rectf( x1
, y1
, x2
, y2
);
329 static void GLAPIENTRY
TAG(DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
)
331 PRE_LOOPBACK( DrawArrays
);
332 _glapi_Dispatch
->DrawArrays( mode
, start
, count
);
335 static void GLAPIENTRY
TAG(DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
336 const GLvoid
*indices
)
338 PRE_LOOPBACK( DrawElements
);
339 _glapi_Dispatch
->DrawElements( mode
, count
, type
, indices
);
342 static void GLAPIENTRY
TAG(DrawRangeElements
)( GLenum mode
, GLuint start
,
343 GLuint end
, GLsizei count
,
344 GLenum type
, const GLvoid
*indices
)
346 PRE_LOOPBACK( DrawRangeElements
);
347 _glapi_Dispatch
->DrawRangeElements( mode
, start
, end
, count
, type
, indices
);
350 static void GLAPIENTRY
TAG(EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
)
352 PRE_LOOPBACK( EvalMesh1
);
353 _glapi_Dispatch
->EvalMesh1( mode
, i1
, i2
);
356 static void GLAPIENTRY
TAG(EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
,
359 PRE_LOOPBACK( EvalMesh2
);
360 _glapi_Dispatch
->EvalMesh2( mode
, i1
, i2
, j1
, j2
);
363 static void GLAPIENTRY
TAG(VertexAttrib1fNV
)( GLuint index
, GLfloat x
)
365 PRE_LOOPBACK( VertexAttrib1fNV
);
366 _glapi_Dispatch
->VertexAttrib1fNV( index
, x
);
369 static void GLAPIENTRY
TAG(VertexAttrib1fvNV
)( GLuint index
, const GLfloat
*v
)
371 PRE_LOOPBACK( VertexAttrib1fvNV
);
372 _glapi_Dispatch
->VertexAttrib1fvNV( index
, v
);
375 static void GLAPIENTRY
TAG(VertexAttrib2fNV
)( GLuint index
, GLfloat x
, GLfloat y
)
377 PRE_LOOPBACK( VertexAttrib2fNV
);
378 _glapi_Dispatch
->VertexAttrib2fNV( index
, x
, y
);
381 static void GLAPIENTRY
TAG(VertexAttrib2fvNV
)( GLuint index
, const GLfloat
*v
)
383 PRE_LOOPBACK( VertexAttrib2fvNV
);
384 _glapi_Dispatch
->VertexAttrib2fvNV( index
, v
);
387 static void GLAPIENTRY
TAG(VertexAttrib3fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
389 PRE_LOOPBACK( VertexAttrib3fNV
);
390 _glapi_Dispatch
->VertexAttrib3fNV( index
, x
, y
, z
);
393 static void GLAPIENTRY
TAG(VertexAttrib3fvNV
)( GLuint index
, const GLfloat
*v
)
395 PRE_LOOPBACK( VertexAttrib3fvNV
);
396 _glapi_Dispatch
->VertexAttrib3fvNV( index
, v
);
399 static void GLAPIENTRY
TAG(VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
401 PRE_LOOPBACK( VertexAttrib4fNV
);
402 _glapi_Dispatch
->VertexAttrib4fNV( index
, x
, y
, z
, w
);
405 static void GLAPIENTRY
TAG(VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
)
407 PRE_LOOPBACK( VertexAttrib4fvNV
);
408 _glapi_Dispatch
->VertexAttrib4fvNV( index
, v
);
412 static GLvertexformat
TAG(vtxfmt
) = {
431 TAG(MultiTexCoord1fARB
),
432 TAG(MultiTexCoord1fvARB
),
433 TAG(MultiTexCoord2fARB
),
434 TAG(MultiTexCoord2fvARB
),
435 TAG(MultiTexCoord3fARB
),
436 TAG(MultiTexCoord3fvARB
),
437 TAG(MultiTexCoord4fARB
),
438 TAG(MultiTexCoord4fvARB
),
441 TAG(SecondaryColor3fEXT
),
442 TAG(SecondaryColor3fvEXT
),
461 TAG(VertexAttrib1fNV
),
462 TAG(VertexAttrib1fvNV
),
463 TAG(VertexAttrib2fNV
),
464 TAG(VertexAttrib2fvNV
),
465 TAG(VertexAttrib3fNV
),
466 TAG(VertexAttrib3fvNV
),
467 TAG(VertexAttrib4fNV
),
468 TAG(VertexAttrib4fvNV
),
472 TAG(DrawRangeElements
),