mesa: Standardize names of OpenGL functions.
[mesa.git] / src / mesa / main / api_loopback.c
1 /**
2 * \file api_loopback.c
3 *
4 * \author Keith Whitwell <keith@tungstengraphics.com>
5 */
6
7 /*
8 * Mesa 3-D graphics library
9 * Version: 6.3
10 *
11 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
12 *
13 * 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:
19 *
20 * The above copyright notice and this permission notice shall be included
21 * in all copies or substantial portions of the Software.
22 *
23 * 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.
29 */
30
31
32 #include "glheader.h"
33 #include "macros.h"
34 #include "api_loopback.h"
35 #include "mtypes.h"
36 #include "glapi/glapi.h"
37 #include "glapi/glthread.h"
38 #include "main/dispatch.h"
39 #include "mfeatures.h"
40 #include "main/context.h"
41
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
48 * listed in dd.h. The easiest way for a driver to do this is to
49 * install the supplied software t&l module.
50 */
51 #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))
69
70 #define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x))
71 #define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c))
72
73 #define ATTRIB1NV(index,x) CALL_VertexAttrib1fNV(GET_DISPATCH(), (index,x))
74 #define ATTRIB2NV(index,x,y) CALL_VertexAttrib2fNV(GET_DISPATCH(), (index,x,y))
75 #define ATTRIB3NV(index,x,y,z) CALL_VertexAttrib3fNV(GET_DISPATCH(), (index,x,y,z))
76 #define ATTRIB4NV(index,x,y,z,w) CALL_VertexAttrib4fNV(GET_DISPATCH(), (index,x,y,z,w))
77
78 #define ATTRIB1ARB(index,x) CALL_VertexAttrib1fARB(GET_DISPATCH(), (index,x))
79 #define ATTRIB2ARB(index,x,y) CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,x,y))
80 #define ATTRIB3ARB(index,x,y,z) CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,x,y,z))
81 #define ATTRIB4ARB(index,x,y,z,w) CALL_VertexAttrib4fARB(GET_DISPATCH(), (index,x,y,z,w))
82
83 #define ATTRIBI_1I(index,x) CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index,x))
84 #define ATTRIBI_1UI(index,x) CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index,x))
85 #define ATTRIBI_4I(index,x,y,z,w) CALL_VertexAttribI4iEXT(GET_DISPATCH(), (index,x,y,z,w))
86
87 #define ATTRIBI_4UI(index,x,y,z,w) CALL_VertexAttribI4uiEXT(GET_DISPATCH(), (index,x,y,z,w))
88
89
90 void GLAPIENTRY
91 _mesa_Color3b( GLbyte red, GLbyte green, GLbyte blue )
92 {
93 COLORF( BYTE_TO_FLOAT(red),
94 BYTE_TO_FLOAT(green),
95 BYTE_TO_FLOAT(blue),
96 1.0 );
97 }
98
99 void GLAPIENTRY
100 _mesa_Color3d( GLdouble red, GLdouble green, GLdouble blue )
101 {
102 COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, 1.0 );
103 }
104
105 void GLAPIENTRY
106 _mesa_Color3i( GLint red, GLint green, GLint blue )
107 {
108 COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
109 INT_TO_FLOAT(blue), 1.0);
110 }
111
112 void GLAPIENTRY
113 _mesa_Color3s( GLshort red, GLshort green, GLshort blue )
114 {
115 COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
116 SHORT_TO_FLOAT(blue), 1.0);
117 }
118
119 void GLAPIENTRY
120 _mesa_Color3ui( GLuint red, GLuint green, GLuint blue )
121 {
122 COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
123 UINT_TO_FLOAT(blue), 1.0 );
124 }
125
126 void GLAPIENTRY
127 _mesa_Color3us( GLushort red, GLushort green, GLushort blue )
128 {
129 COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
130 USHORT_TO_FLOAT(blue), 1.0 );
131 }
132
133 void GLAPIENTRY
134 _mesa_Color3ub( GLubyte red, GLubyte green, GLubyte blue )
135 {
136 COLORF( UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
137 UBYTE_TO_FLOAT(blue), 1.0 );
138 }
139
140
141 void GLAPIENTRY
142 _mesa_Color3bv( const GLbyte *v )
143 {
144 COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
145 BYTE_TO_FLOAT(v[2]), 1.0 );
146 }
147
148 void GLAPIENTRY
149 _mesa_Color3dv( const GLdouble *v )
150 {
151 COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0 );
152 }
153
154 void GLAPIENTRY
155 _mesa_Color3iv( const GLint *v )
156 {
157 COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
158 INT_TO_FLOAT(v[2]), 1.0 );
159 }
160
161 void GLAPIENTRY
162 _mesa_Color3sv( const GLshort *v )
163 {
164 COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
165 SHORT_TO_FLOAT(v[2]), 1.0 );
166 }
167
168 void GLAPIENTRY
169 _mesa_Color3uiv( const GLuint *v )
170 {
171 COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
172 UINT_TO_FLOAT(v[2]), 1.0 );
173 }
174
175 void GLAPIENTRY
176 _mesa_Color3usv( const GLushort *v )
177 {
178 COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
179 USHORT_TO_FLOAT(v[2]), 1.0 );
180 }
181
182 void GLAPIENTRY
183 _mesa_Color3ubv( const GLubyte *v )
184 {
185 COLORF( UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
186 UBYTE_TO_FLOAT(v[2]), 1.0 );
187 }
188
189
190 void GLAPIENTRY
191 _mesa_Color4b( GLbyte red, GLbyte green, GLbyte blue,
192 GLbyte alpha )
193 {
194 COLORF( BYTE_TO_FLOAT(red), BYTE_TO_FLOAT(green),
195 BYTE_TO_FLOAT(blue), BYTE_TO_FLOAT(alpha) );
196 }
197
198 void GLAPIENTRY
199 _mesa_Color4d( GLdouble red, GLdouble green, GLdouble blue,
200 GLdouble alpha )
201 {
202 COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, (GLfloat) alpha );
203 }
204
205 void GLAPIENTRY
206 _mesa_Color4i( GLint red, GLint green, GLint blue, GLint alpha )
207 {
208 COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
209 INT_TO_FLOAT(blue), INT_TO_FLOAT(alpha) );
210 }
211
212 void GLAPIENTRY
213 _mesa_Color4s( GLshort red, GLshort green, GLshort blue,
214 GLshort alpha )
215 {
216 COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
217 SHORT_TO_FLOAT(blue), SHORT_TO_FLOAT(alpha) );
218 }
219
220 void GLAPIENTRY
221 _mesa_Color4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha )
222 {
223 COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
224 UINT_TO_FLOAT(blue), UINT_TO_FLOAT(alpha) );
225 }
226
227 void GLAPIENTRY
228 _mesa_Color4us( GLushort red, GLushort green, GLushort blue, GLushort alpha )
229 {
230 COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
231 USHORT_TO_FLOAT(blue), USHORT_TO_FLOAT(alpha) );
232 }
233
234 void GLAPIENTRY
235 _mesa_Color4ub( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha )
236 {
237 COLORF( UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
238 UBYTE_TO_FLOAT(blue), UBYTE_TO_FLOAT(alpha) );
239 }
240
241
242 void GLAPIENTRY
243 _mesa_Color4iv( const GLint *v )
244 {
245 COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
246 INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]) );
247 }
248
249
250 void GLAPIENTRY
251 _mesa_Color4bv( const GLbyte *v )
252 {
253 COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
254 BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]) );
255 }
256
257 void GLAPIENTRY
258 _mesa_Color4dv( const GLdouble *v )
259 {
260 COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3] );
261 }
262
263
264 void GLAPIENTRY
265 _mesa_Color4sv( const GLshort *v)
266 {
267 COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
268 SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]) );
269 }
270
271
272 void GLAPIENTRY
273 _mesa_Color4uiv( const GLuint *v)
274 {
275 COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
276 UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]) );
277 }
278
279 void GLAPIENTRY
280 _mesa_Color4usv( const GLushort *v)
281 {
282 COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
283 USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]) );
284 }
285
286 void GLAPIENTRY
287 _mesa_Color4ubv( const GLubyte *v)
288 {
289 COLORF( UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
290 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]) );
291 }
292
293
294 void GLAPIENTRY
295 _mesa_FogCoordd( GLdouble d )
296 {
297 FOGCOORDF( (GLfloat) d );
298 }
299
300 void GLAPIENTRY
301 _mesa_FogCoorddv( const GLdouble *v )
302 {
303 FOGCOORDF( (GLfloat) *v );
304 }
305
306
307 void GLAPIENTRY
308 _mesa_Indexd( GLdouble c )
309 {
310 INDEX( (GLfloat) c );
311 }
312
313 void GLAPIENTRY
314 _mesa_Indexi( GLint c )
315 {
316 INDEX( (GLfloat) c );
317 }
318
319 void GLAPIENTRY
320 _mesa_Indexs( GLshort c )
321 {
322 INDEX( (GLfloat) c );
323 }
324
325 void GLAPIENTRY
326 _mesa_Indexub( GLubyte c )
327 {
328 INDEX( (GLfloat) c );
329 }
330
331 void GLAPIENTRY
332 _mesa_Indexdv( const GLdouble *c )
333 {
334 INDEX( (GLfloat) *c );
335 }
336
337 void GLAPIENTRY
338 _mesa_Indexiv( const GLint *c )
339 {
340 INDEX( (GLfloat) *c );
341 }
342
343 void GLAPIENTRY
344 _mesa_Indexsv( const GLshort *c )
345 {
346 INDEX( (GLfloat) *c );
347 }
348
349 void GLAPIENTRY
350 _mesa_Indexubv( const GLubyte *c )
351 {
352 INDEX( (GLfloat) *c );
353 }
354
355
356 void GLAPIENTRY
357 _mesa_EdgeFlagv(const GLboolean *flag)
358 {
359 CALL_EdgeFlag(GET_DISPATCH(), (*flag));
360 }
361
362
363 void GLAPIENTRY
364 _mesa_Normal3b( GLbyte nx, GLbyte ny, GLbyte nz )
365 {
366 NORMAL( BYTE_TO_FLOAT(nx), BYTE_TO_FLOAT(ny), BYTE_TO_FLOAT(nz) );
367 }
368
369 void GLAPIENTRY
370 _mesa_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz )
371 {
372 NORMAL((GLfloat) nx, (GLfloat) ny, (GLfloat) nz);
373 }
374
375 void GLAPIENTRY
376 _mesa_Normal3i( GLint nx, GLint ny, GLint nz )
377 {
378 NORMAL( INT_TO_FLOAT(nx), INT_TO_FLOAT(ny), INT_TO_FLOAT(nz) );
379 }
380
381 void GLAPIENTRY
382 _mesa_Normal3s( GLshort nx, GLshort ny, GLshort nz )
383 {
384 NORMAL( SHORT_TO_FLOAT(nx), SHORT_TO_FLOAT(ny), SHORT_TO_FLOAT(nz) );
385 }
386
387 void GLAPIENTRY
388 _mesa_Normal3bv( const GLbyte *v )
389 {
390 NORMAL( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]) );
391 }
392
393 void GLAPIENTRY
394 _mesa_Normal3dv( const GLdouble *v )
395 {
396 NORMAL( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
397 }
398
399 void GLAPIENTRY
400 _mesa_Normal3iv( const GLint *v )
401 {
402 NORMAL( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]) );
403 }
404
405 void GLAPIENTRY
406 _mesa_Normal3sv( const GLshort *v )
407 {
408 NORMAL( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]) );
409 }
410
411 void GLAPIENTRY
412 _mesa_TexCoord1d( GLdouble s )
413 {
414 TEXCOORD1((GLfloat) s);
415 }
416
417 void GLAPIENTRY
418 _mesa_TexCoord1i( GLint s )
419 {
420 TEXCOORD1((GLfloat) s);
421 }
422
423 void GLAPIENTRY
424 _mesa_TexCoord1s( GLshort s )
425 {
426 TEXCOORD1((GLfloat) s);
427 }
428
429 void GLAPIENTRY
430 _mesa_TexCoord2d( GLdouble s, GLdouble t )
431 {
432 TEXCOORD2((GLfloat) s,(GLfloat) t);
433 }
434
435 void GLAPIENTRY
436 _mesa_TexCoord2s( GLshort s, GLshort t )
437 {
438 TEXCOORD2((GLfloat) s,(GLfloat) t);
439 }
440
441 void GLAPIENTRY
442 _mesa_TexCoord2i( GLint s, GLint t )
443 {
444 TEXCOORD2((GLfloat) s,(GLfloat) t);
445 }
446
447 void GLAPIENTRY
448 _mesa_TexCoord3d( GLdouble s, GLdouble t, GLdouble r )
449 {
450 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
451 }
452
453 void GLAPIENTRY
454 _mesa_TexCoord3i( GLint s, GLint t, GLint r )
455 {
456 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
457 }
458
459 void GLAPIENTRY
460 _mesa_TexCoord3s( GLshort s, GLshort t, GLshort r )
461 {
462 TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
463 }
464
465 void GLAPIENTRY
466 _mesa_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q )
467 {
468 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
469 }
470
471 void GLAPIENTRY
472 _mesa_TexCoord4i( GLint s, GLint t, GLint r, GLint q )
473 {
474 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
475 }
476
477 void GLAPIENTRY
478 _mesa_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q )
479 {
480 TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
481 }
482
483 void GLAPIENTRY
484 _mesa_TexCoord1dv( const GLdouble *v )
485 {
486 TEXCOORD1((GLfloat) v[0]);
487 }
488
489 void GLAPIENTRY
490 _mesa_TexCoord1iv( const GLint *v )
491 {
492 TEXCOORD1((GLfloat) v[0]);
493 }
494
495 void GLAPIENTRY
496 _mesa_TexCoord1sv( const GLshort *v )
497 {
498 TEXCOORD1((GLfloat) v[0]);
499 }
500
501 void GLAPIENTRY
502 _mesa_TexCoord2dv( const GLdouble *v )
503 {
504 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
505 }
506
507 void GLAPIENTRY
508 _mesa_TexCoord2iv( const GLint *v )
509 {
510 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
511 }
512
513 void GLAPIENTRY
514 _mesa_TexCoord2sv( const GLshort *v )
515 {
516 TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
517 }
518
519 void GLAPIENTRY
520 _mesa_TexCoord3dv( const GLdouble *v )
521 {
522 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
523 }
524
525 void GLAPIENTRY
526 _mesa_TexCoord3iv( const GLint *v )
527 {
528 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
529 }
530
531 void GLAPIENTRY
532 _mesa_TexCoord3sv( const GLshort *v )
533 {
534 TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
535 }
536
537 void GLAPIENTRY
538 _mesa_TexCoord4dv( const GLdouble *v )
539 {
540 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
541 }
542
543 void GLAPIENTRY
544 _mesa_TexCoord4iv( const GLint *v )
545 {
546 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
547 }
548
549 void GLAPIENTRY
550 _mesa_TexCoord4sv( const GLshort *v )
551 {
552 TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
553 }
554
555 void GLAPIENTRY
556 _mesa_Vertex2d( GLdouble x, GLdouble y )
557 {
558 VERTEX2( (GLfloat) x, (GLfloat) y );
559 }
560
561 void GLAPIENTRY
562 _mesa_Vertex2i( GLint x, GLint y )
563 {
564 VERTEX2( (GLfloat) x, (GLfloat) y );
565 }
566
567 void GLAPIENTRY
568 _mesa_Vertex2s( GLshort x, GLshort y )
569 {
570 VERTEX2( (GLfloat) x, (GLfloat) y );
571 }
572
573 void GLAPIENTRY
574 _mesa_Vertex3d( GLdouble x, GLdouble y, GLdouble z )
575 {
576 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
577 }
578
579 void GLAPIENTRY
580 _mesa_Vertex3i( GLint x, GLint y, GLint z )
581 {
582 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
583 }
584
585 void GLAPIENTRY
586 _mesa_Vertex3s( GLshort x, GLshort y, GLshort z )
587 {
588 VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
589 }
590
591 void GLAPIENTRY
592 _mesa_Vertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w )
593 {
594 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
595 }
596
597 void GLAPIENTRY
598 _mesa_Vertex4i( GLint x, GLint y, GLint z, GLint w )
599 {
600 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
601 }
602
603 void GLAPIENTRY
604 _mesa_Vertex4s( GLshort x, GLshort y, GLshort z, GLshort w )
605 {
606 VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
607 }
608
609 void GLAPIENTRY
610 _mesa_Vertex2dv( const GLdouble *v )
611 {
612 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
613 }
614
615 void GLAPIENTRY
616 _mesa_Vertex2iv( const GLint *v )
617 {
618 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
619 }
620
621 void GLAPIENTRY
622 _mesa_Vertex2sv( const GLshort *v )
623 {
624 VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
625 }
626
627 void GLAPIENTRY
628 _mesa_Vertex3dv( const GLdouble *v )
629 {
630 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
631 }
632
633 void GLAPIENTRY
634 _mesa_Vertex3iv( const GLint *v )
635 {
636 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
637 }
638
639 void GLAPIENTRY
640 _mesa_Vertex3sv( const GLshort *v )
641 {
642 VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
643 }
644
645 void GLAPIENTRY
646 _mesa_Vertex4dv( const GLdouble *v )
647 {
648 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
649 (GLfloat) v[2], (GLfloat) v[3] );
650 }
651
652 void GLAPIENTRY
653 _mesa_Vertex4iv( const GLint *v )
654 {
655 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
656 (GLfloat) v[2], (GLfloat) v[3] );
657 }
658
659 void GLAPIENTRY
660 _mesa_Vertex4sv( const GLshort *v )
661 {
662 VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
663 (GLfloat) v[2], (GLfloat) v[3] );
664 }
665
666 void GLAPIENTRY
667 _mesa_MultiTexCoord1d(GLenum target, GLdouble s)
668 {
669 MULTI_TEXCOORD1( target, (GLfloat) s );
670 }
671
672 void GLAPIENTRY
673 _mesa_MultiTexCoord1dv(GLenum target, const GLdouble *v)
674 {
675 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
676 }
677
678 void GLAPIENTRY
679 _mesa_MultiTexCoord1i(GLenum target, GLint s)
680 {
681 MULTI_TEXCOORD1( target, (GLfloat) s );
682 }
683
684 void GLAPIENTRY
685 _mesa_MultiTexCoord1iv(GLenum target, const GLint *v)
686 {
687 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
688 }
689
690 void GLAPIENTRY
691 _mesa_MultiTexCoord1s(GLenum target, GLshort s)
692 {
693 MULTI_TEXCOORD1( target, (GLfloat) s );
694 }
695
696 void GLAPIENTRY
697 _mesa_MultiTexCoord1sv(GLenum target, const GLshort *v)
698 {
699 MULTI_TEXCOORD1( target, (GLfloat) v[0] );
700 }
701
702 void GLAPIENTRY
703 _mesa_MultiTexCoord2d(GLenum target, GLdouble s, GLdouble t)
704 {
705 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
706 }
707
708 void GLAPIENTRY
709 _mesa_MultiTexCoord2dv(GLenum target, const GLdouble *v)
710 {
711 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
712 }
713
714 void GLAPIENTRY
715 _mesa_MultiTexCoord2i(GLenum target, GLint s, GLint t)
716 {
717 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
718 }
719
720 void GLAPIENTRY
721 _mesa_MultiTexCoord2iv(GLenum target, const GLint *v)
722 {
723 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
724 }
725
726 void GLAPIENTRY
727 _mesa_MultiTexCoord2s(GLenum target, GLshort s, GLshort t)
728 {
729 MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
730 }
731
732 void GLAPIENTRY
733 _mesa_MultiTexCoord2sv(GLenum target, const GLshort *v)
734 {
735 MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
736 }
737
738 void GLAPIENTRY
739 _mesa_MultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r)
740 {
741 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
742 }
743
744 void GLAPIENTRY
745 _mesa_MultiTexCoord3dv(GLenum target, const GLdouble *v)
746 {
747 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
748 }
749
750 void GLAPIENTRY
751 _mesa_MultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r)
752 {
753 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
754 }
755
756 void GLAPIENTRY
757 _mesa_MultiTexCoord3iv(GLenum target, const GLint *v)
758 {
759 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
760 }
761
762 void GLAPIENTRY
763 _mesa_MultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r)
764 {
765 MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
766 }
767
768 void GLAPIENTRY
769 _mesa_MultiTexCoord3sv(GLenum target, const GLshort *v)
770 {
771 MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
772 }
773
774 void GLAPIENTRY
775 _mesa_MultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
776 {
777 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
778 (GLfloat) r, (GLfloat) q );
779 }
780
781 void GLAPIENTRY
782 _mesa_MultiTexCoord4dv(GLenum target, const GLdouble *v)
783 {
784 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
785 (GLfloat) v[2], (GLfloat) v[3] );
786 }
787
788 void GLAPIENTRY
789 _mesa_MultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q)
790 {
791 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
792 (GLfloat) r, (GLfloat) q );
793 }
794
795 void GLAPIENTRY
796 _mesa_MultiTexCoord4iv(GLenum target, const GLint *v)
797 {
798 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
799 (GLfloat) v[2], (GLfloat) v[3] );
800 }
801
802 void GLAPIENTRY
803 _mesa_MultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
804 {
805 MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
806 (GLfloat) r, (GLfloat) q );
807 }
808
809 void GLAPIENTRY
810 _mesa_MultiTexCoord4sv(GLenum target, const GLshort *v)
811 {
812 MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
813 (GLfloat) v[2], (GLfloat) v[3] );
814 }
815
816 void GLAPIENTRY
817 _mesa_EvalCoord2dv( const GLdouble *u )
818 {
819 EVALCOORD2( (GLfloat) u[0], (GLfloat) u[1] );
820 }
821
822 void GLAPIENTRY
823 _mesa_EvalCoord2fv( const GLfloat *u )
824 {
825 EVALCOORD2( u[0], u[1] );
826 }
827
828 void GLAPIENTRY
829 _mesa_EvalCoord2d( GLdouble u, GLdouble v )
830 {
831 EVALCOORD2( (GLfloat) u, (GLfloat) v );
832 }
833
834 void GLAPIENTRY
835 _mesa_EvalCoord1dv( const GLdouble *u )
836 {
837 EVALCOORD1( (GLfloat) *u );
838 }
839
840 void GLAPIENTRY
841 _mesa_EvalCoord1fv( const GLfloat *u )
842 {
843 EVALCOORD1( (GLfloat) *u );
844 }
845
846 void GLAPIENTRY
847 _mesa_EvalCoord1d( GLdouble u )
848 {
849 EVALCOORD1( (GLfloat) u );
850 }
851
852 void GLAPIENTRY
853 _mesa_Materialf( GLenum face, GLenum pname, GLfloat param )
854 {
855 GLfloat fparam[4];
856 fparam[0] = param;
857 MATERIALFV( face, pname, fparam );
858 }
859
860 void GLAPIENTRY
861 _mesa_Materiali(GLenum face, GLenum pname, GLint param )
862 {
863 GLfloat p = (GLfloat) param;
864 MATERIALFV(face, pname, &p);
865 }
866
867 void GLAPIENTRY
868 _mesa_Materialiv(GLenum face, GLenum pname, const GLint *params )
869 {
870 GLfloat fparam[4];
871 switch (pname) {
872 case GL_AMBIENT:
873 case GL_DIFFUSE:
874 case GL_SPECULAR:
875 case GL_EMISSION:
876 case GL_AMBIENT_AND_DIFFUSE:
877 fparam[0] = INT_TO_FLOAT( params[0] );
878 fparam[1] = INT_TO_FLOAT( params[1] );
879 fparam[2] = INT_TO_FLOAT( params[2] );
880 fparam[3] = INT_TO_FLOAT( params[3] );
881 break;
882 case GL_SHININESS:
883 fparam[0] = (GLfloat) params[0];
884 break;
885 case GL_COLOR_INDEXES:
886 fparam[0] = (GLfloat) params[0];
887 fparam[1] = (GLfloat) params[1];
888 fparam[2] = (GLfloat) params[2];
889 break;
890 default:
891 ;
892 }
893 MATERIALFV(face, pname, fparam);
894 }
895
896
897 void GLAPIENTRY
898 _mesa_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
899 {
900 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
901 }
902
903 void GLAPIENTRY
904 _mesa_Rectdv(const GLdouble *v1, const GLdouble *v2)
905 {
906 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
907 }
908
909 void GLAPIENTRY
910 _mesa_Rectfv(const GLfloat *v1, const GLfloat *v2)
911 {
912 RECTF(v1[0], v1[1], v2[0], v2[1]);
913 }
914
915 void GLAPIENTRY
916 _mesa_Recti(GLint x1, GLint y1, GLint x2, GLint y2)
917 {
918 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
919 }
920
921 void GLAPIENTRY
922 _mesa_Rectiv(const GLint *v1, const GLint *v2)
923 {
924 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
925 }
926
927 void GLAPIENTRY
928 _mesa_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
929 {
930 RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
931 }
932
933 void GLAPIENTRY
934 _mesa_Rectsv(const GLshort *v1, const GLshort *v2)
935 {
936 RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
937 }
938
939 void GLAPIENTRY
940 _mesa_SecondaryColor3b( GLbyte red, GLbyte green, GLbyte blue )
941 {
942 SECONDARYCOLORF( BYTE_TO_FLOAT(red),
943 BYTE_TO_FLOAT(green),
944 BYTE_TO_FLOAT(blue) );
945 }
946
947 void GLAPIENTRY
948 _mesa_SecondaryColor3d( GLdouble red, GLdouble green, GLdouble blue )
949 {
950 SECONDARYCOLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue );
951 }
952
953 void GLAPIENTRY
954 _mesa_SecondaryColor3i( GLint red, GLint green, GLint blue )
955 {
956 SECONDARYCOLORF( INT_TO_FLOAT(red),
957 INT_TO_FLOAT(green),
958 INT_TO_FLOAT(blue));
959 }
960
961 void GLAPIENTRY
962 _mesa_SecondaryColor3s( GLshort red, GLshort green, GLshort blue )
963 {
964 SECONDARYCOLORF(SHORT_TO_FLOAT(red),
965 SHORT_TO_FLOAT(green),
966 SHORT_TO_FLOAT(blue));
967 }
968
969 void GLAPIENTRY
970 _mesa_SecondaryColor3ui( GLuint red, GLuint green, GLuint blue )
971 {
972 SECONDARYCOLORF(UINT_TO_FLOAT(red),
973 UINT_TO_FLOAT(green),
974 UINT_TO_FLOAT(blue));
975 }
976
977 void GLAPIENTRY
978 _mesa_SecondaryColor3us( GLushort red, GLushort green, GLushort blue )
979 {
980 SECONDARYCOLORF(USHORT_TO_FLOAT(red),
981 USHORT_TO_FLOAT(green),
982 USHORT_TO_FLOAT(blue));
983 }
984
985 void GLAPIENTRY
986 _mesa_SecondaryColor3ub( GLubyte red, GLubyte green, GLubyte blue )
987 {
988 SECONDARYCOLORF(UBYTE_TO_FLOAT(red),
989 UBYTE_TO_FLOAT(green),
990 UBYTE_TO_FLOAT(blue));
991 }
992
993 void GLAPIENTRY
994 _mesa_SecondaryColor3bv( const GLbyte *v )
995 {
996 SECONDARYCOLORF(BYTE_TO_FLOAT(v[0]),
997 BYTE_TO_FLOAT(v[1]),
998 BYTE_TO_FLOAT(v[2]));
999 }
1000
1001 void GLAPIENTRY
1002 _mesa_SecondaryColor3dv( const GLdouble *v )
1003 {
1004 SECONDARYCOLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
1005 }
1006 void GLAPIENTRY
1007 _mesa_SecondaryColor3iv( const GLint *v )
1008 {
1009 SECONDARYCOLORF(INT_TO_FLOAT(v[0]),
1010 INT_TO_FLOAT(v[1]),
1011 INT_TO_FLOAT(v[2]));
1012 }
1013
1014 void GLAPIENTRY
1015 _mesa_SecondaryColor3sv( const GLshort *v )
1016 {
1017 SECONDARYCOLORF(SHORT_TO_FLOAT(v[0]),
1018 SHORT_TO_FLOAT(v[1]),
1019 SHORT_TO_FLOAT(v[2]));
1020 }
1021
1022 void GLAPIENTRY
1023 _mesa_SecondaryColor3uiv( const GLuint *v )
1024 {
1025 SECONDARYCOLORF(UINT_TO_FLOAT(v[0]),
1026 UINT_TO_FLOAT(v[1]),
1027 UINT_TO_FLOAT(v[2]));
1028 }
1029
1030 void GLAPIENTRY
1031 _mesa_SecondaryColor3usv( const GLushort *v )
1032 {
1033 SECONDARYCOLORF(USHORT_TO_FLOAT(v[0]),
1034 USHORT_TO_FLOAT(v[1]),
1035 USHORT_TO_FLOAT(v[2]));
1036 }
1037
1038 void GLAPIENTRY
1039 _mesa_SecondaryColor3ubv( const GLubyte *v )
1040 {
1041 SECONDARYCOLORF(UBYTE_TO_FLOAT(v[0]),
1042 UBYTE_TO_FLOAT(v[1]),
1043 UBYTE_TO_FLOAT(v[2]));
1044 }
1045
1046
1047 /*
1048 * GL_NV_vertex_program:
1049 * Always loop-back to one of the VertexAttrib[1234]f[v]NV functions.
1050 * Note that attribute indexes DO alias conventional vertex attributes.
1051 */
1052
1053 void GLAPIENTRY
1054 _mesa_VertexAttrib1sNV(GLuint index, GLshort x)
1055 {
1056 ATTRIB1NV(index, (GLfloat) x);
1057 }
1058
1059 void GLAPIENTRY
1060 _mesa_VertexAttrib1dNV(GLuint index, GLdouble x)
1061 {
1062 ATTRIB1NV(index, (GLfloat) x);
1063 }
1064
1065 void GLAPIENTRY
1066 _mesa_VertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
1067 {
1068 ATTRIB2NV(index, (GLfloat) x, y);
1069 }
1070
1071 void GLAPIENTRY
1072 _mesa_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
1073 {
1074 ATTRIB2NV(index, (GLfloat) x, (GLfloat) y);
1075 }
1076
1077 void GLAPIENTRY
1078 _mesa_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
1079 {
1080 ATTRIB3NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
1081 }
1082
1083 void GLAPIENTRY
1084 _mesa_VertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
1085 {
1086 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
1087 }
1088
1089 void GLAPIENTRY
1090 _mesa_VertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
1091 {
1092 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1093 }
1094
1095 void GLAPIENTRY
1096 _mesa_VertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1097 {
1098 ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1099 }
1100
1101 void GLAPIENTRY
1102 _mesa_VertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
1103 {
1104 ATTRIB4NV(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
1105 UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
1106 }
1107
1108 void GLAPIENTRY
1109 _mesa_VertexAttrib1svNV(GLuint index, const GLshort *v)
1110 {
1111 ATTRIB1NV(index, (GLfloat) v[0]);
1112 }
1113
1114 void GLAPIENTRY
1115 _mesa_VertexAttrib1dvNV(GLuint index, const GLdouble *v)
1116 {
1117 ATTRIB1NV(index, (GLfloat) v[0]);
1118 }
1119
1120 void GLAPIENTRY
1121 _mesa_VertexAttrib2svNV(GLuint index, const GLshort *v)
1122 {
1123 ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
1124 }
1125
1126 void GLAPIENTRY
1127 _mesa_VertexAttrib2dvNV(GLuint index, const GLdouble *v)
1128 {
1129 ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]);
1130 }
1131
1132 void GLAPIENTRY
1133 _mesa_VertexAttrib3svNV(GLuint index, const GLshort *v)
1134 {
1135 ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1136 }
1137
1138 void GLAPIENTRY
1139 _mesa_VertexAttrib3dvNV(GLuint index, const GLdouble *v)
1140 {
1141 ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1142 }
1143
1144 void GLAPIENTRY
1145 _mesa_VertexAttrib4svNV(GLuint index, const GLshort *v)
1146 {
1147 ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
1148 (GLfloat)v[3]);
1149 }
1150
1151 void GLAPIENTRY
1152 _mesa_VertexAttrib4dvNV(GLuint index, const GLdouble *v)
1153 {
1154 ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1155 }
1156
1157 void GLAPIENTRY
1158 _mesa_VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
1159 {
1160 ATTRIB4NV(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
1161 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
1162 }
1163
1164
1165 void GLAPIENTRY
1166 _mesa_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v)
1167 {
1168 GLint i;
1169 for (i = n - 1; i >= 0; i--)
1170 _mesa_VertexAttrib1svNV(index + i, v + i);
1171 }
1172
1173 void GLAPIENTRY
1174 _mesa_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v)
1175 {
1176 GLint i;
1177 for (i = n - 1; i >= 0; i--)
1178 ATTRIB1NV(index + i, v[i]);
1179 }
1180
1181 void GLAPIENTRY
1182 _mesa_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v)
1183 {
1184 GLint i;
1185 for (i = n - 1; i >= 0; i--)
1186 _mesa_VertexAttrib1dvNV(index + i, v + i);
1187 }
1188
1189 void GLAPIENTRY
1190 _mesa_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v)
1191 {
1192 GLint i;
1193 for (i = n - 1; i >= 0; i--)
1194 _mesa_VertexAttrib2svNV(index + i, v + 2 * i);
1195 }
1196
1197 void GLAPIENTRY
1198 _mesa_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v)
1199 {
1200 GLint i;
1201 for (i = n - 1; i >= 0; i--)
1202 ATTRIB2NV(index + i, v[2 * i], v[2 * i + 1]);
1203 }
1204
1205 void GLAPIENTRY
1206 _mesa_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v)
1207 {
1208 GLint i;
1209 for (i = n - 1; i >= 0; i--)
1210 _mesa_VertexAttrib2dvNV(index + i, v + 2 * i);
1211 }
1212
1213 void GLAPIENTRY
1214 _mesa_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v)
1215 {
1216 GLint i;
1217 for (i = n - 1; i >= 0; i--)
1218 _mesa_VertexAttrib3svNV(index + i, v + 3 * i);
1219 }
1220
1221 void GLAPIENTRY
1222 _mesa_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v)
1223 {
1224 GLint i;
1225 for (i = n - 1; i >= 0; i--)
1226 ATTRIB3NV(index + i, v[3 * i], v[3 * i + 1], v[3 * i + 2]);
1227 }
1228
1229 void GLAPIENTRY
1230 _mesa_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v)
1231 {
1232 GLint i;
1233 for (i = n - 1; i >= 0; i--)
1234 _mesa_VertexAttrib3dvNV(index + i, v + 3 * i);
1235 }
1236
1237 void GLAPIENTRY
1238 _mesa_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v)
1239 {
1240 GLint i;
1241 for (i = n - 1; i >= 0; i--)
1242 _mesa_VertexAttrib4svNV(index + i, v + 4 * i);
1243 }
1244
1245 void GLAPIENTRY
1246 _mesa_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v)
1247 {
1248 GLint i;
1249 for (i = n - 1; i >= 0; i--)
1250 ATTRIB4NV(index + i, v[4 * i], v[4 * i + 1], v[4 * i + 2], v[4 * i + 3]);
1251 }
1252
1253 void GLAPIENTRY
1254 _mesa_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v)
1255 {
1256 GLint i;
1257 for (i = n - 1; i >= 0; i--)
1258 _mesa_VertexAttrib4dvNV(index + i, v + 4 * i);
1259 }
1260
1261 void GLAPIENTRY
1262 _mesa_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
1263 {
1264 GLint i;
1265 for (i = n - 1; i >= 0; i--)
1266 _mesa_VertexAttrib4ubvNV(index + i, v + 4 * i);
1267 }
1268
1269
1270 /*
1271 * GL_ARB_vertex_program
1272 * Always loop-back to one of the VertexAttrib[1234]f[v]ARB functions.
1273 * Note that attribute indexes do NOT alias conventional attributes.
1274 */
1275
1276 void GLAPIENTRY
1277 _mesa_VertexAttrib1s(GLuint index, GLshort x)
1278 {
1279 ATTRIB1ARB(index, (GLfloat) x);
1280 }
1281
1282 void GLAPIENTRY
1283 _mesa_VertexAttrib1d(GLuint index, GLdouble x)
1284 {
1285 ATTRIB1ARB(index, (GLfloat) x);
1286 }
1287
1288 void GLAPIENTRY
1289 _mesa_VertexAttrib2s(GLuint index, GLshort x, GLshort y)
1290 {
1291 ATTRIB2ARB(index, (GLfloat) x, y);
1292 }
1293
1294 void GLAPIENTRY
1295 _mesa_VertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
1296 {
1297 ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y);
1298 }
1299
1300 void GLAPIENTRY
1301 _mesa_VertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
1302 {
1303 ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
1304 }
1305
1306 void GLAPIENTRY
1307 _mesa_VertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
1308 {
1309 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
1310 }
1311
1312 void GLAPIENTRY
1313 _mesa_VertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
1314 {
1315 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1316 }
1317
1318 void GLAPIENTRY
1319 _mesa_VertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1320 {
1321 ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1322 }
1323
1324 void GLAPIENTRY
1325 _mesa_VertexAttrib1sv(GLuint index, const GLshort *v)
1326 {
1327 ATTRIB1ARB(index, (GLfloat) v[0]);
1328 }
1329
1330 void GLAPIENTRY
1331 _mesa_VertexAttrib1dv(GLuint index, const GLdouble *v)
1332 {
1333 ATTRIB1ARB(index, (GLfloat) v[0]);
1334 }
1335
1336 void GLAPIENTRY
1337 _mesa_VertexAttrib2sv(GLuint index, const GLshort *v)
1338 {
1339 ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
1340 }
1341
1342 void GLAPIENTRY
1343 _mesa_VertexAttrib2dv(GLuint index, const GLdouble *v)
1344 {
1345 ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
1346 }
1347
1348 void GLAPIENTRY
1349 _mesa_VertexAttrib3sv(GLuint index, const GLshort *v)
1350 {
1351 ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1352 }
1353
1354 void GLAPIENTRY
1355 _mesa_VertexAttrib3dv(GLuint index, const GLdouble *v)
1356 {
1357 ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
1358 }
1359
1360 void GLAPIENTRY
1361 _mesa_VertexAttrib4sv(GLuint index, const GLshort *v)
1362 {
1363 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
1364 (GLfloat)v[3]);
1365 }
1366
1367 void GLAPIENTRY
1368 _mesa_VertexAttrib4dv(GLuint index, const GLdouble *v)
1369 {
1370 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1371 }
1372
1373 void GLAPIENTRY
1374 _mesa_VertexAttrib4bv(GLuint index, const GLbyte * v)
1375 {
1376 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1377 }
1378
1379 void GLAPIENTRY
1380 _mesa_VertexAttrib4iv(GLuint index, const GLint * v)
1381 {
1382 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1383 }
1384
1385 void GLAPIENTRY
1386 _mesa_VertexAttrib4ubv(GLuint index, const GLubyte * v)
1387 {
1388 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1389 }
1390
1391 void GLAPIENTRY
1392 _mesa_VertexAttrib4usv(GLuint index, const GLushort * v)
1393 {
1394 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1395 }
1396
1397 void GLAPIENTRY
1398 _mesa_VertexAttrib4uiv(GLuint index, const GLuint * v)
1399 {
1400 ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1401 }
1402
1403 void GLAPIENTRY
1404 _mesa_VertexAttrib4Nbv(GLuint index, const GLbyte * v)
1405 {
1406 ATTRIB4ARB(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
1407 BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]));
1408 }
1409
1410 void GLAPIENTRY
1411 _mesa_VertexAttrib4Nsv(GLuint index, const GLshort * v)
1412 {
1413 ATTRIB4ARB(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
1414 SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]));
1415 }
1416
1417 void GLAPIENTRY
1418 _mesa_VertexAttrib4Niv(GLuint index, const GLint * v)
1419 {
1420 ATTRIB4ARB(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
1421 INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]));
1422 }
1423
1424 void GLAPIENTRY
1425 _mesa_VertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
1426 {
1427 ATTRIB4ARB(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
1428 UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
1429 }
1430
1431 void GLAPIENTRY
1432 _mesa_VertexAttrib4Nubv(GLuint index, const GLubyte * v)
1433 {
1434 ATTRIB4ARB(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
1435 UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
1436 }
1437
1438 void GLAPIENTRY
1439 _mesa_VertexAttrib4Nusv(GLuint index, const GLushort * v)
1440 {
1441 ATTRIB4ARB(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
1442 USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]));
1443 }
1444
1445 void GLAPIENTRY
1446 _mesa_VertexAttrib4Nuiv(GLuint index, const GLuint * v)
1447 {
1448 ATTRIB4ARB(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
1449 UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]));
1450 }
1451
1452
1453
1454 /**
1455 * GL_EXT_gpu_shader / GL 3.0 signed/unsigned integer-valued attributes.
1456 * Note that attribute indexes do NOT alias conventional attributes.
1457 */
1458
1459 void GLAPIENTRY
1460 _mesa_VertexAttribI1iv(GLuint index, const GLint *v)
1461 {
1462 ATTRIBI_1I(index, v[0]);
1463 }
1464
1465 void GLAPIENTRY
1466 _mesa_VertexAttribI1uiv(GLuint index, const GLuint *v)
1467 {
1468 ATTRIBI_1UI(index, v[0]);
1469 }
1470
1471 void GLAPIENTRY
1472 _mesa_VertexAttribI4bv(GLuint index, const GLbyte *v)
1473 {
1474 ATTRIBI_4I(index, v[0], v[1], v[2], v[3]);
1475 }
1476
1477 void GLAPIENTRY
1478 _mesa_VertexAttribI4sv(GLuint index, const GLshort *v)
1479 {
1480 ATTRIBI_4I(index, v[0], v[1], v[2], v[3]);
1481 }
1482
1483 void GLAPIENTRY
1484 _mesa_VertexAttribI4ubv(GLuint index, const GLubyte *v)
1485 {
1486 ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]);
1487 }
1488
1489 void GLAPIENTRY
1490 _mesa_VertexAttribI4usv(GLuint index, const GLushort *v)
1491 {
1492 ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]);
1493 }
1494
1495
1496
1497
1498 /*
1499 * This code never registers handlers for any of the entry points
1500 * listed in vtxfmt.h.
1501 */
1502 void
1503 _mesa_loopback_init_api_table(const struct gl_context *ctx,
1504 struct _glapi_table *dest)
1505 {
1506 if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
1507 SET_Color4ub(dest, _mesa_Color4ub);
1508 SET_Materialf(dest, _mesa_Materialf);
1509 }
1510 if (ctx->API == API_OPENGL) {
1511 SET_Color3b(dest, _mesa_Color3b);
1512 SET_Color3d(dest, _mesa_Color3d);
1513 SET_Color3i(dest, _mesa_Color3i);
1514 SET_Color3s(dest, _mesa_Color3s);
1515 SET_Color3ui(dest, _mesa_Color3ui);
1516 SET_Color3us(dest, _mesa_Color3us);
1517 SET_Color3ub(dest, _mesa_Color3ub);
1518 SET_Color4b(dest, _mesa_Color4b);
1519 SET_Color4d(dest, _mesa_Color4d);
1520 SET_Color4i(dest, _mesa_Color4i);
1521 SET_Color4s(dest, _mesa_Color4s);
1522 SET_Color4ui(dest, _mesa_Color4ui);
1523 SET_Color4us(dest, _mesa_Color4us);
1524 SET_Color3bv(dest, _mesa_Color3bv);
1525 SET_Color3dv(dest, _mesa_Color3dv);
1526 SET_Color3iv(dest, _mesa_Color3iv);
1527 SET_Color3sv(dest, _mesa_Color3sv);
1528 SET_Color3uiv(dest, _mesa_Color3uiv);
1529 SET_Color3usv(dest, _mesa_Color3usv);
1530 SET_Color3ubv(dest, _mesa_Color3ubv);
1531 SET_Color4bv(dest, _mesa_Color4bv);
1532 SET_Color4dv(dest, _mesa_Color4dv);
1533 SET_Color4iv(dest, _mesa_Color4iv);
1534 SET_Color4sv(dest, _mesa_Color4sv);
1535 SET_Color4uiv(dest, _mesa_Color4uiv);
1536 SET_Color4usv(dest, _mesa_Color4usv);
1537 SET_Color4ubv(dest, _mesa_Color4ubv);
1538
1539 SET_SecondaryColor3b(dest, _mesa_SecondaryColor3b);
1540 SET_SecondaryColor3d(dest, _mesa_SecondaryColor3d);
1541 SET_SecondaryColor3i(dest, _mesa_SecondaryColor3i);
1542 SET_SecondaryColor3s(dest, _mesa_SecondaryColor3s);
1543 SET_SecondaryColor3ui(dest, _mesa_SecondaryColor3ui);
1544 SET_SecondaryColor3us(dest, _mesa_SecondaryColor3us);
1545 SET_SecondaryColor3ub(dest, _mesa_SecondaryColor3ub);
1546 SET_SecondaryColor3bv(dest, _mesa_SecondaryColor3bv);
1547 SET_SecondaryColor3dv(dest, _mesa_SecondaryColor3dv);
1548 SET_SecondaryColor3iv(dest, _mesa_SecondaryColor3iv);
1549 SET_SecondaryColor3sv(dest, _mesa_SecondaryColor3sv);
1550 SET_SecondaryColor3uiv(dest, _mesa_SecondaryColor3uiv);
1551 SET_SecondaryColor3usv(dest, _mesa_SecondaryColor3usv);
1552 SET_SecondaryColor3ubv(dest, _mesa_SecondaryColor3ubv);
1553
1554 SET_EdgeFlagv(dest, _mesa_EdgeFlagv);
1555
1556 SET_Indexd(dest, _mesa_Indexd);
1557 SET_Indexi(dest, _mesa_Indexi);
1558 SET_Indexs(dest, _mesa_Indexs);
1559 SET_Indexub(dest, _mesa_Indexub);
1560 SET_Indexdv(dest, _mesa_Indexdv);
1561 SET_Indexiv(dest, _mesa_Indexiv);
1562 SET_Indexsv(dest, _mesa_Indexsv);
1563 SET_Indexubv(dest, _mesa_Indexubv);
1564 SET_Normal3b(dest, _mesa_Normal3b);
1565 SET_Normal3d(dest, _mesa_Normal3d);
1566 SET_Normal3i(dest, _mesa_Normal3i);
1567 SET_Normal3s(dest, _mesa_Normal3s);
1568 SET_Normal3bv(dest, _mesa_Normal3bv);
1569 SET_Normal3dv(dest, _mesa_Normal3dv);
1570 SET_Normal3iv(dest, _mesa_Normal3iv);
1571 SET_Normal3sv(dest, _mesa_Normal3sv);
1572 SET_TexCoord1d(dest, _mesa_TexCoord1d);
1573 SET_TexCoord1i(dest, _mesa_TexCoord1i);
1574 SET_TexCoord1s(dest, _mesa_TexCoord1s);
1575 SET_TexCoord2d(dest, _mesa_TexCoord2d);
1576 SET_TexCoord2s(dest, _mesa_TexCoord2s);
1577 SET_TexCoord2i(dest, _mesa_TexCoord2i);
1578 SET_TexCoord3d(dest, _mesa_TexCoord3d);
1579 SET_TexCoord3i(dest, _mesa_TexCoord3i);
1580 SET_TexCoord3s(dest, _mesa_TexCoord3s);
1581 SET_TexCoord4d(dest, _mesa_TexCoord4d);
1582 SET_TexCoord4i(dest, _mesa_TexCoord4i);
1583 SET_TexCoord4s(dest, _mesa_TexCoord4s);
1584 SET_TexCoord1dv(dest, _mesa_TexCoord1dv);
1585 SET_TexCoord1iv(dest, _mesa_TexCoord1iv);
1586 SET_TexCoord1sv(dest, _mesa_TexCoord1sv);
1587 SET_TexCoord2dv(dest, _mesa_TexCoord2dv);
1588 SET_TexCoord2iv(dest, _mesa_TexCoord2iv);
1589 SET_TexCoord2sv(dest, _mesa_TexCoord2sv);
1590 SET_TexCoord3dv(dest, _mesa_TexCoord3dv);
1591 SET_TexCoord3iv(dest, _mesa_TexCoord3iv);
1592 SET_TexCoord3sv(dest, _mesa_TexCoord3sv);
1593 SET_TexCoord4dv(dest, _mesa_TexCoord4dv);
1594 SET_TexCoord4iv(dest, _mesa_TexCoord4iv);
1595 SET_TexCoord4sv(dest, _mesa_TexCoord4sv);
1596 SET_Vertex2d(dest, _mesa_Vertex2d);
1597 SET_Vertex2i(dest, _mesa_Vertex2i);
1598 SET_Vertex2s(dest, _mesa_Vertex2s);
1599 SET_Vertex3d(dest, _mesa_Vertex3d);
1600 SET_Vertex3i(dest, _mesa_Vertex3i);
1601 SET_Vertex3s(dest, _mesa_Vertex3s);
1602 SET_Vertex4d(dest, _mesa_Vertex4d);
1603 SET_Vertex4i(dest, _mesa_Vertex4i);
1604 SET_Vertex4s(dest, _mesa_Vertex4s);
1605 SET_Vertex2dv(dest, _mesa_Vertex2dv);
1606 SET_Vertex2iv(dest, _mesa_Vertex2iv);
1607 SET_Vertex2sv(dest, _mesa_Vertex2sv);
1608 SET_Vertex3dv(dest, _mesa_Vertex3dv);
1609 SET_Vertex3iv(dest, _mesa_Vertex3iv);
1610 SET_Vertex3sv(dest, _mesa_Vertex3sv);
1611 SET_Vertex4dv(dest, _mesa_Vertex4dv);
1612 SET_Vertex4iv(dest, _mesa_Vertex4iv);
1613 SET_Vertex4sv(dest, _mesa_Vertex4sv);
1614 SET_MultiTexCoord1d(dest, _mesa_MultiTexCoord1d);
1615 SET_MultiTexCoord1dv(dest, _mesa_MultiTexCoord1dv);
1616 SET_MultiTexCoord1i(dest, _mesa_MultiTexCoord1i);
1617 SET_MultiTexCoord1iv(dest, _mesa_MultiTexCoord1iv);
1618 SET_MultiTexCoord1s(dest, _mesa_MultiTexCoord1s);
1619 SET_MultiTexCoord1sv(dest, _mesa_MultiTexCoord1sv);
1620 SET_MultiTexCoord2d(dest, _mesa_MultiTexCoord2d);
1621 SET_MultiTexCoord2dv(dest, _mesa_MultiTexCoord2dv);
1622 SET_MultiTexCoord2i(dest, _mesa_MultiTexCoord2i);
1623 SET_MultiTexCoord2iv(dest, _mesa_MultiTexCoord2iv);
1624 SET_MultiTexCoord2s(dest, _mesa_MultiTexCoord2s);
1625 SET_MultiTexCoord2sv(dest, _mesa_MultiTexCoord2sv);
1626 SET_MultiTexCoord3d(dest, _mesa_MultiTexCoord3d);
1627 SET_MultiTexCoord3dv(dest, _mesa_MultiTexCoord3dv);
1628 SET_MultiTexCoord3i(dest, _mesa_MultiTexCoord3i);
1629 SET_MultiTexCoord3iv(dest, _mesa_MultiTexCoord3iv);
1630 SET_MultiTexCoord3s(dest, _mesa_MultiTexCoord3s);
1631 SET_MultiTexCoord3sv(dest, _mesa_MultiTexCoord3sv);
1632 SET_MultiTexCoord4d(dest, _mesa_MultiTexCoord4d);
1633 SET_MultiTexCoord4dv(dest, _mesa_MultiTexCoord4dv);
1634 SET_MultiTexCoord4i(dest, _mesa_MultiTexCoord4i);
1635 SET_MultiTexCoord4iv(dest, _mesa_MultiTexCoord4iv);
1636 SET_MultiTexCoord4s(dest, _mesa_MultiTexCoord4s);
1637 SET_MultiTexCoord4sv(dest, _mesa_MultiTexCoord4sv);
1638 SET_EvalCoord2dv(dest, _mesa_EvalCoord2dv);
1639 SET_EvalCoord2fv(dest, _mesa_EvalCoord2fv);
1640 SET_EvalCoord2d(dest, _mesa_EvalCoord2d);
1641 SET_EvalCoord1dv(dest, _mesa_EvalCoord1dv);
1642 SET_EvalCoord1fv(dest, _mesa_EvalCoord1fv);
1643 SET_EvalCoord1d(dest, _mesa_EvalCoord1d);
1644 SET_Materiali(dest, _mesa_Materiali);
1645 SET_Materialiv(dest, _mesa_Materialiv);
1646 SET_Rectd(dest, _mesa_Rectd);
1647 SET_Rectdv(dest, _mesa_Rectdv);
1648 SET_Rectfv(dest, _mesa_Rectfv);
1649 SET_Recti(dest, _mesa_Recti);
1650 SET_Rectiv(dest, _mesa_Rectiv);
1651 SET_Rects(dest, _mesa_Rects);
1652 SET_Rectsv(dest, _mesa_Rectsv);
1653 SET_FogCoordd(dest, _mesa_FogCoordd);
1654 SET_FogCoorddv(dest, _mesa_FogCoorddv);
1655 }
1656
1657 if (ctx->API == API_OPENGL) {
1658 SET_VertexAttrib1sNV(dest, _mesa_VertexAttrib1sNV);
1659 SET_VertexAttrib1dNV(dest, _mesa_VertexAttrib1dNV);
1660 SET_VertexAttrib2sNV(dest, _mesa_VertexAttrib2sNV);
1661 SET_VertexAttrib2dNV(dest, _mesa_VertexAttrib2dNV);
1662 SET_VertexAttrib3sNV(dest, _mesa_VertexAttrib3sNV);
1663 SET_VertexAttrib3dNV(dest, _mesa_VertexAttrib3dNV);
1664 SET_VertexAttrib4sNV(dest, _mesa_VertexAttrib4sNV);
1665 SET_VertexAttrib4dNV(dest, _mesa_VertexAttrib4dNV);
1666 SET_VertexAttrib4ubNV(dest, _mesa_VertexAttrib4ubNV);
1667 SET_VertexAttrib1svNV(dest, _mesa_VertexAttrib1svNV);
1668 SET_VertexAttrib1dvNV(dest, _mesa_VertexAttrib1dvNV);
1669 SET_VertexAttrib2svNV(dest, _mesa_VertexAttrib2svNV);
1670 SET_VertexAttrib2dvNV(dest, _mesa_VertexAttrib2dvNV);
1671 SET_VertexAttrib3svNV(dest, _mesa_VertexAttrib3svNV);
1672 SET_VertexAttrib3dvNV(dest, _mesa_VertexAttrib3dvNV);
1673 SET_VertexAttrib4svNV(dest, _mesa_VertexAttrib4svNV);
1674 SET_VertexAttrib4dvNV(dest, _mesa_VertexAttrib4dvNV);
1675 SET_VertexAttrib4ubvNV(dest, _mesa_VertexAttrib4ubvNV);
1676 SET_VertexAttribs1svNV(dest, _mesa_VertexAttribs1svNV);
1677 SET_VertexAttribs1fvNV(dest, _mesa_VertexAttribs1fvNV);
1678 SET_VertexAttribs1dvNV(dest, _mesa_VertexAttribs1dvNV);
1679 SET_VertexAttribs2svNV(dest, _mesa_VertexAttribs2svNV);
1680 SET_VertexAttribs2fvNV(dest, _mesa_VertexAttribs2fvNV);
1681 SET_VertexAttribs2dvNV(dest, _mesa_VertexAttribs2dvNV);
1682 SET_VertexAttribs3svNV(dest, _mesa_VertexAttribs3svNV);
1683 SET_VertexAttribs3fvNV(dest, _mesa_VertexAttribs3fvNV);
1684 SET_VertexAttribs3dvNV(dest, _mesa_VertexAttribs3dvNV);
1685 SET_VertexAttribs4svNV(dest, _mesa_VertexAttribs4svNV);
1686 SET_VertexAttribs4fvNV(dest, _mesa_VertexAttribs4fvNV);
1687 SET_VertexAttribs4dvNV(dest, _mesa_VertexAttribs4dvNV);
1688 SET_VertexAttribs4ubvNV(dest, _mesa_VertexAttribs4ubvNV);
1689 }
1690
1691 if (_mesa_is_desktop_gl(ctx)) {
1692 SET_VertexAttrib1s(dest, _mesa_VertexAttrib1s);
1693 SET_VertexAttrib1d(dest, _mesa_VertexAttrib1d);
1694 SET_VertexAttrib2s(dest, _mesa_VertexAttrib2s);
1695 SET_VertexAttrib2d(dest, _mesa_VertexAttrib2d);
1696 SET_VertexAttrib3s(dest, _mesa_VertexAttrib3s);
1697 SET_VertexAttrib3d(dest, _mesa_VertexAttrib3d);
1698 SET_VertexAttrib4s(dest, _mesa_VertexAttrib4s);
1699 SET_VertexAttrib4d(dest, _mesa_VertexAttrib4d);
1700 SET_VertexAttrib1sv(dest, _mesa_VertexAttrib1sv);
1701 SET_VertexAttrib1dv(dest, _mesa_VertexAttrib1dv);
1702 SET_VertexAttrib2sv(dest, _mesa_VertexAttrib2sv);
1703 SET_VertexAttrib2dv(dest, _mesa_VertexAttrib2dv);
1704 SET_VertexAttrib3sv(dest, _mesa_VertexAttrib3sv);
1705 SET_VertexAttrib3dv(dest, _mesa_VertexAttrib3dv);
1706 SET_VertexAttrib4sv(dest, _mesa_VertexAttrib4sv);
1707 SET_VertexAttrib4dv(dest, _mesa_VertexAttrib4dv);
1708 SET_VertexAttrib4Nub(dest, _mesa_VertexAttrib4Nub);
1709 SET_VertexAttrib4Nubv(dest, _mesa_VertexAttrib4Nubv);
1710 SET_VertexAttrib4bv(dest, _mesa_VertexAttrib4bv);
1711 SET_VertexAttrib4iv(dest, _mesa_VertexAttrib4iv);
1712 SET_VertexAttrib4ubv(dest, _mesa_VertexAttrib4ubv);
1713 SET_VertexAttrib4usv(dest, _mesa_VertexAttrib4usv);
1714 SET_VertexAttrib4uiv(dest, _mesa_VertexAttrib4uiv);
1715 SET_VertexAttrib4Nbv(dest, _mesa_VertexAttrib4Nbv);
1716 SET_VertexAttrib4Nsv(dest, _mesa_VertexAttrib4Nsv);
1717 SET_VertexAttrib4Nusv(dest, _mesa_VertexAttrib4Nusv);
1718 SET_VertexAttrib4Niv(dest, _mesa_VertexAttrib4Niv);
1719 SET_VertexAttrib4Nuiv(dest, _mesa_VertexAttrib4Nuiv);
1720
1721 /* GL_EXT_gpu_shader4, GL 3.0 */
1722 SET_VertexAttribI1iv(dest, _mesa_VertexAttribI1iv);
1723 SET_VertexAttribI1uiv(dest, _mesa_VertexAttribI1uiv);
1724 SET_VertexAttribI4bv(dest, _mesa_VertexAttribI4bv);
1725 SET_VertexAttribI4sv(dest, _mesa_VertexAttribI4sv);
1726 SET_VertexAttribI4ubv(dest, _mesa_VertexAttribI4ubv);
1727 SET_VertexAttribI4usv(dest, _mesa_VertexAttribI4usv);
1728 }
1729 }