blob: db30059e61d8cdeff68978c3b2cc7231534f07bd [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"
Brian Paul03c0c2e2002-01-14 16:06:35 +000033#include "glapi.h"
Keith Whitwellb0149862000-11-24 10:30:04 +000034#include "glapitable.h"
35#include "macros.h"
36#include "colormac.h"
37#include "api_loopback.h"
Ian Romanickc1d455f2004-05-27 00:03:53 +000038#include "glthread.h"
Ian Romanick9bdfee32005-07-18 12:31:24 +000039#include "mtypes.h"
40#include "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]),
149 INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]) );
150}
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
284static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000285loopback_FogCoorddEXT( GLdouble d )
286{
Brian Paul7c276322001-09-14 21:36:43 +0000287 FOGCOORDF( (GLfloat) d );
Keith Whitwellb0149862000-11-24 10:30:04 +0000288}
289
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000290static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000291loopback_FogCoorddvEXT( const GLdouble *v )
292{
Brian Paul7c276322001-09-14 21:36:43 +0000293 FOGCOORDF( (GLfloat) *v );
Keith Whitwellb0149862000-11-24 10:30:04 +0000294}
295
296
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000297static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000298loopback_Indexd( GLdouble c )
299{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000300 INDEX( (GLfloat) c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000301}
302
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000303static void GLAPIENTRY
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000304loopback_Indexi( GLint c )
Keith Whitwellb0149862000-11-24 10:30:04 +0000305{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000306 INDEX( (GLfloat) c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000307}
308
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000309static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000310loopback_Indexs( GLshort c )
311{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000312 INDEX( (GLfloat) c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000313}
314
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000315static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000316loopback_Indexub( GLubyte c )
317{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000318 INDEX( (GLfloat) c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000319}
320
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000321static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000322loopback_Indexdv( const GLdouble *c )
323{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000324 INDEX( (GLfloat) *c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000325}
326
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000327static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000328loopback_Indexiv( const GLint *c )
329{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000330 INDEX( (GLfloat) *c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000331}
332
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000333static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000334loopback_Indexsv( const GLshort *c )
335{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000336 INDEX( (GLfloat) *c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000337}
338
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000339static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000340loopback_Indexubv( const GLubyte *c )
341{
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000342 INDEX( (GLfloat) *c );
Keith Whitwellb0149862000-11-24 10:30:04 +0000343}
344
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000345static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000346loopback_Normal3b( GLbyte nx, GLbyte ny, GLbyte nz )
347{
348 NORMAL( BYTE_TO_FLOAT(nx), BYTE_TO_FLOAT(ny), BYTE_TO_FLOAT(nz) );
349}
350
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000351static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000352loopback_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz )
353{
Brian Paul7c276322001-09-14 21:36:43 +0000354 NORMAL((GLfloat) nx, (GLfloat) ny, (GLfloat) nz);
Keith Whitwellb0149862000-11-24 10:30:04 +0000355}
356
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000357static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000358loopback_Normal3i( GLint nx, GLint ny, GLint nz )
359{
360 NORMAL( INT_TO_FLOAT(nx), INT_TO_FLOAT(ny), INT_TO_FLOAT(nz) );
361}
362
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000363static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000364loopback_Normal3s( GLshort nx, GLshort ny, GLshort nz )
365{
366 NORMAL( SHORT_TO_FLOAT(nx), SHORT_TO_FLOAT(ny), SHORT_TO_FLOAT(nz) );
367}
368
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000369static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000370loopback_Normal3bv( const GLbyte *v )
371{
372 NORMAL( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]) );
373}
374
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000375static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000376loopback_Normal3dv( const GLdouble *v )
377{
Brian Paul7c276322001-09-14 21:36:43 +0000378 NORMAL( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000379}
380
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000381static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000382loopback_Normal3iv( const GLint *v )
383{
384 NORMAL( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]) );
385}
386
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000387static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000388loopback_Normal3sv( const GLshort *v )
389{
390 NORMAL( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]) );
391}
392
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000393static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000394loopback_TexCoord1d( GLdouble s )
395{
Brian Paul7c276322001-09-14 21:36:43 +0000396 TEXCOORD1((GLfloat) s);
Keith Whitwellb0149862000-11-24 10:30:04 +0000397}
398
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000399static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000400loopback_TexCoord1i( GLint s )
401{
Brian Paul7c276322001-09-14 21:36:43 +0000402 TEXCOORD1((GLfloat) s);
Keith Whitwellb0149862000-11-24 10:30:04 +0000403}
404
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000405static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000406loopback_TexCoord1s( GLshort s )
407{
Brian Paul7c276322001-09-14 21:36:43 +0000408 TEXCOORD1((GLfloat) s);
Keith Whitwellb0149862000-11-24 10:30:04 +0000409}
410
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000411static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000412loopback_TexCoord2d( GLdouble s, GLdouble t )
413{
Brian Paul7c276322001-09-14 21:36:43 +0000414 TEXCOORD2((GLfloat) s,(GLfloat) t);
Keith Whitwellb0149862000-11-24 10:30:04 +0000415}
416
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000417static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000418loopback_TexCoord2s( GLshort s, GLshort t )
419{
Brian Paul7c276322001-09-14 21:36:43 +0000420 TEXCOORD2((GLfloat) s,(GLfloat) t);
Keith Whitwellb0149862000-11-24 10:30:04 +0000421}
422
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000423static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000424loopback_TexCoord2i( GLint s, GLint t )
425{
Brian Paul7c276322001-09-14 21:36:43 +0000426 TEXCOORD2((GLfloat) s,(GLfloat) t);
Keith Whitwellb0149862000-11-24 10:30:04 +0000427}
428
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000429static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000430loopback_TexCoord3d( GLdouble s, GLdouble t, GLdouble r )
431{
Brian Paul7c276322001-09-14 21:36:43 +0000432 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
Keith Whitwellb0149862000-11-24 10:30:04 +0000433}
434
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000435static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000436loopback_TexCoord3i( GLint s, GLint t, GLint r )
437{
Brian Paul7c276322001-09-14 21:36:43 +0000438 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
Keith Whitwellb0149862000-11-24 10:30:04 +0000439}
440
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000441static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000442loopback_TexCoord3s( GLshort s, GLshort t, GLshort r )
443{
Brian Paul7c276322001-09-14 21:36:43 +0000444 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
Keith Whitwellb0149862000-11-24 10:30:04 +0000445}
446
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000447static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000448loopback_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q )
449{
Brian Paul7c276322001-09-14 21:36:43 +0000450 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
Keith Whitwellb0149862000-11-24 10:30:04 +0000451}
452
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000453static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000454loopback_TexCoord4i( GLint s, GLint t, GLint r, GLint q )
455{
Brian Paul7c276322001-09-14 21:36:43 +0000456 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
Keith Whitwellb0149862000-11-24 10:30:04 +0000457}
458
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000459static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000460loopback_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q )
461{
Brian Paul7c276322001-09-14 21:36:43 +0000462 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
Keith Whitwellb0149862000-11-24 10:30:04 +0000463}
464
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000465static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000466loopback_TexCoord1dv( const GLdouble *v )
467{
Brian Paul7c276322001-09-14 21:36:43 +0000468 TEXCOORD1((GLfloat) v[0]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000469}
470
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000471static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000472loopback_TexCoord1iv( const GLint *v )
473{
Brian Paul7c276322001-09-14 21:36:43 +0000474 TEXCOORD1((GLfloat) v[0]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000475}
476
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000477static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000478loopback_TexCoord1sv( const GLshort *v )
479{
Brian Paul7c276322001-09-14 21:36:43 +0000480 TEXCOORD1((GLfloat) v[0]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000481}
482
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000483static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000484loopback_TexCoord2dv( const GLdouble *v )
485{
Brian Paul7c276322001-09-14 21:36:43 +0000486 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000487}
488
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000489static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000490loopback_TexCoord2iv( const GLint *v )
491{
Brian Paul7c276322001-09-14 21:36:43 +0000492 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000493}
494
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000495static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000496loopback_TexCoord2sv( const GLshort *v )
497{
Brian Paul7c276322001-09-14 21:36:43 +0000498 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000499}
500
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000501static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000502loopback_TexCoord3dv( const GLdouble *v )
503{
Brian Paul7c276322001-09-14 21:36:43 +0000504 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000505}
506
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000507static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000508loopback_TexCoord3iv( const GLint *v )
509{
Brian Paul7c276322001-09-14 21:36:43 +0000510 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000511}
512
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000513static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000514loopback_TexCoord3sv( const GLshort *v )
515{
Brian Paul7c276322001-09-14 21:36:43 +0000516 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000517}
518
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000519static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000520loopback_TexCoord4dv( const GLdouble *v )
521{
Brian Paul7c276322001-09-14 21:36:43 +0000522 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000523}
524
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000525static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000526loopback_TexCoord4iv( const GLint *v )
527{
Brian Paul7c276322001-09-14 21:36:43 +0000528 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000529}
530
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000531static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000532loopback_TexCoord4sv( const GLshort *v )
533{
Brian Paul7c276322001-09-14 21:36:43 +0000534 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000535}
536
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000537static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000538loopback_Vertex2d( GLdouble x, GLdouble y )
539{
540 VERTEX2( (GLfloat) x, (GLfloat) y );
541}
542
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000543static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000544loopback_Vertex2i( GLint x, GLint y )
545{
546 VERTEX2( (GLfloat) x, (GLfloat) y );
547}
548
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000549static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000550loopback_Vertex2s( GLshort x, GLshort y )
551{
552 VERTEX2( (GLfloat) x, (GLfloat) y );
553}
554
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000555static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000556loopback_Vertex3d( GLdouble x, GLdouble y, GLdouble z )
557{
558 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
559}
560
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000561static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000562loopback_Vertex3i( GLint x, GLint y, GLint z )
563{
564 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
565}
566
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000567static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000568loopback_Vertex3s( GLshort x, GLshort y, GLshort z )
569{
570 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
571}
572
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000573static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000574loopback_Vertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w )
575{
576 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
577}
578
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000579static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000580loopback_Vertex4i( GLint x, GLint y, GLint z, GLint w )
581{
582 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
583}
584
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000585static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000586loopback_Vertex4s( GLshort x, GLshort y, GLshort z, GLshort w )
587{
588 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
589}
590
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000591static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000592loopback_Vertex2dv( const GLdouble *v )
593{
594 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
595}
596
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000597static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000598loopback_Vertex2iv( const GLint *v )
599{
600 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
601}
602
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000603static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000604loopback_Vertex2sv( const GLshort *v )
605{
606 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
607}
608
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000609static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000610loopback_Vertex3dv( const GLdouble *v )
611{
612 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
613}
614
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000615static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000616loopback_Vertex3iv( const GLint *v )
617{
618 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
619}
620
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000621static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000622loopback_Vertex3sv( const GLshort *v )
623{
624 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
625}
626
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000627static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000628loopback_Vertex4dv( const GLdouble *v )
629{
Gareth Hughes22144ab2001-03-12 00:48:37 +0000630 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
Keith Whitwellb0149862000-11-24 10:30:04 +0000631 (GLfloat) v[2], (GLfloat) v[3] );
632}
633
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000634static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000635loopback_Vertex4iv( const GLint *v )
636{
Gareth Hughes22144ab2001-03-12 00:48:37 +0000637 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
Keith Whitwellb0149862000-11-24 10:30:04 +0000638 (GLfloat) v[2], (GLfloat) v[3] );
639}
640
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000641static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000642loopback_Vertex4sv( const GLshort *v )
643{
Gareth Hughes22144ab2001-03-12 00:48:37 +0000644 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
Keith Whitwellb0149862000-11-24 10:30:04 +0000645 (GLfloat) v[2], (GLfloat) v[3] );
646}
647
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000648static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000649loopback_MultiTexCoord1dARB(GLenum target, GLdouble s)
650{
Brian Paul7c276322001-09-14 21:36:43 +0000651 MULTI_TEXCOORD1( target, (GLfloat) s );
Keith Whitwellb0149862000-11-24 10:30:04 +0000652}
653
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000654static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000655loopback_MultiTexCoord1dvARB(GLenum target, const GLdouble *v)
656{
Brian Paul7c276322001-09-14 21:36:43 +0000657 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000658}
659
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000660static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000661loopback_MultiTexCoord1iARB(GLenum target, GLint s)
662{
Brian Paul7c276322001-09-14 21:36:43 +0000663 MULTI_TEXCOORD1( target, (GLfloat) s );
Keith Whitwellb0149862000-11-24 10:30:04 +0000664}
665
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000666static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000667loopback_MultiTexCoord1ivARB(GLenum target, const GLint *v)
668{
Brian Paul7c276322001-09-14 21:36:43 +0000669 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000670}
671
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000672static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000673loopback_MultiTexCoord1sARB(GLenum target, GLshort s)
674{
Brian Paul7c276322001-09-14 21:36:43 +0000675 MULTI_TEXCOORD1( target, (GLfloat) s );
Keith Whitwellb0149862000-11-24 10:30:04 +0000676}
677
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000678static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000679loopback_MultiTexCoord1svARB(GLenum target, const GLshort *v)
680{
Brian Paul7c276322001-09-14 21:36:43 +0000681 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000682}
683
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000684static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000685loopback_MultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
686{
Brian Paul7c276322001-09-14 21:36:43 +0000687 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
Keith Whitwellb0149862000-11-24 10:30:04 +0000688}
689
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000690static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000691loopback_MultiTexCoord2dvARB(GLenum target, const GLdouble *v)
692{
Brian Paul7c276322001-09-14 21:36:43 +0000693 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000694}
695
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000696static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000697loopback_MultiTexCoord2iARB(GLenum target, GLint s, GLint t)
698{
Brian Paul7c276322001-09-14 21:36:43 +0000699 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
Keith Whitwellb0149862000-11-24 10:30:04 +0000700}
701
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000702static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000703loopback_MultiTexCoord2ivARB(GLenum target, const GLint *v)
704{
Brian Paul7c276322001-09-14 21:36:43 +0000705 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000706}
707
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000708static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000709loopback_MultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
710{
Brian Paul7c276322001-09-14 21:36:43 +0000711 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
Keith Whitwellb0149862000-11-24 10:30:04 +0000712}
713
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000714static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000715loopback_MultiTexCoord2svARB(GLenum target, const GLshort *v)
716{
Brian Paul7c276322001-09-14 21:36:43 +0000717 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000718}
719
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000720static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000721loopback_MultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
722{
Brian Paul7c276322001-09-14 21:36:43 +0000723 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
Keith Whitwellb0149862000-11-24 10:30:04 +0000724}
725
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000726static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000727loopback_MultiTexCoord3dvARB(GLenum target, const GLdouble *v)
728{
Brian Paul7c276322001-09-14 21:36:43 +0000729 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000730}
731
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000732static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000733loopback_MultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
734{
Brian Paul7c276322001-09-14 21:36:43 +0000735 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
Keith Whitwellb0149862000-11-24 10:30:04 +0000736}
737
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000738static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000739loopback_MultiTexCoord3ivARB(GLenum target, const GLint *v)
740{
Brian Paul7c276322001-09-14 21:36:43 +0000741 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000742}
743
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000744static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000745loopback_MultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
746{
Brian Paul7c276322001-09-14 21:36:43 +0000747 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
Keith Whitwellb0149862000-11-24 10:30:04 +0000748}
749
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000750static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000751loopback_MultiTexCoord3svARB(GLenum target, const GLshort *v)
752{
Brian Paul7c276322001-09-14 21:36:43 +0000753 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000754}
755
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000756static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000757loopback_MultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
758{
Brian Paul7c276322001-09-14 21:36:43 +0000759 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
760 (GLfloat) r, (GLfloat) q );
Keith Whitwellb0149862000-11-24 10:30:04 +0000761}
762
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000763static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000764loopback_MultiTexCoord4dvARB(GLenum target, const GLdouble *v)
765{
Brian Paul7c276322001-09-14 21:36:43 +0000766 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
767 (GLfloat) v[2], (GLfloat) v[3] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000768}
769
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000770static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000771loopback_MultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
772{
Brian Paul7c276322001-09-14 21:36:43 +0000773 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
774 (GLfloat) r, (GLfloat) q );
Keith Whitwellb0149862000-11-24 10:30:04 +0000775}
776
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000777static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000778loopback_MultiTexCoord4ivARB(GLenum target, const GLint *v)
779{
Brian Paul7c276322001-09-14 21:36:43 +0000780 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
781 (GLfloat) v[2], (GLfloat) v[3] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000782}
783
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000784static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000785loopback_MultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
786{
Brian Paul7c276322001-09-14 21:36:43 +0000787 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
788 (GLfloat) r, (GLfloat) q );
Keith Whitwellb0149862000-11-24 10:30:04 +0000789}
790
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000791static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000792loopback_MultiTexCoord4svARB(GLenum target, const GLshort *v)
793{
Brian Paul7c276322001-09-14 21:36:43 +0000794 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
795 (GLfloat) v[2], (GLfloat) v[3] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000796}
797
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000798static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000799loopback_EvalCoord2dv( const GLdouble *u )
800{
801 EVALCOORD2( (GLfloat) u[0], (GLfloat) u[1] );
802}
803
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000804static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000805loopback_EvalCoord2fv( const GLfloat *u )
806{
807 EVALCOORD2( u[0], u[1] );
808}
809
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000810static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000811loopback_EvalCoord2d( GLdouble u, GLdouble v )
812{
813 EVALCOORD2( (GLfloat) u, (GLfloat) v );
814}
815
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000816static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000817loopback_EvalCoord1dv( const GLdouble *u )
818{
819 EVALCOORD1( (GLfloat) *u );
820}
821
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000822static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000823loopback_EvalCoord1fv( const GLfloat *u )
824{
825 EVALCOORD1( (GLfloat) *u );
826}
827
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000828static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000829loopback_EvalCoord1d( GLdouble u )
830{
831 EVALCOORD1( (GLfloat) u );
832}
833
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000834static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000835loopback_Materialf( GLenum face, GLenum pname, GLfloat param )
836{
837 GLfloat fparam[4];
838 fparam[0] = param;
839 MATERIALFV( face, pname, fparam );
840}
841
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000842static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000843loopback_Materiali(GLenum face, GLenum pname, GLint param )
844{
845 GLfloat p = (GLfloat) param;
846 MATERIALFV(face, pname, &p);
847}
848
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000849static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000850loopback_Materialiv(GLenum face, GLenum pname, const GLint *params )
851{
852 GLfloat fparam[4];
853 switch (pname) {
854 case GL_AMBIENT:
855 case GL_DIFFUSE:
856 case GL_SPECULAR:
857 case GL_EMISSION:
858 case GL_AMBIENT_AND_DIFFUSE:
859 fparam[0] = INT_TO_FLOAT( params[0] );
860 fparam[1] = INT_TO_FLOAT( params[1] );
861 fparam[2] = INT_TO_FLOAT( params[2] );
862 fparam[3] = INT_TO_FLOAT( params[3] );
863 break;
864 case GL_SHININESS:
865 fparam[0] = (GLfloat) params[0];
866 break;
867 case GL_COLOR_INDEXES:
868 fparam[0] = (GLfloat) params[0];
869 fparam[1] = (GLfloat) params[1];
870 fparam[2] = (GLfloat) params[2];
871 break;
872 default:
873 ;
874 }
875 MATERIALFV(face, pname, fparam);
876}
877
878
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000879static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000880loopback_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
881{
Brian Paul7c276322001-09-14 21:36:43 +0000882 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
Keith Whitwellb0149862000-11-24 10:30:04 +0000883}
884
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000885static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000886loopback_Rectdv(const GLdouble *v1, const GLdouble *v2)
887{
Brian Paul7c276322001-09-14 21:36:43 +0000888 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000889}
890
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000891static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000892loopback_Rectfv(const GLfloat *v1, const GLfloat *v2)
893{
894 RECTF(v1[0], v1[1], v2[0], v2[1]);
895}
896
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000897static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000898loopback_Recti(GLint x1, GLint y1, GLint x2, GLint y2)
899{
Brian Paul7c276322001-09-14 21:36:43 +0000900 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
Keith Whitwellb0149862000-11-24 10:30:04 +0000901}
902
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000903static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000904loopback_Rectiv(const GLint *v1, const GLint *v2)
905{
Brian Paul7c276322001-09-14 21:36:43 +0000906 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000907}
908
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000909static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000910loopback_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
911{
Brian Paul7c276322001-09-14 21:36:43 +0000912 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
Keith Whitwellb0149862000-11-24 10:30:04 +0000913}
914
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000915static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000916loopback_Rectsv(const GLshort *v1, const GLshort *v2)
917{
Brian Paul7c276322001-09-14 21:36:43 +0000918 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
Keith Whitwellb0149862000-11-24 10:30:04 +0000919}
920
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000921static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000922loopback_SecondaryColor3bEXT_f( GLbyte red, GLbyte green, GLbyte blue )
923{
924 SECONDARYCOLORF( BYTE_TO_FLOAT(red),
925 BYTE_TO_FLOAT(green),
926 BYTE_TO_FLOAT(blue) );
927}
928
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000929static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000930loopback_SecondaryColor3dEXT_f( GLdouble red, GLdouble green, GLdouble blue )
931{
Brian Paul7c276322001-09-14 21:36:43 +0000932 SECONDARYCOLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue );
Keith Whitwellb0149862000-11-24 10:30:04 +0000933}
934
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000935static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000936loopback_SecondaryColor3iEXT_f( GLint red, GLint green, GLint blue )
937{
938 SECONDARYCOLORF( INT_TO_FLOAT(red),
939 INT_TO_FLOAT(green),
940 INT_TO_FLOAT(blue));
941}
942
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000943static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000944loopback_SecondaryColor3sEXT_f( GLshort red, GLshort green, GLshort blue )
945{
946 SECONDARYCOLORF(SHORT_TO_FLOAT(red),
947 SHORT_TO_FLOAT(green),
948 SHORT_TO_FLOAT(blue));
949}
950
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000951static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000952loopback_SecondaryColor3uiEXT_f( GLuint red, GLuint green, GLuint blue )
953{
954 SECONDARYCOLORF(UINT_TO_FLOAT(red),
955 UINT_TO_FLOAT(green),
956 UINT_TO_FLOAT(blue));
957}
958
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000959static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000960loopback_SecondaryColor3usEXT_f( GLushort red, GLushort green, GLushort blue )
961{
962 SECONDARYCOLORF(USHORT_TO_FLOAT(red),
963 USHORT_TO_FLOAT(green),
964 USHORT_TO_FLOAT(blue));
965}
966
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000967static void GLAPIENTRY
Keith Whitwellae0eaf92003-11-24 15:23:18 +0000968loopback_SecondaryColor3ubEXT_f( GLubyte red, GLubyte green, GLubyte blue )
969{
970 SECONDARYCOLORF(UBYTE_TO_FLOAT(red),
971 UBYTE_TO_FLOAT(green),
972 UBYTE_TO_FLOAT(blue));
973}
974
975static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000976loopback_SecondaryColor3bvEXT_f( const GLbyte *v )
977{
978 SECONDARYCOLORF(BYTE_TO_FLOAT(v[0]),
979 BYTE_TO_FLOAT(v[1]),
980 BYTE_TO_FLOAT(v[2]));
981}
982
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000983static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000984loopback_SecondaryColor3dvEXT_f( const GLdouble *v )
985{
Brian Paul7c276322001-09-14 21:36:43 +0000986 SECONDARYCOLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
Keith Whitwellb0149862000-11-24 10:30:04 +0000987}
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000988static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000989loopback_SecondaryColor3ivEXT_f( const GLint *v )
990{
991 SECONDARYCOLORF(INT_TO_FLOAT(v[0]),
992 INT_TO_FLOAT(v[1]),
993 INT_TO_FLOAT(v[2]));
994}
995
Kendall Bennettc40d1dd2003-10-21 22:22:17 +0000996static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +0000997loopback_SecondaryColor3svEXT_f( const GLshort *v )
998{
999 SECONDARYCOLORF(SHORT_TO_FLOAT(v[0]),
1000 SHORT_TO_FLOAT(v[1]),
1001 SHORT_TO_FLOAT(v[2]));
1002}
1003
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001004static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +00001005loopback_SecondaryColor3uivEXT_f( const GLuint *v )
1006{
1007 SECONDARYCOLORF(UINT_TO_FLOAT(v[0]),
1008 UINT_TO_FLOAT(v[1]),
1009 UINT_TO_FLOAT(v[2]));
1010}
1011
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001012static void GLAPIENTRY
Keith Whitwellb0149862000-11-24 10:30:04 +00001013loopback_SecondaryColor3usvEXT_f( const GLushort *v )
1014{
1015 SECONDARYCOLORF(USHORT_TO_FLOAT(v[0]),
1016 USHORT_TO_FLOAT(v[1]),
1017 USHORT_TO_FLOAT(v[2]));
1018}
1019
Keith Whitwellae0eaf92003-11-24 15:23:18 +00001020static void GLAPIENTRY
1021loopback_SecondaryColor3ubvEXT_f( const GLubyte *v )
1022{
1023 SECONDARYCOLORF(UBYTE_TO_FLOAT(v[0]),
1024 UBYTE_TO_FLOAT(v[1]),
1025 UBYTE_TO_FLOAT(v[2]));
1026}
1027
Keith Whitwellb0149862000-11-24 10:30:04 +00001028
Brian Paul86b84272001-12-14 02:50:01 +00001029/*
Brian Paulb5b8d222004-11-27 20:07:08 +00001030 * GL_NV_vertex_program:
1031 * Always loop-back to one of the VertexAttrib[1234]f[v]NV functions.
Brian Paul86b84272001-12-14 02:50:01 +00001032 */
1033
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001034static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001035loopback_VertexAttrib1sNV(GLuint index, GLshort x)
1036{
Brian Paulb5b8d222004-11-27 20:07:08 +00001037 ATTRIB1NV(index, (GLfloat) x);
Brian Paul86b84272001-12-14 02:50:01 +00001038}
1039
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001040static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001041loopback_VertexAttrib1dNV(GLuint index, GLdouble x)
1042{
Brian Paulb5b8d222004-11-27 20:07:08 +00001043 ATTRIB1NV(index, (GLfloat) x);
Brian Paul86b84272001-12-14 02:50:01 +00001044}
1045
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001046static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001047loopback_VertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
1048{
Brian Paulb5b8d222004-11-27 20:07:08 +00001049 ATTRIB2NV(index, (GLfloat) x, y);
Brian Paul86b84272001-12-14 02:50:01 +00001050}
1051
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001052static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001053loopback_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
1054{
Brian Paulb5b8d222004-11-27 20:07:08 +00001055 ATTRIB2NV(index, (GLfloat) x, (GLfloat) y);
Brian Paul86b84272001-12-14 02:50:01 +00001056}
1057
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001058static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001059loopback_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
1060{
Brian Paulb5b8d222004-11-27 20:07:08 +00001061 ATTRIB3NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
Brian Paul86b84272001-12-14 02:50:01 +00001062}
1063
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001064static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001065loopback_VertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
1066{
Brian Paulb5b8d222004-11-27 20:07:08 +00001067 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
Brian Paul86b84272001-12-14 02:50:01 +00001068}
1069
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001070static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001071loopback_VertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
1072{
Brian Paulb5b8d222004-11-27 20:07:08 +00001073 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
Brian Paul86b84272001-12-14 02:50:01 +00001074}
1075
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001076static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001077loopback_VertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1078{
Brian Paulb5b8d222004-11-27 20:07:08 +00001079 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
Brian Paul86b84272001-12-14 02:50:01 +00001080}
1081
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001082static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001083loopback_VertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
1084{
Brian Paulb5b8d222004-11-27 20:07:08 +00001085 ATTRIB4NV(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
Brian Paul86b84272001-12-14 02:50:01 +00001086 UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
1087}
1088
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001089static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001090loopback_VertexAttrib1svNV(GLuint index, const GLshort *v)
1091{
Brian Paulb5b8d222004-11-27 20:07:08 +00001092 ATTRIB1NV(index, (GLfloat) v[0]);
Brian Paul86b84272001-12-14 02:50:01 +00001093}
1094
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001095static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001096loopback_VertexAttrib1dvNV(GLuint index, const GLdouble *v)
1097{
Brian Paulb5b8d222004-11-27 20:07:08 +00001098 ATTRIB1NV(index, (GLfloat) v[0]);
Brian Paul86b84272001-12-14 02:50:01 +00001099}
1100
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001101static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001102loopback_VertexAttrib2svNV(GLuint index, const GLshort *v)
1103{
Brian Paulb5b8d222004-11-27 20:07:08 +00001104 ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
Brian Paul86b84272001-12-14 02:50:01 +00001105}
1106
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001107static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001108loopback_VertexAttrib2dvNV(GLuint index, const GLdouble *v)
1109{
Brian Paulb5b8d222004-11-27 20:07:08 +00001110 ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
Brian Paul86b84272001-12-14 02:50:01 +00001111}
1112
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001113static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001114loopback_VertexAttrib3svNV(GLuint index, const GLshort *v)
1115{
Brian Paulb5b8d222004-11-27 20:07:08 +00001116 ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
Brian Paul86b84272001-12-14 02:50:01 +00001117}
1118
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001119static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001120loopback_VertexAttrib3dvNV(GLuint index, const GLdouble *v)
1121{
Brian Paulb5b8d222004-11-27 20:07:08 +00001122 ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
Brian Paul86b84272001-12-14 02:50:01 +00001123}
1124
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001125static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001126loopback_VertexAttrib4svNV(GLuint index, const GLshort *v)
1127{
Brian Paulb5b8d222004-11-27 20:07:08 +00001128 ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
Keith Whitwell33ce4052003-04-05 07:29:23 +00001129 (GLfloat)v[3]);
Brian Paul86b84272001-12-14 02:50:01 +00001130}
1131
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001132static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001133loopback_VertexAttrib4dvNV(GLuint index, const GLdouble *v)
1134{
Brian Paulb5b8d222004-11-27 20:07:08 +00001135 ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paul86b84272001-12-14 02:50:01 +00001136}
1137
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001138static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001139loopback_VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
1140{
Brian Paulb5b8d222004-11-27 20:07:08 +00001141 ATTRIB4NV(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
Brian Paul86b84272001-12-14 02:50:01 +00001142 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
1143}
1144
1145
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001146static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001147loopback_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v)
1148{
1149 GLint i;
1150 for (i = n - 1; i >= 0; i--)
1151 loopback_VertexAttrib1svNV(index + i, v + i);
1152}
1153
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001154static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001155loopback_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v)
1156{
1157 GLint i;
1158 for (i = n - 1; i >= 0; i--)
Brian Paulb5b8d222004-11-27 20:07:08 +00001159 ATTRIB1NV(index + i, v[i]);
Brian Paul86b84272001-12-14 02:50:01 +00001160}
1161
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001162static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001163loopback_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v)
1164{
1165 GLint i;
1166 for (i = n - 1; i >= 0; i--)
1167 loopback_VertexAttrib1dvNV(index + i, v + i);
1168}
1169
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001170static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001171loopback_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v)
1172{
1173 GLint i;
1174 for (i = n - 1; i >= 0; i--)
1175 loopback_VertexAttrib2svNV(index + i, v + 2 * i);
1176}
1177
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001178static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001179loopback_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v)
1180{
1181 GLint i;
1182 for (i = n - 1; i >= 0; i--)
Brian Paulb5b8d222004-11-27 20:07:08 +00001183 ATTRIB2NV(index + i, v[2 * i], v[2 * i + 1]);
Brian Paul86b84272001-12-14 02:50:01 +00001184}
1185
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001186static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001187loopback_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v)
1188{
1189 GLint i;
1190 for (i = n - 1; i >= 0; i--)
1191 loopback_VertexAttrib2dvNV(index + i, v + 2 * i);
1192}
1193
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001194static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001195loopback_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v)
1196{
1197 GLint i;
1198 for (i = n - 1; i >= 0; i--)
1199 loopback_VertexAttrib3svNV(index + i, v + 3 * i);
1200}
1201
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001202static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001203loopback_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v)
1204{
1205 GLint i;
1206 for (i = n - 1; i >= 0; i--)
Brian Paulb5b8d222004-11-27 20:07:08 +00001207 ATTRIB3NV(index + i, v[3 * i], v[3 * i + 1], v[3 * i + 2]);
Brian Paul86b84272001-12-14 02:50:01 +00001208}
1209
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001210static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001211loopback_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v)
1212{
1213 GLint i;
1214 for (i = n - 1; i >= 0; i--)
1215 loopback_VertexAttrib3dvNV(index + i, v + 3 * i);
1216}
1217
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001218static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001219loopback_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v)
1220{
1221 GLint i;
1222 for (i = n - 1; i >= 0; i--)
1223 loopback_VertexAttrib4svNV(index + i, v + 4 * i);
1224}
1225
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001226static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001227loopback_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v)
1228{
1229 GLint i;
1230 for (i = n - 1; i >= 0; i--)
Brian Paulb5b8d222004-11-27 20:07:08 +00001231 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 +00001232}
1233
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001234static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001235loopback_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v)
1236{
1237 GLint i;
1238 for (i = n - 1; i >= 0; i--)
1239 loopback_VertexAttrib4dvNV(index + i, v + 4 * i);
1240}
1241
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001242static void GLAPIENTRY
Brian Paul86b84272001-12-14 02:50:01 +00001243loopback_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
1244{
1245 GLint i;
1246 for (i = n - 1; i >= 0; i--)
1247 loopback_VertexAttrib4ubvNV(index + i, v + 4 * i);
1248}
1249
Keith Whitwellcab974c2000-12-26 05:09:27 +00001250
Brian Paule591ad72003-05-10 04:37:47 +00001251/*
1252 * GL_ARB_vertex_program
Brian Paulb5b8d222004-11-27 20:07:08 +00001253 * Always loop-back to one of the VertexAttrib[1234]f[v]ARB functions.
Brian Paule591ad72003-05-10 04:37:47 +00001254 */
1255
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001256static void GLAPIENTRY
Brian Paulb5b8d222004-11-27 20:07:08 +00001257loopback_VertexAttrib1sARB(GLuint index, GLshort x)
1258{
1259 ATTRIB1ARB(index, (GLfloat) x);
1260}
1261
1262static void GLAPIENTRY
1263loopback_VertexAttrib1dARB(GLuint index, GLdouble x)
1264{
1265 ATTRIB1ARB(index, (GLfloat) x);
1266}
1267
1268static void GLAPIENTRY
1269loopback_VertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
1270{
1271 ATTRIB2ARB(index, (GLfloat) x, y);
1272}
1273
1274static void GLAPIENTRY
1275loopback_VertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
1276{
1277 ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y);
1278}
1279
1280static void GLAPIENTRY
1281loopback_VertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
1282{
1283 ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
1284}
1285
1286static void GLAPIENTRY
1287loopback_VertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z)
1288{
1289 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
1290}
1291
1292static void GLAPIENTRY
1293loopback_VertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
1294{
1295 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1296}
1297
1298static void GLAPIENTRY
1299loopback_VertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1300{
1301 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1302}
1303
1304static void GLAPIENTRY
1305loopback_VertexAttrib1svARB(GLuint index, const GLshort *v)
1306{
1307 ATTRIB1ARB(index, (GLfloat) v[0]);
1308}
1309
1310static void GLAPIENTRY
1311loopback_VertexAttrib1dvARB(GLuint index, const GLdouble *v)
1312{
1313 ATTRIB1ARB(index, (GLfloat) v[0]);
1314}
1315
1316static void GLAPIENTRY
1317loopback_VertexAttrib2svARB(GLuint index, const GLshort *v)
1318{
1319 ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
1320}
1321
1322static void GLAPIENTRY
1323loopback_VertexAttrib2dvARB(GLuint index, const GLdouble *v)
1324{
1325 ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
1326}
1327
1328static void GLAPIENTRY
1329loopback_VertexAttrib3svARB(GLuint index, const GLshort *v)
1330{
1331 ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1332}
1333
1334static void GLAPIENTRY
1335loopback_VertexAttrib3dvARB(GLuint index, const GLdouble *v)
1336{
1337 ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1338}
1339
1340static void GLAPIENTRY
1341loopback_VertexAttrib4svARB(GLuint index, const GLshort *v)
1342{
1343 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
1344 (GLfloat)v[3]);
1345}
1346
1347static void GLAPIENTRY
1348loopback_VertexAttrib4dvARB(GLuint index, const GLdouble *v)
1349{
1350 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1351}
1352
1353static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001354loopback_VertexAttrib4bvARB(GLuint index, const GLbyte * v)
1355{
Brian Paulb5b8d222004-11-27 20:07:08 +00001356 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001357}
1358
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001359static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001360loopback_VertexAttrib4ivARB(GLuint index, const GLint * v)
1361{
Brian Paulb5b8d222004-11-27 20:07:08 +00001362 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001363}
1364
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001365static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001366loopback_VertexAttrib4ubvARB(GLuint index, const GLubyte * v)
1367{
Brian Paulb5b8d222004-11-27 20:07:08 +00001368 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001369}
1370
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001371static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001372loopback_VertexAttrib4usvARB(GLuint index, const GLushort * v)
1373{
Brian Paulb5b8d222004-11-27 20:07:08 +00001374 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001375}
1376
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001377static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001378loopback_VertexAttrib4uivARB(GLuint index, const GLuint * v)
1379{
Brian Paulb5b8d222004-11-27 20:07:08 +00001380 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
Brian Paule591ad72003-05-10 04:37:47 +00001381}
1382
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001383static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001384loopback_VertexAttrib4NbvARB(GLuint index, const GLbyte * v)
1385{
Brian Paulb5b8d222004-11-27 20:07:08 +00001386 ATTRIB4ARB(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001387 BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]));
1388}
1389
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001390static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001391loopback_VertexAttrib4NsvARB(GLuint index, const GLshort * v)
1392{
Brian Paulb5b8d222004-11-27 20:07:08 +00001393 ATTRIB4ARB(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001394 SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]));
1395}
1396
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001397static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001398loopback_VertexAttrib4NivARB(GLuint index, const GLint * v)
1399{
Brian Paulb5b8d222004-11-27 20:07:08 +00001400 ATTRIB4ARB(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001401 INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]));
1402}
1403
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001404static void GLAPIENTRY
Brian Paulb5b8d222004-11-27 20:07:08 +00001405loopback_VertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
1406{
1407 ATTRIB4ARB(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
1408 UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
1409}
1410
1411static void GLAPIENTRY
1412loopback_VertexAttrib4NubvARB(GLuint index, const GLubyte * v)
1413{
1414 ATTRIB4ARB(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
1415 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
1416}
1417
1418static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001419loopback_VertexAttrib4NusvARB(GLuint index, const GLushort * v)
1420{
Brian Paulb5b8d222004-11-27 20:07:08 +00001421 ATTRIB4ARB(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001422 USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]));
1423}
1424
Kendall Bennettc40d1dd2003-10-21 22:22:17 +00001425static void GLAPIENTRY
Brian Paule591ad72003-05-10 04:37:47 +00001426loopback_VertexAttrib4NuivARB(GLuint index, const GLuint * v)
1427{
Brian Paulb5b8d222004-11-27 20:07:08 +00001428 ATTRIB4ARB(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
Brian Paule591ad72003-05-10 04:37:47 +00001429 UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]));
1430}
1431
1432
Brian Paul03c0c2e2002-01-14 16:06:35 +00001433
Keith Whitwellb0149862000-11-24 10:30:04 +00001434
Keith Whitwellae0eaf92003-11-24 15:23:18 +00001435/*
Keith Whitwellb0149862000-11-24 10:30:04 +00001436 * This code never registers handlers for any of the entry points
Gareth Hughes22144ab2001-03-12 00:48:37 +00001437 * listed in vtxfmt.h.
Keith Whitwellb0149862000-11-24 10:30:04 +00001438 */
1439void
Keith Whitwellae0eaf92003-11-24 15:23:18 +00001440_mesa_loopback_init_api_table( struct _glapi_table *dest )
Keith Whitwellb0149862000-11-24 10:30:04 +00001441{
Ian Romanick9bdfee32005-07-18 12:31:24 +00001442 SET_Color3b(dest, loopback_Color3b_f);
1443 SET_Color3d(dest, loopback_Color3d_f);
1444 SET_Color3i(dest, loopback_Color3i_f);
1445 SET_Color3s(dest, loopback_Color3s_f);
1446 SET_Color3ui(dest, loopback_Color3ui_f);
1447 SET_Color3us(dest, loopback_Color3us_f);
1448 SET_Color3ub(dest, loopback_Color3ub_f);
1449 SET_Color4b(dest, loopback_Color4b_f);
1450 SET_Color4d(dest, loopback_Color4d_f);
1451 SET_Color4i(dest, loopback_Color4i_f);
1452 SET_Color4s(dest, loopback_Color4s_f);
1453 SET_Color4ui(dest, loopback_Color4ui_f);
1454 SET_Color4us(dest, loopback_Color4us_f);
1455 SET_Color4ub(dest, loopback_Color4ub_f);
1456 SET_Color3bv(dest, loopback_Color3bv_f);
1457 SET_Color3dv(dest, loopback_Color3dv_f);
1458 SET_Color3iv(dest, loopback_Color3iv_f);
1459 SET_Color3sv(dest, loopback_Color3sv_f);
1460 SET_Color3uiv(dest, loopback_Color3uiv_f);
1461 SET_Color3usv(dest, loopback_Color3usv_f);
1462 SET_Color3ubv(dest, loopback_Color3ubv_f);
1463 SET_Color4bv(dest, loopback_Color4bv_f);
1464 SET_Color4dv(dest, loopback_Color4dv_f);
1465 SET_Color4iv(dest, loopback_Color4iv_f);
1466 SET_Color4sv(dest, loopback_Color4sv_f);
1467 SET_Color4uiv(dest, loopback_Color4uiv_f);
1468 SET_Color4usv(dest, loopback_Color4usv_f);
1469 SET_Color4ubv(dest, loopback_Color4ubv_f);
Keith Whitwellb0149862000-11-24 10:30:04 +00001470
Ian Romanick9bdfee32005-07-18 12:31:24 +00001471 SET_SecondaryColor3bEXT(dest, loopback_SecondaryColor3bEXT_f);
1472 SET_SecondaryColor3dEXT(dest, loopback_SecondaryColor3dEXT_f);
1473 SET_SecondaryColor3iEXT(dest, loopback_SecondaryColor3iEXT_f);
1474 SET_SecondaryColor3sEXT(dest, loopback_SecondaryColor3sEXT_f);
1475 SET_SecondaryColor3uiEXT(dest, loopback_SecondaryColor3uiEXT_f);
1476 SET_SecondaryColor3usEXT(dest, loopback_SecondaryColor3usEXT_f);
1477 SET_SecondaryColor3ubEXT(dest, loopback_SecondaryColor3ubEXT_f);
1478 SET_SecondaryColor3bvEXT(dest, loopback_SecondaryColor3bvEXT_f);
1479 SET_SecondaryColor3dvEXT(dest, loopback_SecondaryColor3dvEXT_f);
1480 SET_SecondaryColor3ivEXT(dest, loopback_SecondaryColor3ivEXT_f);
1481 SET_SecondaryColor3svEXT(dest, loopback_SecondaryColor3svEXT_f);
1482 SET_SecondaryColor3uivEXT(dest, loopback_SecondaryColor3uivEXT_f);
1483 SET_SecondaryColor3usvEXT(dest, loopback_SecondaryColor3usvEXT_f);
1484 SET_SecondaryColor3ubvEXT(dest, loopback_SecondaryColor3ubvEXT_f);
Keith Whitwellae0eaf92003-11-24 15:23:18 +00001485
Ian Romanick9bdfee32005-07-18 12:31:24 +00001486 SET_Indexd(dest, loopback_Indexd);
1487 SET_Indexi(dest, loopback_Indexi);
1488 SET_Indexs(dest, loopback_Indexs);
1489 SET_Indexub(dest, loopback_Indexub);
1490 SET_Indexdv(dest, loopback_Indexdv);
1491 SET_Indexiv(dest, loopback_Indexiv);
1492 SET_Indexsv(dest, loopback_Indexsv);
1493 SET_Indexubv(dest, loopback_Indexubv);
1494 SET_Normal3b(dest, loopback_Normal3b);
1495 SET_Normal3d(dest, loopback_Normal3d);
1496 SET_Normal3i(dest, loopback_Normal3i);
1497 SET_Normal3s(dest, loopback_Normal3s);
1498 SET_Normal3bv(dest, loopback_Normal3bv);
1499 SET_Normal3dv(dest, loopback_Normal3dv);
1500 SET_Normal3iv(dest, loopback_Normal3iv);
1501 SET_Normal3sv(dest, loopback_Normal3sv);
1502 SET_TexCoord1d(dest, loopback_TexCoord1d);
1503 SET_TexCoord1i(dest, loopback_TexCoord1i);
1504 SET_TexCoord1s(dest, loopback_TexCoord1s);
1505 SET_TexCoord2d(dest, loopback_TexCoord2d);
1506 SET_TexCoord2s(dest, loopback_TexCoord2s);
1507 SET_TexCoord2i(dest, loopback_TexCoord2i);
1508 SET_TexCoord3d(dest, loopback_TexCoord3d);
1509 SET_TexCoord3i(dest, loopback_TexCoord3i);
1510 SET_TexCoord3s(dest, loopback_TexCoord3s);
1511 SET_TexCoord4d(dest, loopback_TexCoord4d);
1512 SET_TexCoord4i(dest, loopback_TexCoord4i);
1513 SET_TexCoord4s(dest, loopback_TexCoord4s);
1514 SET_TexCoord1dv(dest, loopback_TexCoord1dv);
1515 SET_TexCoord1iv(dest, loopback_TexCoord1iv);
1516 SET_TexCoord1sv(dest, loopback_TexCoord1sv);
1517 SET_TexCoord2dv(dest, loopback_TexCoord2dv);
1518 SET_TexCoord2iv(dest, loopback_TexCoord2iv);
1519 SET_TexCoord2sv(dest, loopback_TexCoord2sv);
1520 SET_TexCoord3dv(dest, loopback_TexCoord3dv);
1521 SET_TexCoord3iv(dest, loopback_TexCoord3iv);
1522 SET_TexCoord3sv(dest, loopback_TexCoord3sv);
1523 SET_TexCoord4dv(dest, loopback_TexCoord4dv);
1524 SET_TexCoord4iv(dest, loopback_TexCoord4iv);
1525 SET_TexCoord4sv(dest, loopback_TexCoord4sv);
1526 SET_Vertex2d(dest, loopback_Vertex2d);
1527 SET_Vertex2i(dest, loopback_Vertex2i);
1528 SET_Vertex2s(dest, loopback_Vertex2s);
1529 SET_Vertex3d(dest, loopback_Vertex3d);
1530 SET_Vertex3i(dest, loopback_Vertex3i);
1531 SET_Vertex3s(dest, loopback_Vertex3s);
1532 SET_Vertex4d(dest, loopback_Vertex4d);
1533 SET_Vertex4i(dest, loopback_Vertex4i);
1534 SET_Vertex4s(dest, loopback_Vertex4s);
1535 SET_Vertex2dv(dest, loopback_Vertex2dv);
1536 SET_Vertex2iv(dest, loopback_Vertex2iv);
1537 SET_Vertex2sv(dest, loopback_Vertex2sv);
1538 SET_Vertex3dv(dest, loopback_Vertex3dv);
1539 SET_Vertex3iv(dest, loopback_Vertex3iv);
1540 SET_Vertex3sv(dest, loopback_Vertex3sv);
1541 SET_Vertex4dv(dest, loopback_Vertex4dv);
1542 SET_Vertex4iv(dest, loopback_Vertex4iv);
1543 SET_Vertex4sv(dest, loopback_Vertex4sv);
1544 SET_MultiTexCoord1dARB(dest, loopback_MultiTexCoord1dARB);
1545 SET_MultiTexCoord1dvARB(dest, loopback_MultiTexCoord1dvARB);
1546 SET_MultiTexCoord1iARB(dest, loopback_MultiTexCoord1iARB);
1547 SET_MultiTexCoord1ivARB(dest, loopback_MultiTexCoord1ivARB);
1548 SET_MultiTexCoord1sARB(dest, loopback_MultiTexCoord1sARB);
1549 SET_MultiTexCoord1svARB(dest, loopback_MultiTexCoord1svARB);
1550 SET_MultiTexCoord2dARB(dest, loopback_MultiTexCoord2dARB);
1551 SET_MultiTexCoord2dvARB(dest, loopback_MultiTexCoord2dvARB);
1552 SET_MultiTexCoord2iARB(dest, loopback_MultiTexCoord2iARB);
1553 SET_MultiTexCoord2ivARB(dest, loopback_MultiTexCoord2ivARB);
1554 SET_MultiTexCoord2sARB(dest, loopback_MultiTexCoord2sARB);
1555 SET_MultiTexCoord2svARB(dest, loopback_MultiTexCoord2svARB);
1556 SET_MultiTexCoord3dARB(dest, loopback_MultiTexCoord3dARB);
1557 SET_MultiTexCoord3dvARB(dest, loopback_MultiTexCoord3dvARB);
1558 SET_MultiTexCoord3iARB(dest, loopback_MultiTexCoord3iARB);
1559 SET_MultiTexCoord3ivARB(dest, loopback_MultiTexCoord3ivARB);
1560 SET_MultiTexCoord3sARB(dest, loopback_MultiTexCoord3sARB);
1561 SET_MultiTexCoord3svARB(dest, loopback_MultiTexCoord3svARB);
1562 SET_MultiTexCoord4dARB(dest, loopback_MultiTexCoord4dARB);
1563 SET_MultiTexCoord4dvARB(dest, loopback_MultiTexCoord4dvARB);
1564 SET_MultiTexCoord4iARB(dest, loopback_MultiTexCoord4iARB);
1565 SET_MultiTexCoord4ivARB(dest, loopback_MultiTexCoord4ivARB);
1566 SET_MultiTexCoord4sARB(dest, loopback_MultiTexCoord4sARB);
1567 SET_MultiTexCoord4svARB(dest, loopback_MultiTexCoord4svARB);
1568 SET_EvalCoord2dv(dest, loopback_EvalCoord2dv);
1569 SET_EvalCoord2fv(dest, loopback_EvalCoord2fv);
1570 SET_EvalCoord2d(dest, loopback_EvalCoord2d);
1571 SET_EvalCoord1dv(dest, loopback_EvalCoord1dv);
1572 SET_EvalCoord1fv(dest, loopback_EvalCoord1fv);
1573 SET_EvalCoord1d(dest, loopback_EvalCoord1d);
1574 SET_Materialf(dest, loopback_Materialf);
1575 SET_Materiali(dest, loopback_Materiali);
1576 SET_Materialiv(dest, loopback_Materialiv);
1577 SET_Rectd(dest, loopback_Rectd);
1578 SET_Rectdv(dest, loopback_Rectdv);
1579 SET_Rectfv(dest, loopback_Rectfv);
1580 SET_Recti(dest, loopback_Recti);
1581 SET_Rectiv(dest, loopback_Rectiv);
1582 SET_Rects(dest, loopback_Rects);
1583 SET_Rectsv(dest, loopback_Rectsv);
1584 SET_FogCoorddEXT(dest, loopback_FogCoorddEXT);
1585 SET_FogCoorddvEXT(dest, loopback_FogCoorddvEXT);
Brian Paul86b84272001-12-14 02:50:01 +00001586
Ian Romanick9bdfee32005-07-18 12:31:24 +00001587 SET_VertexAttrib1sNV(dest, loopback_VertexAttrib1sNV);
1588 SET_VertexAttrib1dNV(dest, loopback_VertexAttrib1dNV);
1589 SET_VertexAttrib2sNV(dest, loopback_VertexAttrib2sNV);
1590 SET_VertexAttrib2dNV(dest, loopback_VertexAttrib2dNV);
1591 SET_VertexAttrib3sNV(dest, loopback_VertexAttrib3sNV);
1592 SET_VertexAttrib3dNV(dest, loopback_VertexAttrib3dNV);
1593 SET_VertexAttrib4sNV(dest, loopback_VertexAttrib4sNV);
1594 SET_VertexAttrib4dNV(dest, loopback_VertexAttrib4dNV);
1595 SET_VertexAttrib4ubNV(dest, loopback_VertexAttrib4ubNV);
1596 SET_VertexAttrib1svNV(dest, loopback_VertexAttrib1svNV);
1597 SET_VertexAttrib1dvNV(dest, loopback_VertexAttrib1dvNV);
1598 SET_VertexAttrib2svNV(dest, loopback_VertexAttrib2svNV);
1599 SET_VertexAttrib2dvNV(dest, loopback_VertexAttrib2dvNV);
1600 SET_VertexAttrib3svNV(dest, loopback_VertexAttrib3svNV);
1601 SET_VertexAttrib3dvNV(dest, loopback_VertexAttrib3dvNV);
1602 SET_VertexAttrib4svNV(dest, loopback_VertexAttrib4svNV);
1603 SET_VertexAttrib4dvNV(dest, loopback_VertexAttrib4dvNV);
1604 SET_VertexAttrib4ubvNV(dest, loopback_VertexAttrib4ubvNV);
1605 SET_VertexAttribs1svNV(dest, loopback_VertexAttribs1svNV);
1606 SET_VertexAttribs1fvNV(dest, loopback_VertexAttribs1fvNV);
1607 SET_VertexAttribs1dvNV(dest, loopback_VertexAttribs1dvNV);
1608 SET_VertexAttribs2svNV(dest, loopback_VertexAttribs2svNV);
1609 SET_VertexAttribs2fvNV(dest, loopback_VertexAttribs2fvNV);
1610 SET_VertexAttribs2dvNV(dest, loopback_VertexAttribs2dvNV);
1611 SET_VertexAttribs3svNV(dest, loopback_VertexAttribs3svNV);
1612 SET_VertexAttribs3fvNV(dest, loopback_VertexAttribs3fvNV);
1613 SET_VertexAttribs3dvNV(dest, loopback_VertexAttribs3dvNV);
1614 SET_VertexAttribs4svNV(dest, loopback_VertexAttribs4svNV);
1615 SET_VertexAttribs4fvNV(dest, loopback_VertexAttribs4fvNV);
1616 SET_VertexAttribs4dvNV(dest, loopback_VertexAttribs4dvNV);
1617 SET_VertexAttribs4ubvNV(dest, loopback_VertexAttribs4ubvNV);
Brian Paul03c0c2e2002-01-14 16:06:35 +00001618
Ian Romanick9bdfee32005-07-18 12:31:24 +00001619 SET_VertexAttrib1sARB(dest, loopback_VertexAttrib1sARB);
1620 SET_VertexAttrib1dARB(dest, loopback_VertexAttrib1dARB);
1621 SET_VertexAttrib2sARB(dest, loopback_VertexAttrib2sARB);
1622 SET_VertexAttrib2dARB(dest, loopback_VertexAttrib2dARB);
1623 SET_VertexAttrib3sARB(dest, loopback_VertexAttrib3sARB);
1624 SET_VertexAttrib3dARB(dest, loopback_VertexAttrib3dARB);
1625 SET_VertexAttrib4sARB(dest, loopback_VertexAttrib4sARB);
1626 SET_VertexAttrib4dARB(dest, loopback_VertexAttrib4dARB);
1627 SET_VertexAttrib1svARB(dest, loopback_VertexAttrib1svARB);
1628 SET_VertexAttrib1dvARB(dest, loopback_VertexAttrib1dvARB);
1629 SET_VertexAttrib2svARB(dest, loopback_VertexAttrib2svARB);
1630 SET_VertexAttrib2dvARB(dest, loopback_VertexAttrib2dvARB);
1631 SET_VertexAttrib3svARB(dest, loopback_VertexAttrib3svARB);
1632 SET_VertexAttrib3dvARB(dest, loopback_VertexAttrib3dvARB);
1633 SET_VertexAttrib4svARB(dest, loopback_VertexAttrib4svARB);
1634 SET_VertexAttrib4dvARB(dest, loopback_VertexAttrib4dvARB);
1635 SET_VertexAttrib4NubARB(dest, loopback_VertexAttrib4NubARB);
1636 SET_VertexAttrib4NubvARB(dest, loopback_VertexAttrib4NubvARB);
1637 SET_VertexAttrib4bvARB(dest, loopback_VertexAttrib4bvARB);
1638 SET_VertexAttrib4ivARB(dest, loopback_VertexAttrib4ivARB);
1639 SET_VertexAttrib4ubvARB(dest, loopback_VertexAttrib4ubvARB);
1640 SET_VertexAttrib4usvARB(dest, loopback_VertexAttrib4usvARB);
1641 SET_VertexAttrib4uivARB(dest, loopback_VertexAttrib4uivARB);
1642 SET_VertexAttrib4NbvARB(dest, loopback_VertexAttrib4NbvARB);
1643 SET_VertexAttrib4NsvARB(dest, loopback_VertexAttrib4NsvARB);
1644 SET_VertexAttrib4NivARB(dest, loopback_VertexAttrib4NivARB);
1645 SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB);
1646 SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB);
Keith Whitwellb0149862000-11-24 10:30:04 +00001647}