blob: 924d7134a2701fbd38fb695c6c055c308f4fd48b [file] [log] [blame]
Keith Whitwell6dc85572003-07-17 13:43:59 +00001/**
2 * \file api_loopback.c
3 *
4 * \author Keith Whitwell <keith@tungstengraphics.com>
5 */
6
Brian Paul50478de2000-11-27 18:17:09 +00007/*
8 * Mesa 3-D graphics library
Brian Paul7faf5192004-10-29 04:00:50 +00009 * Version: 6.3
Gareth Hughes22144ab2001-03-12 00:48:37 +000010 *
Brian Paule98986b2004-01-21 04:13:49 +000011 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
Gareth Hughes22144ab2001-03-12 00:48:37 +000012 *
Brian Paul50478de2000-11-27 18:17:09 +000013 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
Gareth Hughes22144ab2001-03-12 00:48:37 +000019 *
Brian Paul50478de2000-11-27 18:17:09 +000020 * The above copyright notice and this permission notice shall be included
21 * in all copies or substantial portions of the Software.
Gareth Hughes22144ab2001-03-12 00:48:37 +000022 *
Brian Paul50478de2000-11-27 18:17:09 +000023 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
27 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Brian Paul50478de2000-11-27 18:17:09 +000029 */
30
31
Keith Whitwellb0149862000-11-24 10:30:04 +000032#include "glheader.h"
Keith Whitwellb0149862000-11-24 10:30:04 +000033#include "macros.h"
34#include "colormac.h"
35#include "api_loopback.h"
Ian Romanick9bdfee32005-07-18 12:31:24 +000036#include "mtypes.h"
Brianc223c6b2007-07-04 13:15:20 -060037#include "glapi/glapi.h"
38#include "glapi/glapitable.h"
39#include "glapi/glthread.h"
40#include "glapi/dispatch.h"
Keith Whitwellb0149862000-11-24 10:30:04 +000041
42/* KW: A set of functions to convert unusual Color/Normal/Vertex/etc
43 * calls to a smaller set of driver-provided formats. Currently just
44 * go back to dispatch to find these (eg. call glNormal3f directly),
45 * hence 'loopback'.
46 *
47 * The driver must supply all of the remaining entry points, which are
Keith Whitwell9aff6cf2000-11-24 15:21:59 +000048 * listed in dd.h. The easiest way for a driver to do this is to
Keith Whitwellb0149862000-11-24 10:30:04 +000049 * install the supplied software t&l module.
50 */
Ian Romanick9bdfee32005-07-18 12:31:24 +000051#define COLORF(r,g,b,a) CALL_Color4f(GET_DISPATCH(), (r,g,b,a))
52#define VERTEX2(x,y) CALL_Vertex2f(GET_DISPATCH(), (x,y))
53#define VERTEX3(x,y,z) CALL_Vertex3f(GET_DISPATCH(), (x,y,z))
54#define VERTEX4(x,y,z,w) CALL_Vertex4f(GET_DISPATCH(), (x,y,z,w))
55#define NORMAL(x,y,z) CALL_Normal3f(GET_DISPATCH(), (x,y,z))
56#define TEXCOORD1(s) CALL_TexCoord1f(GET_DISPATCH(), (s))
57#define TEXCOORD2(s,t) CALL_TexCoord2f(GET_DISPATCH(), (s,t))
58#define TEXCOORD3(s,t,u) CALL_TexCoord3f(GET_DISPATCH(), (s,t,u))
59#define TEXCOORD4(s,t,u,v) CALL_TexCoord4f(GET_DISPATCH(), (s,t,u,v))
60#define INDEX(c) CALL_Indexf(GET_DISPATCH(), (c))
61#define MULTI_TEXCOORD1(z,s) CALL_MultiTexCoord1fARB(GET_DISPATCH(), (z,s))
62#define MULTI_TEXCOORD2(z,s,t) CALL_MultiTexCoord2fARB(GET_DISPATCH(), (z,s,t))
63#define MULTI_TEXCOORD3(z,s,t,u) CALL_MultiTexCoord3fARB(GET_DISPATCH(), (z,s,t,u))
64#define MULTI_TEXCOORD4(z,s,t,u,v) CALL_MultiTexCoord4fARB(GET_DISPATCH(), (z,s,t,u,v))
65#define EVALCOORD1(x) CALL_EvalCoord1f(GET_DISPATCH(), (x))
66#define EVALCOORD2(x,y) CALL_EvalCoord2f(GET_DISPATCH(), (x,y))
67#define MATERIALFV(a,b,c) CALL_Materialfv(GET_DISPATCH(), (a,b,c))
68#define RECTF(a,b,c,d) CALL_Rectf(GET_DISPATCH(), (a,b,c,d))
Keith Whitwellfc00cbe2001-12-20 15:30:45 +000069
Ian Romanick9bdfee32005-07-18 12:31:24 +000070#define ATTRIB1NV(index,x) CALL_VertexAttrib1fNV(GET_DISPATCH(), (index,x))
71#define ATTRIB2NV(index,x,y) CALL_VertexAttrib2fNV(GET_DISPATCH(), (index,x,y))
72#define ATTRIB3NV(index,x,y,z) CALL_VertexAttrib3fNV(GET_DISPATCH(), (index,x,y,z))
73#define ATTRIB4NV(index,x,y,z,w) CALL_VertexAttrib4fNV(GET_DISPATCH(), (index,x,y,z,w))
74#define ATTRIB1ARB(index,x) CALL_VertexAttrib1fARB(GET_DISPATCH(), (index,x))
75#define ATTRIB2ARB(index,x,y) CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,x,y))
76#define ATTRIB3ARB(index,x,y,z) CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,x,y,z))
77#define ATTRIB4ARB(index,x,y,z,w) CALL_VertexAttrib4fARB(GET_DISPATCH(), (index,x,y,z,w))
78#define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x))
79#define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c))
Keith Whitwellb0149862000-11-24 10:30:04 +000080
Kendall Bennettc40d1dd2003-10-21 22:22:17 +000081static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +000082loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue )
83{
Gareth Hughes22144ab2001-03-12 00:48:37 +000084 COLORF( BYTE_TO_FLOAT(red),
Keith Whitwellb0149862000-11-24 10:30:04 +000085 BYTE_TO_FLOAT(green),
Gareth Hughes22144ab2001-03-12 00:48:37 +000086 BYTE_TO_FLOAT(blue),
Keith Whitwellb0149862000-11-24 10:30:04 +000087 1.0 );
88}
89
Kendall Bennettc40d1dd2003-10-21 22:22:17 +000090static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +000091loopback_Color3d_f( GLdouble red, GLdouble green, GLdouble blue )
92{
Brian Paul7c276322001-09-14 21:36:43 +000093 COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, 1.0 );
Keith Whitwellb0149862000-11-24 10:30:04 +000094}
95
Kendall Bennettc40d1dd2003-10-21 22:22:17 +000096static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +000097loopback_Color3i_f( GLint red, GLint green, GLint blue )
98{
99 COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
100 INT_TO_FLOAT(blue), 1.0);
101}
102
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000103static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000104loopback_Color3s_f( GLshort red, GLshort green, GLshort blue )
105{
106 COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
107 SHORT_TO_FLOAT(blue), 1.0);
108}
109
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000110static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000111loopback_Color3ui_f( GLuint red, GLuint green, GLuint blue )
112{
113 COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
114 UINT_TO_FLOAT(blue), 1.0 );
115}
116
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000117static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000118loopback_Color3us_f( GLushort red, GLushort green, GLushort blue )
119{
120 COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
121 USHORT_TO_FLOAT(blue), 1.0 );
122}
123
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000124static void GLAPIENTRY
125loopback_Color3ub_f( GLubyte red, GLubyte green, GLubyte blue )
126{
127 COLORF( UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
128 UBYTE_TO_FLOAT(blue), 1.0 );
129}
130
Keith Whitwellb0149862000-11-24 10:30:04 +0000131
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000132static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000133loopback_Color3bv_f( const GLbyte *v )
134{
135 COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
136 BYTE_TO_FLOAT(v[2]), 1.0 );
137}
138
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000139static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000140loopback_Color3dv_f( const GLdouble *v )
141{
Brian Paul7c276322001-09-14 21:36:43 +0000142 COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0 );
Keith Whitwellb0149862000-11-24 10:30:04 +0000143}
144
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000145static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000146loopback_Color3iv_f( const GLint *v )
147{
148 COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
Xiang, Haihaobb59d812007-03-25 21:31:36 +0800149 INT_TO_FLOAT(v[2]), 1.0 );
Keith Whitwellb0149862000-11-24 10:30:04 +0000150}
151
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000152static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000153loopback_Color3sv_f( const GLshort *v )
154{
155 COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
156 SHORT_TO_FLOAT(v[2]), 1.0 );
157}
158
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000159static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000160loopback_Color3uiv_f( const GLuint *v )
161{
162 COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
163 UINT_TO_FLOAT(v[2]), 1.0 );
164}
165
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000166static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000167loopback_Color3usv_f( const GLushort *v )
168{
169 COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
170 USHORT_TO_FLOAT(v[2]), 1.0 );
171}
172
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000173static void GLAPIENTRY
174loopback_Color3ubv_f( const GLubyte *v )
175{
176 COLORF( UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
177 UBYTE_TO_FLOAT(v[2]), 1.0 );
178}
179
Keith Whitwellb0149862000-11-24 10:30:04 +0000180
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000181static void GLAPIENTRY
Gareth Hughes22144ab2001-03-12 00:48:37 +0000182loopback_Color4b_f( GLbyte red, GLbyte green, GLbyte blue,
Keith Whitwellb0149862000-11-24 10:30:04 +0000183 GLbyte alpha )
184{
185 COLORF( BYTE_TO_FLOAT(red), BYTE_TO_FLOAT(green),
186 BYTE_TO_FLOAT(blue), BYTE_TO_FLOAT(alpha) );
187}
188
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000189static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000190loopback_Color4d_f( GLdouble red, GLdouble green, GLdouble blue,
191 GLdouble alpha )
192{
Brian Paul7c276322001-09-14 21:36:43 +0000193 COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, (GLfloat) alpha );
Keith Whitwellb0149862000-11-24 10:30:04 +0000194}
195
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000196static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000197loopback_Color4i_f( GLint red, GLint green, GLint blue, GLint alpha )
198{
199 COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
200 INT_TO_FLOAT(blue), INT_TO_FLOAT(alpha) );
201}
202
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000203static void GLAPIENTRY
Gareth Hughes22144ab2001-03-12 00:48:37 +0000204loopback_Color4s_f( GLshort red, GLshort green, GLshort blue,
Keith Whitwellb0149862000-11-24 10:30:04 +0000205 GLshort alpha )
206{
207 COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
208 SHORT_TO_FLOAT(blue), SHORT_TO_FLOAT(alpha) );
209}
210
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000211static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000212loopback_Color4ui_f( GLuint red, GLuint green, GLuint blue, GLuint alpha )
213{
214 COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
215 UINT_TO_FLOAT(blue), UINT_TO_FLOAT(alpha) );
216}
217
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000218static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000219loopback_Color4us_f( GLushort red, GLushort green, GLushort blue, GLushort alpha )
220{
221 COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
222 USHORT_TO_FLOAT(blue), USHORT_TO_FLOAT(alpha) );
223}
224
Karl Schultzd6745692003-12-04 20:23:44 +0000225static void GLAPIENTRY
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000226loopback_Color4ub_f( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha )
227{
228 COLORF( UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
229 UBYTE_TO_FLOAT(blue), UBYTE_TO_FLOAT(alpha) );
230}
231
Keith Whitwellb0149862000-11-24 10:30:04 +0000232
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000233static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000234loopback_Color4iv_f( const GLint *v )
235{
236 COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
237 INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]) );
238}
239
240
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000241static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000242loopback_Color4bv_f( const GLbyte *v )
243{
244 COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
245 BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]) );
246}
247
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000248static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000249loopback_Color4dv_f( const GLdouble *v )
250{
Brian Paul7c276322001-09-14 21:36:43 +0000251 COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000252}
253
254
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000255static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000256loopback_Color4sv_f( const GLshort *v)
257{
258 COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
259 SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]) );
260}
261
262
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000263static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000264loopback_Color4uiv_f( const GLuint *v)
265{
266 COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
267 UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]) );
268}
269
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000270static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000271loopback_Color4usv_f( const GLushort *v)
272{
273 COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
274 USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]) );
275}
276
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000277static void GLAPIENTRY
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000278loopback_Color4ubv_f( const GLubyte *v)
279{
280 COLORF( UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
281 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]) );
282}
283
Brian Paul94b30dc2006-04-25 00:53:25 +0000284
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000285static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000286loopback_FogCoorddEXT( GLdouble d )
287{
Brian Paul7c276322001-09-14 21:36:43 +0000288 FOGCOORDF( (GLfloat) d );
Keith Whitwellb0149862000-11-24 10:30:04 +0000289}
290
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000291static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000292loopback_FogCoorddvEXT( const GLdouble *v )
293{
Brian Paul7c276322001-09-14 21:36:43 +0000294 FOGCOORDF( (GLfloat) *v );
Keith Whitwellb0149862000-11-24 10:30:04 +0000295}
296
297
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000298static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000299loopback_Indexd( GLdouble c )
300{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000301 INDEX( (GLfloat) c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000302}
303
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000304static void GLAPIENTRY
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000305loopback_Indexi( GLint c )
Keith Whitwellb0149862000-11-24 10:30:04 +0000306{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000307 INDEX( (GLfloat) c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000308}
309
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000310static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000311loopback_Indexs( GLshort c )
312{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000313 INDEX( (GLfloat) c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000314}
315
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000316static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000317loopback_Indexub( GLubyte c )
318{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000319 INDEX( (GLfloat) c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000320}
321
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000322static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000323loopback_Indexdv( const GLdouble *c )
324{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000325 INDEX( (GLfloat) *c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000326}
327
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000328static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000329loopback_Indexiv( const GLint *c )
330{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000331 INDEX( (GLfloat) *c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000332}
333
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000334static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000335loopback_Indexsv( const GLshort *c )
336{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000337 INDEX( (GLfloat) *c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000338}
339
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000340static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000341loopback_Indexubv( const GLubyte *c )
342{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000343 INDEX( (GLfloat) *c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000344}
345
Brian Paul94b30dc2006-04-25 00:53:25 +0000346
347static void GLAPIENTRY
348loopback_EdgeFlagv(const GLboolean *flag)
349{
350 CALL_EdgeFlag(GET_DISPATCH(), (*flag));
351}
352
353
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000354static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000355loopback_Normal3b( GLbyte nx, GLbyte ny, GLbyte nz )
356{
357 NORMAL( BYTE_TO_FLOAT(nx), BYTE_TO_FLOAT(ny), BYTE_TO_FLOAT(nz) );
358}
359
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000360static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000361loopback_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz )
362{
Brian Paul7c276322001-09-14 21:36:43 +0000363 NORMAL((GLfloat) nx, (GLfloat) ny, (GLfloat) nz);
Keith Whitwellb0149862000-11-24 10:30:04 +0000364}
365
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000366static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000367loopback_Normal3i( GLint nx, GLint ny, GLint nz )
368{
369 NORMAL( INT_TO_FLOAT(nx), INT_TO_FLOAT(ny), INT_TO_FLOAT(nz) );
370}
371
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000372static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000373loopback_Normal3s( GLshort nx, GLshort ny, GLshort nz )
374{
375 NORMAL( SHORT_TO_FLOAT(nx), SHORT_TO_FLOAT(ny), SHORT_TO_FLOAT(nz) );
376}
377
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000378static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000379loopback_Normal3bv( const GLbyte *v )
380{
381 NORMAL( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]) );
382}
383
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000384static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000385loopback_Normal3dv( const GLdouble *v )
386{
Brian Paul7c276322001-09-14 21:36:43 +0000387 NORMAL( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000388}
389
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000390static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000391loopback_Normal3iv( const GLint *v )
392{
393 NORMAL( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]) );
394}
395
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000396static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000397loopback_Normal3sv( const GLshort *v )
398{
399 NORMAL( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]) );
400}
401
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000402static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000403loopback_TexCoord1d( GLdouble s )
404{
Brian Paul7c276322001-09-14 21:36:43 +0000405 TEXCOORD1((GLfloat) s);
Keith Whitwellb0149862000-11-24 10:30:04 +0000406}
407
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000408static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000409loopback_TexCoord1i( GLint s )
410{
Brian Paul7c276322001-09-14 21:36:43 +0000411 TEXCOORD1((GLfloat) s);
Keith Whitwellb0149862000-11-24 10:30:04 +0000412}
413
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000414static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000415loopback_TexCoord1s( GLshort s )
416{
Brian Paul7c276322001-09-14 21:36:43 +0000417 TEXCOORD1((GLfloat) s);
Keith Whitwellb0149862000-11-24 10:30:04 +0000418}
419
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000420static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000421loopback_TexCoord2d( GLdouble s, GLdouble t )
422{
Brian Paul7c276322001-09-14 21:36:43 +0000423 TEXCOORD2((GLfloat) s,(GLfloat) t);
Keith Whitwellb0149862000-11-24 10:30:04 +0000424}
425
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000426static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000427loopback_TexCoord2s( GLshort s, GLshort t )
428{
Brian Paul7c276322001-09-14 21:36:43 +0000429 TEXCOORD2((GLfloat) s,(GLfloat) t);
Keith Whitwellb0149862000-11-24 10:30:04 +0000430}
431
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000432static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000433loopback_TexCoord2i( GLint s, GLint t )
434{
Brian Paul7c276322001-09-14 21:36:43 +0000435 TEXCOORD2((GLfloat) s,(GLfloat) t);
Keith Whitwellb0149862000-11-24 10:30:04 +0000436}
437
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000438static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000439loopback_TexCoord3d( GLdouble s, GLdouble t, GLdouble r )
440{
Brian Paul7c276322001-09-14 21:36:43 +0000441 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
Keith Whitwellb0149862000-11-24 10:30:04 +0000442}
443
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000444static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000445loopback_TexCoord3i( GLint s, GLint t, GLint r )
446{
Brian Paul7c276322001-09-14 21:36:43 +0000447 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
Keith Whitwellb0149862000-11-24 10:30:04 +0000448}
449
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000450static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000451loopback_TexCoord3s( GLshort s, GLshort t, GLshort r )
452{
Brian Paul7c276322001-09-14 21:36:43 +0000453 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
Keith Whitwellb0149862000-11-24 10:30:04 +0000454}
455
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000456static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000457loopback_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q )
458{
Brian Paul7c276322001-09-14 21:36:43 +0000459 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
Keith Whitwellb0149862000-11-24 10:30:04 +0000460}
461
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000462static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000463loopback_TexCoord4i( GLint s, GLint t, GLint r, GLint q )
464{
Brian Paul7c276322001-09-14 21:36:43 +0000465 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
Keith Whitwellb0149862000-11-24 10:30:04 +0000466}
467
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000468static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000469loopback_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q )
470{
Brian Paul7c276322001-09-14 21:36:43 +0000471 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
Keith Whitwellb0149862000-11-24 10:30:04 +0000472}
473
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000474static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000475loopback_TexCoord1dv( const GLdouble *v )
476{
Brian Paul7c276322001-09-14 21:36:43 +0000477 TEXCOORD1((GLfloat) v[0]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000478}
479
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000480static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000481loopback_TexCoord1iv( const GLint *v )
482{
Brian Paul7c276322001-09-14 21:36:43 +0000483 TEXCOORD1((GLfloat) v[0]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000484}
485
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000486static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000487loopback_TexCoord1sv( const GLshort *v )
488{
Brian Paul7c276322001-09-14 21:36:43 +0000489 TEXCOORD1((GLfloat) v[0]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000490}
491
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000492static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000493loopback_TexCoord2dv( const GLdouble *v )
494{
Brian Paul7c276322001-09-14 21:36:43 +0000495 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000496}
497
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000498static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000499loopback_TexCoord2iv( const GLint *v )
500{
Brian Paul7c276322001-09-14 21:36:43 +0000501 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000502}
503
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000504static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000505loopback_TexCoord2sv( const GLshort *v )
506{
Brian Paul7c276322001-09-14 21:36:43 +0000507 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000508}
509
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000510static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000511loopback_TexCoord3dv( const GLdouble *v )
512{
Sean D'Epagnier0337e562006-11-21 08:48:44 +0000513 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000514}
515
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000516static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000517loopback_TexCoord3iv( const GLint *v )
518{
Brian Paul7c276322001-09-14 21:36:43 +0000519 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000520}
521
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000522static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000523loopback_TexCoord3sv( const GLshort *v )
524{
Brian Paul7c276322001-09-14 21:36:43 +0000525 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000526}
527
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000528static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000529loopback_TexCoord4dv( const GLdouble *v )
530{
Brian Paul7c276322001-09-14 21:36:43 +0000531 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000532}
533
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000534static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000535loopback_TexCoord4iv( const GLint *v )
536{
Brian Paul7c276322001-09-14 21:36:43 +0000537 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000538}
539
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000540static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000541loopback_TexCoord4sv( const GLshort *v )
542{
Brian Paul7c276322001-09-14 21:36:43 +0000543 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000544}
545
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000546static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000547loopback_Vertex2d( GLdouble x, GLdouble y )
548{
549 VERTEX2( (GLfloat) x, (GLfloat) y );
550}
551
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000552static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000553loopback_Vertex2i( GLint x, GLint y )
554{
555 VERTEX2( (GLfloat) x, (GLfloat) y );
556}
557
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000558static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000559loopback_Vertex2s( GLshort x, GLshort y )
560{
561 VERTEX2( (GLfloat) x, (GLfloat) y );
562}
563
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000564static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000565loopback_Vertex3d( GLdouble x, GLdouble y, GLdouble z )
566{
567 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
568}
569
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000570static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000571loopback_Vertex3i( GLint x, GLint y, GLint z )
572{
573 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
574}
575
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000576static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000577loopback_Vertex3s( GLshort x, GLshort y, GLshort z )
578{
579 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
580}
581
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000582static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000583loopback_Vertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w )
584{
585 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
586}
587
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000588static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000589loopback_Vertex4i( GLint x, GLint y, GLint z, GLint w )
590{
591 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
592}
593
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000594static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000595loopback_Vertex4s( GLshort x, GLshort y, GLshort z, GLshort w )
596{
597 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
598}
599
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000600static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000601loopback_Vertex2dv( const GLdouble *v )
602{
603 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
604}
605
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000606static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000607loopback_Vertex2iv( const GLint *v )
608{
609 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
610}
611
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000612static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000613loopback_Vertex2sv( const GLshort *v )
614{
615 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
616}
617
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000618static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000619loopback_Vertex3dv( const GLdouble *v )
620{
621 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
622}
623
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000624static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000625loopback_Vertex3iv( const GLint *v )
626{
627 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
628}
629
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000630static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000631loopback_Vertex3sv( const GLshort *v )
632{
633 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
634}
635
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000636static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000637loopback_Vertex4dv( const GLdouble *v )
638{
Gareth Hughes22144ab2001-03-12 00:48:37 +0000639 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
Keith Whitwellb0149862000-11-24 10:30:04 +0000640 (GLfloat) v[2], (GLfloat) v[3] );
641}
642
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000643static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000644loopback_Vertex4iv( const GLint *v )
645{
Gareth Hughes22144ab2001-03-12 00:48:37 +0000646 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
Keith Whitwellb0149862000-11-24 10:30:04 +0000647 (GLfloat) v[2], (GLfloat) v[3] );
648}
649
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000650static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000651loopback_Vertex4sv( const GLshort *v )
652{
Gareth Hughes22144ab2001-03-12 00:48:37 +0000653 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
Keith Whitwellb0149862000-11-24 10:30:04 +0000654 (GLfloat) v[2], (GLfloat) v[3] );
655}
656
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000657static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000658loopback_MultiTexCoord1dARB(GLenum target, GLdouble s)
659{
Brian Paul7c276322001-09-14 21:36:43 +0000660 MULTI_TEXCOORD1( target, (GLfloat) s );
Keith Whitwellb0149862000-11-24 10:30:04 +0000661}
662
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000663static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000664loopback_MultiTexCoord1dvARB(GLenum target, const GLdouble *v)
665{
Brian Paul7c276322001-09-14 21:36:43 +0000666 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000667}
668
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000669static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000670loopback_MultiTexCoord1iARB(GLenum target, GLint s)
671{
Brian Paul7c276322001-09-14 21:36:43 +0000672 MULTI_TEXCOORD1( target, (GLfloat) s );
Keith Whitwellb0149862000-11-24 10:30:04 +0000673}
674
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000675static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000676loopback_MultiTexCoord1ivARB(GLenum target, const GLint *v)
677{
Brian Paul7c276322001-09-14 21:36:43 +0000678 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000679}
680
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000681static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000682loopback_MultiTexCoord1sARB(GLenum target, GLshort s)
683{
Brian Paul7c276322001-09-14 21:36:43 +0000684 MULTI_TEXCOORD1( target, (GLfloat) s );
Keith Whitwellb0149862000-11-24 10:30:04 +0000685}
686
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000687static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000688loopback_MultiTexCoord1svARB(GLenum target, const GLshort *v)
689{
Brian Paul7c276322001-09-14 21:36:43 +0000690 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000691}
692
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000693static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000694loopback_MultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
695{
Brian Paul7c276322001-09-14 21:36:43 +0000696 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
Keith Whitwellb0149862000-11-24 10:30:04 +0000697}
698
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000699static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000700loopback_MultiTexCoord2dvARB(GLenum target, const GLdouble *v)
701{
Brian Paul7c276322001-09-14 21:36:43 +0000702 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000703}
704
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000705static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000706loopback_MultiTexCoord2iARB(GLenum target, GLint s, GLint t)
707{
Brian Paul7c276322001-09-14 21:36:43 +0000708 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
Keith Whitwellb0149862000-11-24 10:30:04 +0000709}
710
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000711static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000712loopback_MultiTexCoord2ivARB(GLenum target, const GLint *v)
713{
Brian Paul7c276322001-09-14 21:36:43 +0000714 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000715}
716
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000717static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000718loopback_MultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
719{
Brian Paul7c276322001-09-14 21:36:43 +0000720 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
Keith Whitwellb0149862000-11-24 10:30:04 +0000721}
722
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000723static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000724loopback_MultiTexCoord2svARB(GLenum target, const GLshort *v)
725{
Brian Paul7c276322001-09-14 21:36:43 +0000726 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000727}
728
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000729static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000730loopback_MultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
731{
Brian Paul7c276322001-09-14 21:36:43 +0000732 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
Keith Whitwellb0149862000-11-24 10:30:04 +0000733}
734
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000735static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000736loopback_MultiTexCoord3dvARB(GLenum target, const GLdouble *v)
737{
Brian Paul7c276322001-09-14 21:36:43 +0000738 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000739}
740
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000741static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000742loopback_MultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
743{
Brian Paul7c276322001-09-14 21:36:43 +0000744 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
Keith Whitwellb0149862000-11-24 10:30:04 +0000745}
746
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000747static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000748loopback_MultiTexCoord3ivARB(GLenum target, const GLint *v)
749{
Brian Paul7c276322001-09-14 21:36:43 +0000750 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000751}
752
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000753static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000754loopback_MultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
755{
Brian Paul7c276322001-09-14 21:36:43 +0000756 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
Keith Whitwellb0149862000-11-24 10:30:04 +0000757}
758
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000759static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000760loopback_MultiTexCoord3svARB(GLenum target, const GLshort *v)
761{
Brian Paul7c276322001-09-14 21:36:43 +0000762 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000763}
764
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000765static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000766loopback_MultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
767{
Brian Paul7c276322001-09-14 21:36:43 +0000768 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
769 (GLfloat) r, (GLfloat) q );
Keith Whitwellb0149862000-11-24 10:30:04 +0000770}
771
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000772static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000773loopback_MultiTexCoord4dvARB(GLenum target, const GLdouble *v)
774{
Brian Paul7c276322001-09-14 21:36:43 +0000775 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
776 (GLfloat) v[2], (GLfloat) v[3] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000777}
778
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000779static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000780loopback_MultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
781{
Brian Paul7c276322001-09-14 21:36:43 +0000782 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
783 (GLfloat) r, (GLfloat) q );
Keith Whitwellb0149862000-11-24 10:30:04 +0000784}
785
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000786static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000787loopback_MultiTexCoord4ivARB(GLenum target, const GLint *v)
788{
Brian Paul7c276322001-09-14 21:36:43 +0000789 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
790 (GLfloat) v[2], (GLfloat) v[3] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000791}
792
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000793static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000794loopback_MultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
795{
Brian Paul7c276322001-09-14 21:36:43 +0000796 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
797 (GLfloat) r, (GLfloat) q );
Keith Whitwellb0149862000-11-24 10:30:04 +0000798}
799
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000800static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000801loopback_MultiTexCoord4svARB(GLenum target, const GLshort *v)
802{
Brian Paul7c276322001-09-14 21:36:43 +0000803 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
804 (GLfloat) v[2], (GLfloat) v[3] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000805}
806
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000807static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000808loopback_EvalCoord2dv( const GLdouble *u )
809{
810 EVALCOORD2( (GLfloat) u[0], (GLfloat) u[1] );
811}
812
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000813static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000814loopback_EvalCoord2fv( const GLfloat *u )
815{
816 EVALCOORD2( u[0], u[1] );
817}
818
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000819static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000820loopback_EvalCoord2d( GLdouble u, GLdouble v )
821{
822 EVALCOORD2( (GLfloat) u, (GLfloat) v );
823}
824
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000825static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000826loopback_EvalCoord1dv( const GLdouble *u )
827{
828 EVALCOORD1( (GLfloat) *u );
829}
830
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000831static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000832loopback_EvalCoord1fv( const GLfloat *u )
833{
834 EVALCOORD1( (GLfloat) *u );
835}
836
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000837static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000838loopback_EvalCoord1d( GLdouble u )
839{
840 EVALCOORD1( (GLfloat) u );
841}
842
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000843static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000844loopback_Materialf( GLenum face, GLenum pname, GLfloat param )
845{
846 GLfloat fparam[4];
847 fparam[0] = param;
848 MATERIALFV( face, pname, fparam );
849}
850
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000851static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000852loopback_Materiali(GLenum face, GLenum pname, GLint param )
853{
854 GLfloat p = (GLfloat) param;
855 MATERIALFV(face, pname, &p);
856}
857
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000858static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000859loopback_Materialiv(GLenum face, GLenum pname, const GLint *params )
860{
861 GLfloat fparam[4];
862 switch (pname) {
863 case GL_AMBIENT:
864 case GL_DIFFUSE:
865 case GL_SPECULAR:
866 case GL_EMISSION:
867 case GL_AMBIENT_AND_DIFFUSE:
868 fparam[0] = INT_TO_FLOAT( params[0] );
869 fparam[1] = INT_TO_FLOAT( params[1] );
870 fparam[2] = INT_TO_FLOAT( params[2] );
871 fparam[3] = INT_TO_FLOAT( params[3] );
872 break;
873 case GL_SHININESS:
874 fparam[0] = (GLfloat) params[0];
875 break;
876 case GL_COLOR_INDEXES:
877 fparam[0] = (GLfloat) params[0];
878 fparam[1] = (GLfloat) params[1];
879 fparam[2] = (GLfloat) params[2];
880 break;
881 default:
882 ;
883 }
884 MATERIALFV(face, pname, fparam);
885}
886
887
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000888static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000889loopback_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
890{
Brian Paul7c276322001-09-14 21:36:43 +0000891 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
Keith Whitwellb0149862000-11-24 10:30:04 +0000892}
893
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000894static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000895loopback_Rectdv(const GLdouble *v1, const GLdouble *v2)
896{
Brian Paul7c276322001-09-14 21:36:43 +0000897 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000898}
899
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000900static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000901loopback_Rectfv(const GLfloat *v1, const GLfloat *v2)
902{
903 RECTF(v1[0], v1[1], v2[0], v2[1]);
904}
905
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000906static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000907loopback_Recti(GLint x1, GLint y1, GLint x2, GLint y2)
908{
Brian Paul7c276322001-09-14 21:36:43 +0000909 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
Keith Whitwellb0149862000-11-24 10:30:04 +0000910}
911
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000912static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000913loopback_Rectiv(const GLint *v1, const GLint *v2)
914{
Brian Paul7c276322001-09-14 21:36:43 +0000915 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000916}
917
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000918static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000919loopback_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
920{
Brian Paul7c276322001-09-14 21:36:43 +0000921 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
Keith Whitwellb0149862000-11-24 10:30:04 +0000922}
923
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000924static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000925loopback_Rectsv(const GLshort *v1, const GLshort *v2)
926{
Brian Paul7c276322001-09-14 21:36:43 +0000927 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000928}
929
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000930static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000931loopback_SecondaryColor3bEXT_f( GLbyte red, GLbyte green, GLbyte blue )
932{
933 SECONDARYCOLORF( BYTE_TO_FLOAT(red),
934 BYTE_TO_FLOAT(green),
935 BYTE_TO_FLOAT(blue) );
936}
937
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000938static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000939loopback_SecondaryColor3dEXT_f( GLdouble red, GLdouble green, GLdouble blue )
940{
Brian Paul7c276322001-09-14 21:36:43 +0000941 SECONDARYCOLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue );
Keith Whitwellb0149862000-11-24 10:30:04 +0000942}
943
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000944static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000945loopback_SecondaryColor3iEXT_f( GLint red, GLint green, GLint blue )
946{
947 SECONDARYCOLORF( INT_TO_FLOAT(red),
948 INT_TO_FLOAT(green),
949 INT_TO_FLOAT(blue));
950}
951
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000952static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000953loopback_SecondaryColor3sEXT_f( GLshort red, GLshort green, GLshort blue )
954{
955 SECONDARYCOLORF(SHORT_TO_FLOAT(red),
956 SHORT_TO_FLOAT(green),
957 SHORT_TO_FLOAT(blue));
958}
959
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000960static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000961loopback_SecondaryColor3uiEXT_f( GLuint red, GLuint green, GLuint blue )
962{
963 SECONDARYCOLORF(UINT_TO_FLOAT(red),
964 UINT_TO_FLOAT(green),
965 UINT_TO_FLOAT(blue));
966}
967
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000968static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000969loopback_SecondaryColor3usEXT_f( GLushort red, GLushort green, GLushort blue )
970{
971 SECONDARYCOLORF(USHORT_TO_FLOAT(red),
972 USHORT_TO_FLOAT(green),
973 USHORT_TO_FLOAT(blue));
974}
975
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000976static void GLAPIENTRY
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000977loopback_SecondaryColor3ubEXT_f( GLubyte red, GLubyte green, GLubyte blue )
978{
979 SECONDARYCOLORF(UBYTE_TO_FLOAT(red),
980 UBYTE_TO_FLOAT(green),
981 UBYTE_TO_FLOAT(blue));
982}
983
984static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000985loopback_SecondaryColor3bvEXT_f( const GLbyte *v )
986{
987 SECONDARYCOLORF(BYTE_TO_FLOAT(v[0]),
988 BYTE_TO_FLOAT(v[1]),
989 BYTE_TO_FLOAT(v[2]));
990}
991
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000992static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000993loopback_SecondaryColor3dvEXT_f( const GLdouble *v )
994{
Brian Paul7c276322001-09-14 21:36:43 +0000995 SECONDARYCOLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000996}
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000997static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000998loopback_SecondaryColor3ivEXT_f( const GLint *v )
999{
1000 SECONDARYCOLORF(INT_TO_FLOAT(v[0]),
1001 INT_TO_FLOAT(v[1]),
1002 INT_TO_FLOAT(v[2]));
1003}
1004
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001005static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +00001006loopback_SecondaryColor3svEXT_f( const GLshort *v )
1007{
1008 SECONDARYCOLORF(SHORT_TO_FLOAT(v[0]),
1009 SHORT_TO_FLOAT(v[1]),
1010 SHORT_TO_FLOAT(v[2]));
1011}
1012
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001013static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +00001014loopback_SecondaryColor3uivEXT_f( const GLuint *v )
1015{
1016 SECONDARYCOLORF(UINT_TO_FLOAT(v[0]),
1017 UINT_TO_FLOAT(v[1]),
1018 UINT_TO_FLOAT(v[2]));
1019}
1020
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001021static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +00001022loopback_SecondaryColor3usvEXT_f( const GLushort *v )
1023{
1024 SECONDARYCOLORF(USHORT_TO_FLOAT(v[0]),
1025 USHORT_TO_FLOAT(v[1]),
1026 USHORT_TO_FLOAT(v[2]));
1027}
1028
Keith Whitwellae0eaf92003-11-24 15:23:18 +00001029static void GLAPIENTRY
1030loopback_SecondaryColor3ubvEXT_f( const GLubyte *v )
1031{
1032 SECONDARYCOLORF(UBYTE_TO_FLOAT(v[0]),
1033 UBYTE_TO_FLOAT(v[1]),
1034 UBYTE_TO_FLOAT(v[2]));
1035}
1036
Keith Whitwellb0149862000-11-24 10:30:04 +00001037
Brian Paul86b84272001-12-14 02:50:01 +00001038/*
Brian Paulb5b8d222004-11-27 20:07:08 +00001039 * GL_NV_vertex_program:
1040 * Always loop-back to one of the VertexAttrib[1234]f[v]NV functions.
Brian Paul86b84272001-12-14 02:50:01 +00001041 */
1042
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001043static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001044loopback_VertexAttrib1sNV(GLuint index, GLshort x)
1045{
Brian Paulb5b8d222004-11-27 20:07:08 +00001046 ATTRIB1NV(index, (GLfloat) x);
Brian Paul86b84272001-12-14 02:50:01 +00001047}
1048
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001049static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001050loopback_VertexAttrib1dNV(GLuint index, GLdouble x)
1051{
Brian Paulb5b8d222004-11-27 20:07:08 +00001052 ATTRIB1NV(index, (GLfloat) x);
Brian Paul86b84272001-12-14 02:50:01 +00001053}
1054
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001055static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001056loopback_VertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
1057{
Brian Paulb5b8d222004-11-27 20:07:08 +00001058 ATTRIB2NV(index, (GLfloat) x, y);
Brian Paul86b84272001-12-14 02:50:01 +00001059}
1060
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001061static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001062loopback_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
1063{
Brian Paulb5b8d222004-11-27 20:07:08 +00001064 ATTRIB2NV(index, (GLfloat) x, (GLfloat) y);
Brian Paul86b84272001-12-14 02:50:01 +00001065}
1066
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001067static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001068loopback_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
1069{
Brian Paulb5b8d222004-11-27 20:07:08 +00001070 ATTRIB3NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
Brian Paul86b84272001-12-14 02:50:01 +00001071}
1072
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001073static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001074loopback_VertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
1075{
Brian Paulb5b8d222004-11-27 20:07:08 +00001076 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
Brian Paul86b84272001-12-14 02:50:01 +00001077}
1078
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001079static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001080loopback_VertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
1081{
Brian Paulb5b8d222004-11-27 20:07:08 +00001082 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
Brian Paul86b84272001-12-14 02:50:01 +00001083}
1084
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001085static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001086loopback_VertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1087{
Brian Paulb5b8d222004-11-27 20:07:08 +00001088 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
Brian Paul86b84272001-12-14 02:50:01 +00001089}
1090
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001091static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001092loopback_VertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
1093{
Brian Paulb5b8d222004-11-27 20:07:08 +00001094 ATTRIB4NV(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
Brian Paul86b84272001-12-14 02:50:01 +00001095 UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
1096}
1097
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001098static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001099loopback_VertexAttrib1svNV(GLuint index, const GLshort *v)
1100{
Brian Paulb5b8d222004-11-27 20:07:08 +00001101 ATTRIB1NV(index, (GLfloat) v[0]);
Brian Paul86b84272001-12-14 02:50:01 +00001102}
1103
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001104static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001105loopback_VertexAttrib1dvNV(GLuint index, const GLdouble *v)
1106{
Brian Paulb5b8d222004-11-27 20:07:08 +00001107 ATTRIB1NV(index, (GLfloat) v[0]);
Brian Paul86b84272001-12-14 02:50:01 +00001108}
1109
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001110static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001111loopback_VertexAttrib2svNV(GLuint index, const GLshort *v)
1112{
Brian Paulb5b8d222004-11-27 20:07:08 +00001113 ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
Brian Paul86b84272001-12-14 02:50:01 +00001114}
1115
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001116static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001117loopback_VertexAttrib2dvNV(GLuint index, const GLdouble *v)
1118{
Brian Paulb5b8d222004-11-27 20:07:08 +00001119 ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
Brian Paul86b84272001-12-14 02:50:01 +00001120}
1121
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001122static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001123loopback_VertexAttrib3svNV(GLuint index, const GLshort *v)
1124{
Brian Paulb5b8d222004-11-27 20:07:08 +00001125 ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
Brian Paul86b84272001-12-14 02:50:01 +00001126}
1127
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001128static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001129loopback_VertexAttrib3dvNV(GLuint index, const GLdouble *v)
1130{
Brian Paulb5b8d222004-11-27 20:07:08 +00001131 ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
Brian Paul86b84272001-12-14 02:50:01 +00001132}
1133
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001134static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001135loopback_VertexAttrib4svNV(GLuint index, const GLshort *v)
1136{
Brian Paulb5b8d222004-11-27 20:07:08 +00001137 ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
Keith Whitwell33ce4052003-04-05 07:29:23 +00001138 (GLfloat)v[3]);
Brian Paul86b84272001-12-14 02:50:01 +00001139}
1140
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001141static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001142loopback_VertexAttrib4dvNV(GLuint index, const GLdouble *v)
1143{
Brian Paulb5b8d222004-11-27 20:07:08 +00001144 ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paul86b84272001-12-14 02:50:01 +00001145}
1146
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001147static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001148loopback_VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
1149{
Brian Paulb5b8d222004-11-27 20:07:08 +00001150 ATTRIB4NV(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
Brian Paul86b84272001-12-14 02:50:01 +00001151 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
1152}
1153
1154
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001155static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001156loopback_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v)
1157{
1158 GLint i;
1159 for (i = n - 1; i >= 0; i--)
1160 loopback_VertexAttrib1svNV(index + i, v + i);
1161}
1162
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001163static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001164loopback_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v)
1165{
1166 GLint i;
1167 for (i = n - 1; i >= 0; i--)
Brian Paulb5b8d222004-11-27 20:07:08 +00001168 ATTRIB1NV(index + i, v[i]);
Brian Paul86b84272001-12-14 02:50:01 +00001169}
1170
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001171static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001172loopback_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v)
1173{
1174 GLint i;
1175 for (i = n - 1; i >= 0; i--)
1176 loopback_VertexAttrib1dvNV(index + i, v + i);
1177}
1178
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001179static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001180loopback_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v)
1181{
1182 GLint i;
1183 for (i = n - 1; i >= 0; i--)
1184 loopback_VertexAttrib2svNV(index + i, v + 2 * i);
1185}
1186
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001187static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001188loopback_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v)
1189{
1190 GLint i;
1191 for (i = n - 1; i >= 0; i--)
Brian Paulb5b8d222004-11-27 20:07:08 +00001192 ATTRIB2NV(index + i, v[2 * i], v[2 * i + 1]);
Brian Paul86b84272001-12-14 02:50:01 +00001193}
1194
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001195static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001196loopback_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v)
1197{
1198 GLint i;
1199 for (i = n - 1; i >= 0; i--)
1200 loopback_VertexAttrib2dvNV(index + i, v + 2 * i);
1201}
1202
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001203static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001204loopback_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v)
1205{
1206 GLint i;
1207 for (i = n - 1; i >= 0; i--)
1208 loopback_VertexAttrib3svNV(index + i, v + 3 * i);
1209}
1210
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001211static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001212loopback_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v)
1213{
1214 GLint i;
1215 for (i = n - 1; i >= 0; i--)
Brian Paulb5b8d222004-11-27 20:07:08 +00001216 ATTRIB3NV(index + i, v[3 * i], v[3 * i + 1], v[3 * i + 2]);
Brian Paul86b84272001-12-14 02:50:01 +00001217}
1218
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001219static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001220loopback_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v)
1221{
1222 GLint i;
1223 for (i = n - 1; i >= 0; i--)
1224 loopback_VertexAttrib3dvNV(index + i, v + 3 * i);
1225}
1226
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001227static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001228loopback_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v)
1229{
1230 GLint i;
1231 for (i = n - 1; i >= 0; i--)
1232 loopback_VertexAttrib4svNV(index + i, v + 4 * i);
1233}
1234
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001235static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001236loopback_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v)
1237{
1238 GLint i;
1239 for (i = n - 1; i >= 0; i--)
Brian Paulb5b8d222004-11-27 20:07:08 +00001240 ATTRIB4NV(index + i, v[4 * i], v[4 * i + 1], v[4 * i + 2], v[4 * i + 3]);
Brian Paul86b84272001-12-14 02:50:01 +00001241}
1242
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001243static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001244loopback_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v)
1245{
1246 GLint i;
1247 for (i = n - 1; i >= 0; i--)
1248 loopback_VertexAttrib4dvNV(index + i, v + 4 * i);
1249}
1250
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001251static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001252loopback_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
1253{
1254 GLint i;
1255 for (i = n - 1; i >= 0; i--)
1256 loopback_VertexAttrib4ubvNV(index + i, v + 4 * i);
1257}
1258
Keith Whitwellcab974c2000-12-26 05:09:27 +00001259
Brian Paule591ad72003-05-10 04:37:47 +00001260/*
1261 * GL_ARB_vertex_program
Brian Paulb5b8d222004-11-27 20:07:08 +00001262 * Always loop-back to one of the VertexAttrib[1234]f[v]ARB functions.
Brian Paule591ad72003-05-10 04:37:47 +00001263 */
1264
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001265static void GLAPIENTRY
Brian Paulb5b8d222004-11-27 20:07:08 +00001266loopback_VertexAttrib1sARB(GLuint index, GLshort x)
1267{
1268 ATTRIB1ARB(index, (GLfloat) x);
1269}
1270
1271static void GLAPIENTRY
1272loopback_VertexAttrib1dARB(GLuint index, GLdouble x)
1273{
1274 ATTRIB1ARB(index, (GLfloat) x);
1275}
1276
1277static void GLAPIENTRY
1278loopback_VertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
1279{
1280 ATTRIB2ARB(index, (GLfloat) x, y);
1281}
1282
1283static void GLAPIENTRY
1284loopback_VertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
1285{
1286 ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y);
1287}
1288
1289static void GLAPIENTRY
1290loopback_VertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
1291{
1292 ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
1293}
1294
1295static void GLAPIENTRY
1296loopback_VertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z)
1297{
1298 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
1299}
1300
1301static void GLAPIENTRY
1302loopback_VertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
1303{
1304 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1305}
1306
1307static void GLAPIENTRY
1308loopback_VertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1309{
1310 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1311}
1312
1313static void GLAPIENTRY
1314loopback_VertexAttrib1svARB(GLuint index, const GLshort *v)
1315{
1316 ATTRIB1ARB(index, (GLfloat) v[0]);
1317}
1318
1319static void GLAPIENTRY
1320loopback_VertexAttrib1dvARB(GLuint index, const GLdouble *v)
1321{
1322 ATTRIB1ARB(index, (GLfloat) v[0]);
1323}
1324
1325static void GLAPIENTRY
1326loopback_VertexAttrib2svARB(GLuint index, const GLshort *v)
1327{
1328 ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
1329}
1330
1331static void GLAPIENTRY
1332loopback_VertexAttrib2dvARB(GLuint index, const GLdouble *v)
1333{
1334 ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
1335}
1336
1337static void GLAPIENTRY
1338loopback_VertexAttrib3svARB(GLuint index, const GLshort *v)
1339{
1340 ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1341}
1342
1343static void GLAPIENTRY
1344loopback_VertexAttrib3dvARB(GLuint index, const GLdouble *v)
1345{
1346 ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1347}
1348
1349static void GLAPIENTRY
1350loopback_VertexAttrib4svARB(GLuint index, const GLshort *v)
1351{
1352 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
1353 (GLfloat)v[3]);
1354}
1355
1356static void GLAPIENTRY
1357loopback_VertexAttrib4dvARB(GLuint index, const GLdouble *v)
1358{
1359 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1360}
1361
1362static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001363loopback_VertexAttrib4bvARB(GLuint index, const GLbyte * v)
1364{
Brian Paulb5b8d222004-11-27 20:07:08 +00001365 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001366}
1367
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001368static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001369loopback_VertexAttrib4ivARB(GLuint index, const GLint * v)
1370{
Brian Paulb5b8d222004-11-27 20:07:08 +00001371 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001372}
1373
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001374static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001375loopback_VertexAttrib4ubvARB(GLuint index, const GLubyte * v)
1376{
Brian Paulb5b8d222004-11-27 20:07:08 +00001377 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001378}
1379
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001380static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001381loopback_VertexAttrib4usvARB(GLuint index, const GLushort * v)
1382{
Brian Paulb5b8d222004-11-27 20:07:08 +00001383 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001384}
1385
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001386static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001387loopback_VertexAttrib4uivARB(GLuint index, const GLuint * v)
1388{
Brian Paulb5b8d222004-11-27 20:07:08 +00001389 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001390}
1391
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001392static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001393loopback_VertexAttrib4NbvARB(GLuint index, const GLbyte * v)
1394{
Brian Paulb5b8d222004-11-27 20:07:08 +00001395 ATTRIB4ARB(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001396 BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]));
1397}
1398
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001399static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001400loopback_VertexAttrib4NsvARB(GLuint index, const GLshort * v)
1401{
Brian Paulb5b8d222004-11-27 20:07:08 +00001402 ATTRIB4ARB(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001403 SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]));
1404}
1405
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001406static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001407loopback_VertexAttrib4NivARB(GLuint index, const GLint * v)
1408{
Brian Paulb5b8d222004-11-27 20:07:08 +00001409 ATTRIB4ARB(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001410 INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]));
1411}
1412
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001413static void GLAPIENTRY
Brian Paulb5b8d222004-11-27 20:07:08 +00001414loopback_VertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
1415{
1416 ATTRIB4ARB(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
1417 UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
1418}
1419
1420static void GLAPIENTRY
1421loopback_VertexAttrib4NubvARB(GLuint index, const GLubyte * v)
1422{
1423 ATTRIB4ARB(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
1424 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
1425}
1426
1427static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001428loopback_VertexAttrib4NusvARB(GLuint index, const GLushort * v)
1429{
Brian Paulb5b8d222004-11-27 20:07:08 +00001430 ATTRIB4ARB(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001431 USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]));
1432}
1433
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001434static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001435loopback_VertexAttrib4NuivARB(GLuint index, const GLuint * v)
1436{
Brian Paulb5b8d222004-11-27 20:07:08 +00001437 ATTRIB4ARB(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001438 UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]));
1439}
1440
1441
Brian Paul03c0c2e2002-01-14 16:06:35 +00001442
Keith Whitwellb0149862000-11-24 10:30:04 +00001443
Keith Whitwellae0eaf92003-11-24 15:23:18 +00001444/*
Keith Whitwellb0149862000-11-24 10:30:04 +00001445 * This code never registers handlers for any of the entry points
Gareth Hughes22144ab2001-03-12 00:48:37 +00001446 * listed in vtxfmt.h.
Keith Whitwellb0149862000-11-24 10:30:04 +00001447 */
1448void
Keith Whitwellae0eaf92003-11-24 15:23:18 +00001449_mesa_loopback_init_api_table( struct _glapi_table *dest )
Keith Whitwellb0149862000-11-24 10:30:04 +00001450{
Ian Romanick9bdfee32005-07-18 12:31:24 +00001451 SET_Color3b(dest, loopback_Color3b_f);
1452 SET_Color3d(dest, loopback_Color3d_f);
1453 SET_Color3i(dest, loopback_Color3i_f);
1454 SET_Color3s(dest, loopback_Color3s_f);
1455 SET_Color3ui(dest, loopback_Color3ui_f);
1456 SET_Color3us(dest, loopback_Color3us_f);
1457 SET_Color3ub(dest, loopback_Color3ub_f);
1458 SET_Color4b(dest, loopback_Color4b_f);
1459 SET_Color4d(dest, loopback_Color4d_f);
1460 SET_Color4i(dest, loopback_Color4i_f);
1461 SET_Color4s(dest, loopback_Color4s_f);
1462 SET_Color4ui(dest, loopback_Color4ui_f);
1463 SET_Color4us(dest, loopback_Color4us_f);
1464 SET_Color4ub(dest, loopback_Color4ub_f);
1465 SET_Color3bv(dest, loopback_Color3bv_f);
1466 SET_Color3dv(dest, loopback_Color3dv_f);
1467 SET_Color3iv(dest, loopback_Color3iv_f);
1468 SET_Color3sv(dest, loopback_Color3sv_f);
1469 SET_Color3uiv(dest, loopback_Color3uiv_f);
1470 SET_Color3usv(dest, loopback_Color3usv_f);
1471 SET_Color3ubv(dest, loopback_Color3ubv_f);
1472 SET_Color4bv(dest, loopback_Color4bv_f);
1473 SET_Color4dv(dest, loopback_Color4dv_f);
1474 SET_Color4iv(dest, loopback_Color4iv_f);
1475 SET_Color4sv(dest, loopback_Color4sv_f);
1476 SET_Color4uiv(dest, loopback_Color4uiv_f);
1477 SET_Color4usv(dest, loopback_Color4usv_f);
1478 SET_Color4ubv(dest, loopback_Color4ubv_f);
Keith Whitwellb0149862000-11-24 10:30:04 +00001479
Ian Romanick9bdfee32005-07-18 12:31:24 +00001480 SET_SecondaryColor3bEXT(dest, loopback_SecondaryColor3bEXT_f);
1481 SET_SecondaryColor3dEXT(dest, loopback_SecondaryColor3dEXT_f);
1482 SET_SecondaryColor3iEXT(dest, loopback_SecondaryColor3iEXT_f);
1483 SET_SecondaryColor3sEXT(dest, loopback_SecondaryColor3sEXT_f);
1484 SET_SecondaryColor3uiEXT(dest, loopback_SecondaryColor3uiEXT_f);
1485 SET_SecondaryColor3usEXT(dest, loopback_SecondaryColor3usEXT_f);
1486 SET_SecondaryColor3ubEXT(dest, loopback_SecondaryColor3ubEXT_f);
1487 SET_SecondaryColor3bvEXT(dest, loopback_SecondaryColor3bvEXT_f);
1488 SET_SecondaryColor3dvEXT(dest, loopback_SecondaryColor3dvEXT_f);
1489 SET_SecondaryColor3ivEXT(dest, loopback_SecondaryColor3ivEXT_f);
1490 SET_SecondaryColor3svEXT(dest, loopback_SecondaryColor3svEXT_f);
1491 SET_SecondaryColor3uivEXT(dest, loopback_SecondaryColor3uivEXT_f);
1492 SET_SecondaryColor3usvEXT(dest, loopback_SecondaryColor3usvEXT_f);
1493 SET_SecondaryColor3ubvEXT(dest, loopback_SecondaryColor3ubvEXT_f);
Keith Whitwellae0eaf92003-11-24 15:23:18 +00001494
Brian Paul94b30dc2006-04-25 00:53:25 +00001495 SET_EdgeFlagv(dest, loopback_EdgeFlagv);
1496
Ian Romanick9bdfee32005-07-18 12:31:24 +00001497 SET_Indexd(dest, loopback_Indexd);
1498 SET_Indexi(dest, loopback_Indexi);
1499 SET_Indexs(dest, loopback_Indexs);
1500 SET_Indexub(dest, loopback_Indexub);
1501 SET_Indexdv(dest, loopback_Indexdv);
1502 SET_Indexiv(dest, loopback_Indexiv);
1503 SET_Indexsv(dest, loopback_Indexsv);
1504 SET_Indexubv(dest, loopback_Indexubv);
1505 SET_Normal3b(dest, loopback_Normal3b);
1506 SET_Normal3d(dest, loopback_Normal3d);
1507 SET_Normal3i(dest, loopback_Normal3i);
1508 SET_Normal3s(dest, loopback_Normal3s);
1509 SET_Normal3bv(dest, loopback_Normal3bv);
1510 SET_Normal3dv(dest, loopback_Normal3dv);
1511 SET_Normal3iv(dest, loopback_Normal3iv);
1512 SET_Normal3sv(dest, loopback_Normal3sv);
1513 SET_TexCoord1d(dest, loopback_TexCoord1d);
1514 SET_TexCoord1i(dest, loopback_TexCoord1i);
1515 SET_TexCoord1s(dest, loopback_TexCoord1s);
1516 SET_TexCoord2d(dest, loopback_TexCoord2d);
1517 SET_TexCoord2s(dest, loopback_TexCoord2s);
1518 SET_TexCoord2i(dest, loopback_TexCoord2i);
1519 SET_TexCoord3d(dest, loopback_TexCoord3d);
1520 SET_TexCoord3i(dest, loopback_TexCoord3i);
1521 SET_TexCoord3s(dest, loopback_TexCoord3s);
1522 SET_TexCoord4d(dest, loopback_TexCoord4d);
1523 SET_TexCoord4i(dest, loopback_TexCoord4i);
1524 SET_TexCoord4s(dest, loopback_TexCoord4s);
1525 SET_TexCoord1dv(dest, loopback_TexCoord1dv);
1526 SET_TexCoord1iv(dest, loopback_TexCoord1iv);
1527 SET_TexCoord1sv(dest, loopback_TexCoord1sv);
1528 SET_TexCoord2dv(dest, loopback_TexCoord2dv);
1529 SET_TexCoord2iv(dest, loopback_TexCoord2iv);
1530 SET_TexCoord2sv(dest, loopback_TexCoord2sv);
1531 SET_TexCoord3dv(dest, loopback_TexCoord3dv);
1532 SET_TexCoord3iv(dest, loopback_TexCoord3iv);
1533 SET_TexCoord3sv(dest, loopback_TexCoord3sv);
1534 SET_TexCoord4dv(dest, loopback_TexCoord4dv);
1535 SET_TexCoord4iv(dest, loopback_TexCoord4iv);
1536 SET_TexCoord4sv(dest, loopback_TexCoord4sv);
1537 SET_Vertex2d(dest, loopback_Vertex2d);
1538 SET_Vertex2i(dest, loopback_Vertex2i);
1539 SET_Vertex2s(dest, loopback_Vertex2s);
1540 SET_Vertex3d(dest, loopback_Vertex3d);
1541 SET_Vertex3i(dest, loopback_Vertex3i);
1542 SET_Vertex3s(dest, loopback_Vertex3s);
1543 SET_Vertex4d(dest, loopback_Vertex4d);
1544 SET_Vertex4i(dest, loopback_Vertex4i);
1545 SET_Vertex4s(dest, loopback_Vertex4s);
1546 SET_Vertex2dv(dest, loopback_Vertex2dv);
1547 SET_Vertex2iv(dest, loopback_Vertex2iv);
1548 SET_Vertex2sv(dest, loopback_Vertex2sv);
1549 SET_Vertex3dv(dest, loopback_Vertex3dv);
1550 SET_Vertex3iv(dest, loopback_Vertex3iv);
1551 SET_Vertex3sv(dest, loopback_Vertex3sv);
1552 SET_Vertex4dv(dest, loopback_Vertex4dv);
1553 SET_Vertex4iv(dest, loopback_Vertex4iv);
1554 SET_Vertex4sv(dest, loopback_Vertex4sv);
1555 SET_MultiTexCoord1dARB(dest, loopback_MultiTexCoord1dARB);
1556 SET_MultiTexCoord1dvARB(dest, loopback_MultiTexCoord1dvARB);
1557 SET_MultiTexCoord1iARB(dest, loopback_MultiTexCoord1iARB);
1558 SET_MultiTexCoord1ivARB(dest, loopback_MultiTexCoord1ivARB);
1559 SET_MultiTexCoord1sARB(dest, loopback_MultiTexCoord1sARB);
1560 SET_MultiTexCoord1svARB(dest, loopback_MultiTexCoord1svARB);
1561 SET_MultiTexCoord2dARB(dest, loopback_MultiTexCoord2dARB);
1562 SET_MultiTexCoord2dvARB(dest, loopback_MultiTexCoord2dvARB);
1563 SET_MultiTexCoord2iARB(dest, loopback_MultiTexCoord2iARB);
1564 SET_MultiTexCoord2ivARB(dest, loopback_MultiTexCoord2ivARB);
1565 SET_MultiTexCoord2sARB(dest, loopback_MultiTexCoord2sARB);
1566 SET_MultiTexCoord2svARB(dest, loopback_MultiTexCoord2svARB);
1567 SET_MultiTexCoord3dARB(dest, loopback_MultiTexCoord3dARB);
1568 SET_MultiTexCoord3dvARB(dest, loopback_MultiTexCoord3dvARB);
1569 SET_MultiTexCoord3iARB(dest, loopback_MultiTexCoord3iARB);
1570 SET_MultiTexCoord3ivARB(dest, loopback_MultiTexCoord3ivARB);
1571 SET_MultiTexCoord3sARB(dest, loopback_MultiTexCoord3sARB);
1572 SET_MultiTexCoord3svARB(dest, loopback_MultiTexCoord3svARB);
1573 SET_MultiTexCoord4dARB(dest, loopback_MultiTexCoord4dARB);
1574 SET_MultiTexCoord4dvARB(dest, loopback_MultiTexCoord4dvARB);
1575 SET_MultiTexCoord4iARB(dest, loopback_MultiTexCoord4iARB);
1576 SET_MultiTexCoord4ivARB(dest, loopback_MultiTexCoord4ivARB);
1577 SET_MultiTexCoord4sARB(dest, loopback_MultiTexCoord4sARB);
1578 SET_MultiTexCoord4svARB(dest, loopback_MultiTexCoord4svARB);
1579 SET_EvalCoord2dv(dest, loopback_EvalCoord2dv);
1580 SET_EvalCoord2fv(dest, loopback_EvalCoord2fv);
1581 SET_EvalCoord2d(dest, loopback_EvalCoord2d);
1582 SET_EvalCoord1dv(dest, loopback_EvalCoord1dv);
1583 SET_EvalCoord1fv(dest, loopback_EvalCoord1fv);
1584 SET_EvalCoord1d(dest, loopback_EvalCoord1d);
1585 SET_Materialf(dest, loopback_Materialf);
1586 SET_Materiali(dest, loopback_Materiali);
1587 SET_Materialiv(dest, loopback_Materialiv);
1588 SET_Rectd(dest, loopback_Rectd);
1589 SET_Rectdv(dest, loopback_Rectdv);
1590 SET_Rectfv(dest, loopback_Rectfv);
1591 SET_Recti(dest, loopback_Recti);
1592 SET_Rectiv(dest, loopback_Rectiv);
1593 SET_Rects(dest, loopback_Rects);
1594 SET_Rectsv(dest, loopback_Rectsv);
1595 SET_FogCoorddEXT(dest, loopback_FogCoorddEXT);
1596 SET_FogCoorddvEXT(dest, loopback_FogCoorddvEXT);
Brian Paul86b84272001-12-14 02:50:01 +00001597
Ian Romanick9bdfee32005-07-18 12:31:24 +00001598 SET_VertexAttrib1sNV(dest, loopback_VertexAttrib1sNV);
1599 SET_VertexAttrib1dNV(dest, loopback_VertexAttrib1dNV);
1600 SET_VertexAttrib2sNV(dest, loopback_VertexAttrib2sNV);
1601 SET_VertexAttrib2dNV(dest, loopback_VertexAttrib2dNV);
1602 SET_VertexAttrib3sNV(dest, loopback_VertexAttrib3sNV);
1603 SET_VertexAttrib3dNV(dest, loopback_VertexAttrib3dNV);
1604 SET_VertexAttrib4sNV(dest, loopback_VertexAttrib4sNV);
1605 SET_VertexAttrib4dNV(dest, loopback_VertexAttrib4dNV);
1606 SET_VertexAttrib4ubNV(dest, loopback_VertexAttrib4ubNV);
1607 SET_VertexAttrib1svNV(dest, loopback_VertexAttrib1svNV);
1608 SET_VertexAttrib1dvNV(dest, loopback_VertexAttrib1dvNV);
1609 SET_VertexAttrib2svNV(dest, loopback_VertexAttrib2svNV);
1610 SET_VertexAttrib2dvNV(dest, loopback_VertexAttrib2dvNV);
1611 SET_VertexAttrib3svNV(dest, loopback_VertexAttrib3svNV);
1612 SET_VertexAttrib3dvNV(dest, loopback_VertexAttrib3dvNV);
1613 SET_VertexAttrib4svNV(dest, loopback_VertexAttrib4svNV);
1614 SET_VertexAttrib4dvNV(dest, loopback_VertexAttrib4dvNV);
1615 SET_VertexAttrib4ubvNV(dest, loopback_VertexAttrib4ubvNV);
1616 SET_VertexAttribs1svNV(dest, loopback_VertexAttribs1svNV);
1617 SET_VertexAttribs1fvNV(dest, loopback_VertexAttribs1fvNV);
1618 SET_VertexAttribs1dvNV(dest, loopback_VertexAttribs1dvNV);
1619 SET_VertexAttribs2svNV(dest, loopback_VertexAttribs2svNV);
1620 SET_VertexAttribs2fvNV(dest, loopback_VertexAttribs2fvNV);
1621 SET_VertexAttribs2dvNV(dest, loopback_VertexAttribs2dvNV);
1622 SET_VertexAttribs3svNV(dest, loopback_VertexAttribs3svNV);
1623 SET_VertexAttribs3fvNV(dest, loopback_VertexAttribs3fvNV);
1624 SET_VertexAttribs3dvNV(dest, loopback_VertexAttribs3dvNV);
1625 SET_VertexAttribs4svNV(dest, loopback_VertexAttribs4svNV);
1626 SET_VertexAttribs4fvNV(dest, loopback_VertexAttribs4fvNV);
1627 SET_VertexAttribs4dvNV(dest, loopback_VertexAttribs4dvNV);
1628 SET_VertexAttribs4ubvNV(dest, loopback_VertexAttribs4ubvNV);
Brian Paul03c0c2e2002-01-14 16:06:35 +00001629
Ian Romanick9bdfee32005-07-18 12:31:24 +00001630 SET_VertexAttrib1sARB(dest, loopback_VertexAttrib1sARB);
1631 SET_VertexAttrib1dARB(dest, loopback_VertexAttrib1dARB);
1632 SET_VertexAttrib2sARB(dest, loopback_VertexAttrib2sARB);
1633 SET_VertexAttrib2dARB(dest, loopback_VertexAttrib2dARB);
1634 SET_VertexAttrib3sARB(dest, loopback_VertexAttrib3sARB);
1635 SET_VertexAttrib3dARB(dest, loopback_VertexAttrib3dARB);
1636 SET_VertexAttrib4sARB(dest, loopback_VertexAttrib4sARB);
1637 SET_VertexAttrib4dARB(dest, loopback_VertexAttrib4dARB);
1638 SET_VertexAttrib1svARB(dest, loopback_VertexAttrib1svARB);
1639 SET_VertexAttrib1dvARB(dest, loopback_VertexAttrib1dvARB);
1640 SET_VertexAttrib2svARB(dest, loopback_VertexAttrib2svARB);
1641 SET_VertexAttrib2dvARB(dest, loopback_VertexAttrib2dvARB);
1642 SET_VertexAttrib3svARB(dest, loopback_VertexAttrib3svARB);
1643 SET_VertexAttrib3dvARB(dest, loopback_VertexAttrib3dvARB);
1644 SET_VertexAttrib4svARB(dest, loopback_VertexAttrib4svARB);
1645 SET_VertexAttrib4dvARB(dest, loopback_VertexAttrib4dvARB);
1646 SET_VertexAttrib4NubARB(dest, loopback_VertexAttrib4NubARB);
1647 SET_VertexAttrib4NubvARB(dest, loopback_VertexAttrib4NubvARB);
1648 SET_VertexAttrib4bvARB(dest, loopback_VertexAttrib4bvARB);
1649 SET_VertexAttrib4ivARB(dest, loopback_VertexAttrib4ivARB);
1650 SET_VertexAttrib4ubvARB(dest, loopback_VertexAttrib4ubvARB);
1651 SET_VertexAttrib4usvARB(dest, loopback_VertexAttrib4usvARB);
1652 SET_VertexAttrib4uivARB(dest, loopback_VertexAttrib4uivARB);
1653 SET_VertexAttrib4NbvARB(dest, loopback_VertexAttrib4NbvARB);
1654 SET_VertexAttrib4NsvARB(dest, loopback_VertexAttrib4NsvARB);
1655 SET_VertexAttrib4NivARB(dest, loopback_VertexAttrib4NivARB);
1656 SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB);
1657 SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB);
Keith Whitwellb0149862000-11-24 10:30:04 +00001658}