1 /* $Id: vtxfmt_tmp.h,v 1.5 2001/11/18 22:48:13 brianp Exp $ */
4 * Mesa 3-D graphics library
7 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 * Gareth Hughes <gareth@valinux.com>
31 #define PRE_LOOPBACK( FUNC )
34 static void TAG(ArrayElement
)( GLint i
)
36 PRE_LOOPBACK( ArrayElement
);
40 static void TAG(Color3f
)( GLfloat a
, GLfloat b
, GLfloat c
)
42 PRE_LOOPBACK( Color3f
);
46 static void TAG(Color3fv
)( const GLfloat
*v
)
48 PRE_LOOPBACK( Color3fv
);
52 static void TAG(Color3ub
)( GLubyte a
, GLubyte b
, GLubyte c
)
54 PRE_LOOPBACK( Color3ub
);
55 glColor3ub( a
, b
, c
);
58 static void TAG(Color3ubv
)( const GLubyte
*v
)
60 PRE_LOOPBACK( Color3ubv
);
64 static void TAG(Color4f
)( GLfloat a
, GLfloat b
, GLfloat c
, GLfloat d
)
66 PRE_LOOPBACK( Color4f
);
67 glColor4f( a
, b
, c
, d
);
70 static void TAG(Color4fv
)( const GLfloat
*v
)
72 PRE_LOOPBACK( Color4fv
);
76 static void TAG(Color4ub
)( GLubyte a
, GLubyte b
, GLubyte c
, GLubyte d
)
78 PRE_LOOPBACK( Color4ub
);
79 glColor4ub( a
, b
, c
, d
);
82 static void TAG(Color4ubv
)( const GLubyte
*v
)
84 PRE_LOOPBACK( Color4ubv
);
88 static void TAG(EdgeFlag
)( GLboolean a
)
90 PRE_LOOPBACK( EdgeFlag
);
94 static void TAG(EdgeFlagv
)( const GLboolean
*v
)
96 PRE_LOOPBACK( EdgeFlagv
);
100 static void TAG(EvalCoord1f
)( GLfloat a
)
102 PRE_LOOPBACK( EvalCoord1f
);
106 static void TAG(EvalCoord1fv
)( const GLfloat
*v
)
108 PRE_LOOPBACK( EvalCoord1fv
);
112 static void TAG(EvalCoord2f
)( GLfloat a
, GLfloat b
)
114 PRE_LOOPBACK( EvalCoord2f
);
115 glEvalCoord2f( a
, b
);
118 static void TAG(EvalCoord2fv
)( const GLfloat
*v
)
120 PRE_LOOPBACK( EvalCoord2fv
);
124 static void TAG(EvalPoint1
)( GLint a
)
126 PRE_LOOPBACK( EvalPoint1
);
130 static void TAG(EvalPoint2
)( GLint a
, GLint b
)
132 PRE_LOOPBACK( EvalPoint2
);
133 glEvalPoint2( a
, b
);
136 static void TAG(FogCoordfEXT
)( GLfloat a
)
138 PRE_LOOPBACK( FogCoordfEXT
);
142 static void TAG(FogCoordfvEXT
)( const GLfloat
*v
)
144 PRE_LOOPBACK( FogCoordfvEXT
);
145 glFogCoordfvEXT( v
);
148 static void TAG(Indexi
)( GLint a
)
150 PRE_LOOPBACK( Indexi
);
154 static void TAG(Indexiv
)( const GLint
*v
)
156 PRE_LOOPBACK( Indexiv
);
160 static void TAG(Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
*v
)
162 PRE_LOOPBACK( Materialfv
);
163 glMaterialfv( face
, pname
, v
);
166 static void TAG(MultiTexCoord1f
)( GLenum target
, GLfloat a
)
168 PRE_LOOPBACK( MultiTexCoord1f
);
169 glMultiTexCoord1f( target
, a
);
172 static void TAG(MultiTexCoord1fv
)( GLenum target
, const GLfloat
*tc
)
174 PRE_LOOPBACK( MultiTexCoord1fv
);
175 glMultiTexCoord1fv( target
, tc
);
178 static void TAG(MultiTexCoord2f
)( GLenum target
, GLfloat a
, GLfloat b
)
180 PRE_LOOPBACK( MultiTexCoord2f
);
181 glMultiTexCoord2f( target
, a
, b
);
184 static void TAG(MultiTexCoord2fv
)( GLenum target
, const GLfloat
*tc
)
186 PRE_LOOPBACK( MultiTexCoord2fv
);
187 glMultiTexCoord2fv( target
, tc
);
190 static void TAG(MultiTexCoord3f
)( GLenum target
, GLfloat a
,
191 GLfloat b
, GLfloat c
)
193 PRE_LOOPBACK( MultiTexCoord3f
);
194 glMultiTexCoord3f( target
, a
, b
, c
);
197 static void TAG(MultiTexCoord3fv
)( GLenum target
, const GLfloat
*tc
)
199 PRE_LOOPBACK( MultiTexCoord3fv
);
200 glMultiTexCoord3fv( target
, tc
);
203 static void TAG(MultiTexCoord4f
)( GLenum target
, GLfloat a
,
204 GLfloat b
, GLfloat c
, GLfloat d
)
206 PRE_LOOPBACK( MultiTexCoord4f
);
207 glMultiTexCoord4f( target
, a
, b
, c
, d
);
210 static void TAG(MultiTexCoord4fv
)( GLenum target
, const GLfloat
*tc
)
212 PRE_LOOPBACK( MultiTexCoord4fv
);
213 glMultiTexCoord4fv( target
, tc
);
216 static void TAG(Normal3f
)( GLfloat a
, GLfloat b
, GLfloat c
)
218 PRE_LOOPBACK( Normal3f
);
219 glNormal3f( a
, b
, c
);
222 static void TAG(Normal3fv
)( const GLfloat
*v
)
224 PRE_LOOPBACK( Normal3fv
);
228 static void TAG(SecondaryColor3fEXT
)( GLfloat a
, GLfloat b
, GLfloat c
)
230 PRE_LOOPBACK( SecondaryColor3fEXT
);
231 glSecondaryColor3fEXT( a
, b
, c
);
234 static void TAG(SecondaryColor3fvEXT
)( const GLfloat
*v
)
236 PRE_LOOPBACK( SecondaryColor3fvEXT
);
237 glSecondaryColor3fvEXT( v
);
240 static void TAG(SecondaryColor3ubEXT
)( GLubyte a
, GLubyte b
, GLubyte c
)
242 PRE_LOOPBACK( SecondaryColor3ubEXT
);
243 glSecondaryColor3ubEXT( a
, b
, c
);
246 static void TAG(SecondaryColor3ubvEXT
)( const GLubyte
*v
)
248 PRE_LOOPBACK( SecondaryColor3ubvEXT
);
249 glSecondaryColor3ubvEXT( v
);
252 static void TAG(TexCoord1f
)( GLfloat a
)
254 PRE_LOOPBACK( TexCoord1f
);
258 static void TAG(TexCoord1fv
)( const GLfloat
*tc
)
260 PRE_LOOPBACK( TexCoord1fv
);
264 static void TAG(TexCoord2f
)( GLfloat a
, GLfloat b
)
266 PRE_LOOPBACK( TexCoord2f
);
267 glTexCoord2f( a
, b
);
270 static void TAG(TexCoord2fv
)( const GLfloat
*tc
)
272 PRE_LOOPBACK( TexCoord2fv
);
276 static void TAG(TexCoord3f
)( GLfloat a
, GLfloat b
, GLfloat c
)
278 PRE_LOOPBACK( TexCoord3f
);
279 glTexCoord3f( a
, b
, c
);
282 static void TAG(TexCoord3fv
)( const GLfloat
*tc
)
284 PRE_LOOPBACK( TexCoord3fv
);
288 static void TAG(TexCoord4f
)( GLfloat a
, GLfloat b
, GLfloat c
, GLfloat d
)
290 PRE_LOOPBACK( TexCoord4f
);
291 glTexCoord4f( a
, b
, c
, d
);
294 static void TAG(TexCoord4fv
)( const GLfloat
*tc
)
296 PRE_LOOPBACK( TexCoord4fv
);
300 static void TAG(Vertex2f
)( GLfloat a
, GLfloat b
)
302 PRE_LOOPBACK( Vertex2f
);
306 static void TAG(Vertex2fv
)( const GLfloat
*obj
)
308 PRE_LOOPBACK( Vertex2fv
);
312 static void TAG(Vertex3f
)( GLfloat a
, GLfloat b
, GLfloat c
)
314 PRE_LOOPBACK( Vertex3f
);
315 glVertex3f( a
, b
, c
);
318 static void TAG(Vertex3fv
)( const GLfloat
*obj
)
320 PRE_LOOPBACK( Vertex3fv
);
324 static void TAG(Vertex4f
)( GLfloat a
, GLfloat b
, GLfloat c
, GLfloat d
)
326 PRE_LOOPBACK( Vertex4f
);
327 glVertex4f( a
, b
, c
, d
);
330 static void TAG(Vertex4fv
)( const GLfloat
*obj
)
332 PRE_LOOPBACK( Vertex4fv
);
336 static void TAG(CallList
)( GLuint i
)
338 PRE_LOOPBACK( CallList
);
342 static void TAG(Begin
)( GLenum mode
)
344 PRE_LOOPBACK( Begin
);
348 static void TAG(End
)( void )
354 static void TAG(Rectf
)( GLfloat x1
, GLfloat y1
, GLfloat x2
, GLfloat y2
)
356 PRE_LOOPBACK( Rectf
);
357 glRectf( x1
, y1
, x2
, y2
);
360 static void TAG(DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
)
362 PRE_LOOPBACK( DrawArrays
);
363 glDrawArrays( mode
, start
, count
);
366 static void TAG(DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
367 const void *indices
)
369 PRE_LOOPBACK( DrawElements
);
370 glDrawElements( mode
, count
, type
, indices
);
373 static void TAG(DrawRangeElements
)( GLenum mode
, GLuint start
,
374 GLuint end
, GLsizei count
,
375 GLenum type
, const void *indices
)
377 PRE_LOOPBACK( DrawRangeElements
);
378 glDrawRangeElements( mode
, start
, end
, count
, type
, indices
);
381 static void TAG(EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
)
383 PRE_LOOPBACK( EvalMesh1
);
384 glEvalMesh1( mode
, i1
, i2
);
387 static void TAG(EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
,
390 PRE_LOOPBACK( EvalMesh2
);
391 glEvalMesh2( mode
, i1
, i2
, j1
, j2
);
395 static GLvertexformat
TAG(vtxfmt
) = {
418 TAG(MultiTexCoord1f
),
419 TAG(MultiTexCoord1fv
),
420 TAG(MultiTexCoord2f
),
421 TAG(MultiTexCoord2fv
),
422 TAG(MultiTexCoord3f
),
423 TAG(MultiTexCoord3fv
),
424 TAG(MultiTexCoord4f
),
425 TAG(MultiTexCoord4fv
),
428 TAG(SecondaryColor3fEXT
),
429 TAG(SecondaryColor3fvEXT
),
430 TAG(SecondaryColor3ubEXT
),
431 TAG(SecondaryColor3ubvEXT
),
452 TAG(DrawRangeElements
),