3f4a9cefed4181974063581b9ebe81e9f7c50953
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 TAG(ArrayElement
)( GLint i
)
35 PRE_LOOPBACK( ArrayElement
);
36 _glapi_Dispatch
->ArrayElement( i
);
39 static void TAG(Color3f
)( GLfloat r
, GLfloat g
, GLfloat b
)
41 PRE_LOOPBACK( Color3f
);
42 _glapi_Dispatch
->Color3f( r
, g
, b
);
45 static void TAG(Color3fv
)( const GLfloat
*v
)
47 PRE_LOOPBACK( Color3fv
);
48 _glapi_Dispatch
->Color3fv( v
);
51 static void TAG(Color3ub
)( GLubyte r
, GLubyte g
, GLubyte b
)
53 PRE_LOOPBACK( Color3ub
);
54 _glapi_Dispatch
->Color3ub( r
, g
, b
);
57 static void TAG(Color3ubv
)( const GLubyte
*v
)
59 PRE_LOOPBACK( Color3ubv
);
60 _glapi_Dispatch
->Color3ubv( v
);
63 static void TAG(Color4f
)( GLfloat r
, GLfloat g
, GLfloat b
, GLfloat a
)
65 PRE_LOOPBACK( Color4f
);
66 _glapi_Dispatch
->Color4f( r
, g
, b
, a
);
69 static void TAG(Color4fv
)( const GLfloat
*v
)
71 PRE_LOOPBACK( Color4fv
);
72 _glapi_Dispatch
->Color4fv( v
);
75 static void TAG(Color4ub
)( GLubyte r
, GLubyte g
, GLubyte b
, GLubyte a
)
77 PRE_LOOPBACK( Color4ub
);
78 _glapi_Dispatch
->Color4ub( r
, g
, b
, a
);
81 static void TAG(Color4ubv
)( const GLubyte
*v
)
83 PRE_LOOPBACK( Color4ubv
);
84 _glapi_Dispatch
->Color4ubv( v
);
87 static void TAG(EdgeFlag
)( GLboolean e
)
89 PRE_LOOPBACK( EdgeFlag
);
90 _glapi_Dispatch
->EdgeFlag( e
);
93 static void TAG(EdgeFlagv
)( const GLboolean
*v
)
95 PRE_LOOPBACK( EdgeFlagv
);
96 _glapi_Dispatch
->EdgeFlagv( v
);
99 static void TAG(EvalCoord1f
)( GLfloat s
)
101 PRE_LOOPBACK( EvalCoord1f
);
102 _glapi_Dispatch
->EvalCoord1f( s
);
105 static void TAG(EvalCoord1fv
)( const GLfloat
*v
)
107 PRE_LOOPBACK( EvalCoord1fv
);
108 _glapi_Dispatch
->EvalCoord1fv( v
);
111 static void TAG(EvalCoord2f
)( GLfloat s
, GLfloat t
)
113 PRE_LOOPBACK( EvalCoord2f
);
114 _glapi_Dispatch
->EvalCoord2f( s
, t
);
117 static void TAG(EvalCoord2fv
)( const GLfloat
*v
)
119 PRE_LOOPBACK( EvalCoord2fv
);
120 _glapi_Dispatch
->EvalCoord2fv( v
);
123 static void TAG(EvalPoint1
)( GLint i
)
125 PRE_LOOPBACK( EvalPoint1
);
126 _glapi_Dispatch
->EvalPoint1( i
);
129 static void TAG(EvalPoint2
)( GLint i
, GLint j
)
131 PRE_LOOPBACK( EvalPoint2
);
132 _glapi_Dispatch
->EvalPoint2( i
, j
);
135 static void TAG(FogCoordfEXT
)( GLfloat f
)
137 PRE_LOOPBACK( FogCoordfEXT
);
138 _glapi_Dispatch
->FogCoordfEXT( f
);
141 static void TAG(FogCoordfvEXT
)( const GLfloat
*v
)
143 PRE_LOOPBACK( FogCoordfvEXT
);
144 _glapi_Dispatch
->FogCoordfvEXT( v
);
147 static void TAG(Indexi
)( GLint i
)
149 PRE_LOOPBACK( Indexi
);
150 _glapi_Dispatch
->Indexi( i
);
153 static void TAG(Indexiv
)( const GLint
*v
)
155 PRE_LOOPBACK( Indexiv
);
156 _glapi_Dispatch
->Indexiv( v
);
159 static void TAG(Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
*v
)
161 PRE_LOOPBACK( Materialfv
);
162 _glapi_Dispatch
->Materialfv( face
, pname
, v
);
165 static void TAG(MultiTexCoord1fARB
)( GLenum target
, GLfloat a
)
167 PRE_LOOPBACK( MultiTexCoord1fARB
);
168 _glapi_Dispatch
->MultiTexCoord1fARB( target
, a
);
171 static void TAG(MultiTexCoord1fvARB
)( GLenum target
, const GLfloat
*tc
)
173 PRE_LOOPBACK( MultiTexCoord1fvARB
);
174 _glapi_Dispatch
->MultiTexCoord1fvARB( target
, tc
);
177 static void TAG(MultiTexCoord2fARB
)( GLenum target
, GLfloat s
, GLfloat t
)
179 PRE_LOOPBACK( MultiTexCoord2fARB
);
180 _glapi_Dispatch
->MultiTexCoord2fARB( target
, s
, t
);
183 static void TAG(MultiTexCoord2fvARB
)( GLenum target
, const GLfloat
*tc
)
185 PRE_LOOPBACK( MultiTexCoord2fvARB
);
186 _glapi_Dispatch
->MultiTexCoord2fvARB( target
, tc
);
189 static void TAG(MultiTexCoord3fARB
)( GLenum target
, GLfloat s
,
190 GLfloat t
, GLfloat r
)
192 PRE_LOOPBACK( MultiTexCoord3fARB
);
193 _glapi_Dispatch
->MultiTexCoord3fARB( target
, s
, t
, r
);
196 static void TAG(MultiTexCoord3fvARB
)( GLenum target
, const GLfloat
*tc
)
198 PRE_LOOPBACK( MultiTexCoord3fvARB
);
199 _glapi_Dispatch
->MultiTexCoord3fvARB( target
, tc
);
202 static void TAG(MultiTexCoord4fARB
)( GLenum target
, GLfloat s
,
203 GLfloat t
, GLfloat r
, GLfloat q
)
205 PRE_LOOPBACK( MultiTexCoord4fARB
);
206 _glapi_Dispatch
->MultiTexCoord4fARB( target
, s
, t
, r
, q
);
209 static void TAG(MultiTexCoord4fvARB
)( GLenum target
, const GLfloat
*tc
)
211 PRE_LOOPBACK( MultiTexCoord4fvARB
);
212 _glapi_Dispatch
->MultiTexCoord4fvARB( target
, tc
);
215 static void TAG(Normal3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
217 PRE_LOOPBACK( Normal3f
);
218 _glapi_Dispatch
->Normal3f( x
, y
, z
);
221 static void TAG(Normal3fv
)( const GLfloat
*v
)
223 PRE_LOOPBACK( Normal3fv
);
224 _glapi_Dispatch
->Normal3fv( v
);
227 static void TAG(SecondaryColor3fEXT
)( GLfloat r
, GLfloat g
, GLfloat b
)
229 PRE_LOOPBACK( SecondaryColor3fEXT
);
230 _glapi_Dispatch
->SecondaryColor3fEXT( r
, g
, b
);
233 static void TAG(SecondaryColor3fvEXT
)( const GLfloat
*v
)
235 PRE_LOOPBACK( SecondaryColor3fvEXT
);
236 _glapi_Dispatch
->SecondaryColor3fvEXT( v
);
239 static void TAG(SecondaryColor3ubEXT
)( GLubyte r
, GLubyte g
, GLubyte b
)
241 PRE_LOOPBACK( SecondaryColor3ubEXT
);
242 _glapi_Dispatch
->SecondaryColor3ubEXT( r
, g
, b
);
245 static void TAG(SecondaryColor3ubvEXT
)( const GLubyte
*v
)
247 PRE_LOOPBACK( SecondaryColor3ubvEXT
);
248 _glapi_Dispatch
->SecondaryColor3ubvEXT( v
);
251 static void TAG(TexCoord1f
)( GLfloat s
)
253 PRE_LOOPBACK( TexCoord1f
);
254 _glapi_Dispatch
->TexCoord1f( s
);
257 static void TAG(TexCoord1fv
)( const GLfloat
*tc
)
259 PRE_LOOPBACK( TexCoord1fv
);
260 _glapi_Dispatch
->TexCoord1fv( tc
);
263 static void TAG(TexCoord2f
)( GLfloat s
, GLfloat t
)
265 PRE_LOOPBACK( TexCoord2f
);
266 _glapi_Dispatch
->TexCoord2f( s
, t
);
269 static void TAG(TexCoord2fv
)( const GLfloat
*tc
)
271 PRE_LOOPBACK( TexCoord2fv
);
272 _glapi_Dispatch
->TexCoord2fv( tc
);
275 static void TAG(TexCoord3f
)( GLfloat s
, GLfloat t
, GLfloat r
)
277 PRE_LOOPBACK( TexCoord3f
);
278 _glapi_Dispatch
->TexCoord3f( s
, t
, r
);
281 static void TAG(TexCoord3fv
)( const GLfloat
*tc
)
283 PRE_LOOPBACK( TexCoord3fv
);
284 _glapi_Dispatch
->TexCoord3fv( tc
);
287 static void TAG(TexCoord4f
)( GLfloat s
, GLfloat t
, GLfloat r
, GLfloat q
)
289 PRE_LOOPBACK( TexCoord4f
);
290 _glapi_Dispatch
->TexCoord4f( s
, t
, r
, q
);
293 static void TAG(TexCoord4fv
)( const GLfloat
*tc
)
295 PRE_LOOPBACK( TexCoord4fv
);
296 _glapi_Dispatch
->TexCoord4fv( tc
);
299 static void TAG(Vertex2f
)( GLfloat x
, GLfloat y
)
301 PRE_LOOPBACK( Vertex2f
);
302 _glapi_Dispatch
->Vertex2f( x
, y
);
305 static void TAG(Vertex2fv
)( const GLfloat
*v
)
307 PRE_LOOPBACK( Vertex2fv
);
308 _glapi_Dispatch
->Vertex2fv( v
);
311 static void TAG(Vertex3f
)( GLfloat x
, GLfloat y
, GLfloat z
)
313 PRE_LOOPBACK( Vertex3f
);
314 _glapi_Dispatch
->Vertex3f( x
, y
, z
);
317 static void TAG(Vertex3fv
)( const GLfloat
*v
)
319 PRE_LOOPBACK( Vertex3fv
);
320 _glapi_Dispatch
->Vertex3fv( v
);
323 static void TAG(Vertex4f
)( GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
325 PRE_LOOPBACK( Vertex4f
);
326 _glapi_Dispatch
->Vertex4f( x
, y
, z
, w
);
329 static void TAG(Vertex4fv
)( const GLfloat
*v
)
331 PRE_LOOPBACK( Vertex4fv
);
332 _glapi_Dispatch
->Vertex4fv( v
);
335 static void TAG(CallList
)( GLuint i
)
337 PRE_LOOPBACK( CallList
);
338 _glapi_Dispatch
->CallList( i
);
341 static void TAG(Begin
)( GLenum mode
)
343 PRE_LOOPBACK( Begin
);
344 _glapi_Dispatch
->Begin( mode
);
347 static void TAG(End
)( void )
350 _glapi_Dispatch
->End();
353 static void TAG(Rectf
)( GLfloat x1
, GLfloat y1
, GLfloat x2
, GLfloat y2
)
355 PRE_LOOPBACK( Rectf
);
356 _glapi_Dispatch
->Rectf( x1
, y1
, x2
, y2
);
359 static void TAG(DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
)
361 PRE_LOOPBACK( DrawArrays
);
362 _glapi_Dispatch
->DrawArrays( mode
, start
, count
);
365 static void TAG(DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
366 const GLvoid
*indices
)
368 PRE_LOOPBACK( DrawElements
);
369 _glapi_Dispatch
->DrawElements( mode
, count
, type
, indices
);
372 static void TAG(DrawRangeElements
)( GLenum mode
, GLuint start
,
373 GLuint end
, GLsizei count
,
374 GLenum type
, const GLvoid
*indices
)
376 PRE_LOOPBACK( DrawRangeElements
);
377 _glapi_Dispatch
->DrawRangeElements( mode
, start
, end
, count
, type
, indices
);
380 static void TAG(EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
)
382 PRE_LOOPBACK( EvalMesh1
);
383 _glapi_Dispatch
->EvalMesh1( mode
, i1
, i2
);
386 static void TAG(EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
,
389 PRE_LOOPBACK( EvalMesh2
);
390 _glapi_Dispatch
->EvalMesh2( mode
, i1
, i2
, j1
, j2
);
393 static void TAG(VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
)
395 PRE_LOOPBACK( VertexAttrib4fNV
);
396 _glapi_Dispatch
->VertexAttrib4fNV( index
, x
, y
, z
, w
);
399 static void TAG(VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
)
401 PRE_LOOPBACK( VertexAttrib4fvNV
);
402 _glapi_Dispatch
->VertexAttrib4fvNV( index
, v
);
406 static GLvertexformat
TAG(vtxfmt
) = {
429 TAG(MultiTexCoord1fARB
),
430 TAG(MultiTexCoord1fvARB
),
431 TAG(MultiTexCoord2fARB
),
432 TAG(MultiTexCoord2fvARB
),
433 TAG(MultiTexCoord3fARB
),
434 TAG(MultiTexCoord3fvARB
),
435 TAG(MultiTexCoord4fARB
),
436 TAG(MultiTexCoord4fvARB
),
439 TAG(SecondaryColor3fEXT
),
440 TAG(SecondaryColor3fvEXT
),
441 TAG(SecondaryColor3ubEXT
),
442 TAG(SecondaryColor3ubvEXT
),
460 TAG(VertexAttrib4fNV
),
461 TAG(VertexAttrib4fvNV
),
465 TAG(DrawRangeElements
),