Subversion Repositories shark

Rev

Rev 55 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
55 pj 1
/* $Id: api_loopback.c,v 1.1 2003-02-28 11:41:57 pj Exp $ */
2
 
3
/*
4
 * Mesa 3-D graphics library
5
 * Version:  4.1
6
 *
7
 * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
8
 *
9
 * Permission is hereby granted, free of charge, to any person obtaining a
10
 * copy of this software and associated documentation files (the "Software"),
11
 * to deal in the Software without restriction, including without limitation
12
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13
 * and/or sell copies of the Software, and to permit persons to whom the
14
 * Software is furnished to do so, subject to the following conditions:
15
 *
16
 * The above copyright notice and this permission notice shall be included
17
 * in all copies or substantial portions of the Software.
18
 *
19
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
22
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
 *
26
 * Authors:
27
 *    Keith Whitwell <keith@tungstengraphics.com>
28
 */
29
 
30
 
31
#include "glheader.h"
32
#include "glapi.h"
33
#include "glapitable.h"
34
#include "macros.h"
35
#include "colormac.h"
36
#include "api_loopback.h"
37
 
38
/* KW: A set of functions to convert unusual Color/Normal/Vertex/etc
39
 * calls to a smaller set of driver-provided formats.  Currently just
40
 * go back to dispatch to find these (eg. call glNormal3f directly),
41
 * hence 'loopback'.
42
 *
43
 * The driver must supply all of the remaining entry points, which are
44
 * listed in dd.h.  The easiest way for a driver to do this is to
45
 * install the supplied software t&l module.
46
 */
47
#define COLORUBV(v)                 glColor4ubv(v)
48
#define COLORF(r,g,b,a)             glColor4f(r,g,b,a)
49
#define VERTEX2(x,y)                glVertex2f(x,y)
50
#define VERTEX3(x,y,z)              glVertex3f(x,y,z)
51
#define VERTEX4(x,y,z,w)            glVertex4f(x,y,z,w)
52
#define NORMAL(x,y,z)               glNormal3f(x,y,z)
53
#define TEXCOORD1(s)                glTexCoord1f(s)
54
#define TEXCOORD2(s,t)              glTexCoord2f(s,t)
55
#define TEXCOORD3(s,t,u)            glTexCoord3f(s,t,u)
56
#define TEXCOORD4(s,t,u,v)          glTexCoord4f(s,t,u,v)
57
#define INDEX(c)                    glIndexi(c)
58
#define MULTI_TEXCOORD1(z,s)        glMultiTexCoord1fARB(z,s)
59
#define MULTI_TEXCOORD2(z,s,t)      glMultiTexCoord2fARB(z,s,t)
60
#define MULTI_TEXCOORD3(z,s,t,u)    glMultiTexCoord3fARB(z,s,t,u)
61
#define MULTI_TEXCOORD4(z,s,t,u,v)  glMultiTexCoord4fARB(z,s,t,u,v)
62
#define EVALCOORD1(x)               glEvalCoord1f(x)
63
#define EVALCOORD2(x,y)             glEvalCoord2f(x,y)
64
#define MATERIALFV(a,b,c)           glMaterialfv(a,b,c)
65
#define RECTF(a,b,c,d)              glRectf(a,b,c,d)
66
 
67
#define ATTRIB(index, x, y, z, w)   _glapi_Dispatch->VertexAttrib4fNV(index, x, y, z, w)
68
 
69
 
70
#define FOGCOORDF(x)                _glapi_Dispatch->FogCoordfEXT(x)
71
#define SECONDARYCOLORUB(a,b,c)     _glapi_Dispatch->SecondaryColor3ubEXT(a,b,c)
72
#define SECONDARYCOLORF(a,b,c)      _glapi_Dispatch->SecondaryColor3fEXT(a,b,c)
73
 
74
 
75
static void
76
loopback_Color3b( GLbyte red, GLbyte green, GLbyte blue )
77
{
78
   GLubyte col[4];
79
   col[0] = BYTE_TO_UBYTE(red);
80
   col[1] = BYTE_TO_UBYTE(green);
81
   col[2] = BYTE_TO_UBYTE(blue);
82
   col[3] = 255;
83
   COLORUBV(col);
84
}
85
 
86
static void
87
loopback_Color3d( GLdouble red, GLdouble green, GLdouble blue )
88
{
89
   GLubyte col[4];
90
   GLfloat r = (GLfloat) red;
91
   GLfloat g = (GLfloat) green;
92
   GLfloat b = (GLfloat) blue;
93
   UNCLAMPED_FLOAT_TO_UBYTE(col[0], r);
94
   UNCLAMPED_FLOAT_TO_UBYTE(col[1], g);
95
   UNCLAMPED_FLOAT_TO_UBYTE(col[2], b);
96
   col[3] = 255;
97
   COLORUBV( col );
98
}
99
 
100
static void
101
loopback_Color3i( GLint red, GLint green, GLint blue )
102
{
103
   GLubyte col[4];
104
   col[0] = INT_TO_UBYTE(red);
105
   col[1] = INT_TO_UBYTE(green);
106
   col[2] = INT_TO_UBYTE(blue);
107
   col[3] = 255;
108
   COLORUBV(col);
109
}
110
 
111
static void
112
loopback_Color3s( GLshort red, GLshort green, GLshort blue )
113
{
114
   GLubyte col[4];
115
   col[0] = SHORT_TO_UBYTE(red);
116
   col[1] = SHORT_TO_UBYTE(green);
117
   col[2] = SHORT_TO_UBYTE(blue);
118
   col[3] = 255;
119
   COLORUBV(col);
120
}
121
 
122
static void
123
loopback_Color3ui( GLuint red, GLuint green, GLuint blue )
124
{
125
   GLubyte col[4];
126
   col[0] = UINT_TO_UBYTE(red);
127
   col[1] = UINT_TO_UBYTE(green);
128
   col[2] = UINT_TO_UBYTE(blue);
129
   col[3] = 255;
130
   COLORUBV(col);
131
}
132
 
133
static void
134
loopback_Color3us( GLushort red, GLushort green, GLushort blue )
135
{
136
   GLubyte col[4];
137
   col[0] = USHORT_TO_UBYTE(red);
138
   col[1] = USHORT_TO_UBYTE(green);
139
   col[2] = USHORT_TO_UBYTE(blue);
140
   col[3] = 255;
141
   COLORUBV(col);
142
}
143
 
144
static void
145
loopback_Color4b( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha )
146
{
147
   GLubyte col[4];
148
   col[0] = BYTE_TO_UBYTE(red);
149
   col[1] = BYTE_TO_UBYTE(green);
150
   col[2] = BYTE_TO_UBYTE(blue);
151
   col[3] = 255;
152
   COLORUBV(col);
153
}
154
 
155
static void
156
loopback_Color4d( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha )
157
{
158
   GLubyte col[4];
159
   GLfloat r = (GLfloat) red;
160
   GLfloat g = (GLfloat) green;
161
   GLfloat b = (GLfloat) blue;
162
   GLfloat a = (GLfloat) alpha;
163
   UNCLAMPED_FLOAT_TO_UBYTE(col[0], r);
164
   UNCLAMPED_FLOAT_TO_UBYTE(col[1], g);
165
   UNCLAMPED_FLOAT_TO_UBYTE(col[2], b);
166
   UNCLAMPED_FLOAT_TO_UBYTE(col[3], a);
167
   COLORUBV( col );
168
}
169
 
170
static void
171
loopback_Color4i( GLint red, GLint green, GLint blue, GLint alpha )
172
{
173
   GLubyte col[4];
174
   col[0] = INT_TO_UBYTE(red);
175
   col[1] = INT_TO_UBYTE(green);
176
   col[2] = INT_TO_UBYTE(blue);
177
   col[3] = INT_TO_UBYTE(alpha);
178
   COLORUBV(col);
179
}
180
 
181
static void
182
loopback_Color4s( GLshort red, GLshort green, GLshort blue,
183
                        GLshort alpha )
184
{
185
   GLubyte col[4];
186
   col[0] = SHORT_TO_UBYTE(red);
187
   col[1] = SHORT_TO_UBYTE(green);
188
   col[2] = SHORT_TO_UBYTE(blue);
189
   col[3] = SHORT_TO_UBYTE(alpha);
190
   COLORUBV(col);
191
}
192
 
193
static void
194
loopback_Color4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha )
195
{
196
   GLubyte col[4];
197
   col[0] = UINT_TO_UBYTE(red);
198
   col[1] = UINT_TO_UBYTE(green);
199
   col[2] = UINT_TO_UBYTE(blue);
200
   col[3] = UINT_TO_UBYTE(alpha);
201
   COLORUBV(col);
202
}
203
 
204
static void
205
loopback_Color4us( GLushort red, GLushort green, GLushort blue,
206
                         GLushort alpha )
207
{
208
   GLubyte col[4];
209
   col[0] = USHORT_TO_UBYTE(red);
210
   col[1] = USHORT_TO_UBYTE(green);
211
   col[2] = USHORT_TO_UBYTE(blue);
212
   col[3] = USHORT_TO_UBYTE(alpha);
213
   COLORUBV(col);
214
}
215
 
216
static void
217
loopback_Color3bv( const GLbyte *v )
218
{
219
   GLubyte col[4];
220
   col[0] = BYTE_TO_UBYTE(v[0]);
221
   col[1] = BYTE_TO_UBYTE(v[1]);
222
   col[2] = BYTE_TO_UBYTE(v[2]);
223
   col[3] = 255;
224
   COLORUBV(col);
225
}
226
 
227
static void
228
loopback_Color3dv( const GLdouble *v )
229
{
230
   GLubyte col[4];
231
   GLfloat r = (GLfloat) v[0];
232
   GLfloat g = (GLfloat) v[1];
233
   GLfloat b = (GLfloat) v[2];
234
   UNCLAMPED_FLOAT_TO_UBYTE(col[0], r);
235
   UNCLAMPED_FLOAT_TO_UBYTE(col[1], g);
236
   UNCLAMPED_FLOAT_TO_UBYTE(col[2], b);
237
   col[3] = 255;
238
   COLORUBV( col );
239
}
240
 
241
static void
242
loopback_Color3iv( const GLint *v )
243
{
244
   GLubyte col[4];
245
   col[0] = INT_TO_UBYTE(v[0]);
246
   col[1] = INT_TO_UBYTE(v[1]);
247
   col[2] = INT_TO_UBYTE(v[2]);
248
   col[3] = 255;
249
   COLORUBV(col);
250
}
251
 
252
static void
253
loopback_Color3sv( const GLshort *v )
254
{
255
   GLubyte col[4];
256
   col[0] = SHORT_TO_UBYTE(v[0]);
257
   col[1] = SHORT_TO_UBYTE(v[1]);
258
   col[2] = SHORT_TO_UBYTE(v[2]);
259
   col[3] = 255;
260
   COLORUBV(col);
261
}
262
 
263
static void
264
loopback_Color3uiv( const GLuint *v )
265
{
266
   GLubyte col[4];
267
   col[0] = UINT_TO_UBYTE(v[0]);
268
   col[1] = UINT_TO_UBYTE(v[1]);
269
   col[2] = UINT_TO_UBYTE(v[2]);
270
   col[3] = 255;
271
   COLORUBV(col);
272
}
273
 
274
static void
275
loopback_Color3usv( const GLushort *v )
276
{
277
   GLubyte col[4];
278
   col[0] = USHORT_TO_UBYTE(v[0]);
279
   col[1] = USHORT_TO_UBYTE(v[1]);
280
   col[2] = USHORT_TO_UBYTE(v[2]);
281
   col[3] = 255;
282
   COLORUBV(col);
283
 
284
}
285
 
286
static void
287
loopback_Color4bv( const GLbyte *v )
288
{
289
   GLubyte col[4];
290
   col[0] = BYTE_TO_UBYTE(v[0]);
291
   col[1] = BYTE_TO_UBYTE(v[1]);
292
   col[2] = BYTE_TO_UBYTE(v[2]);
293
   col[3] = BYTE_TO_UBYTE(v[3]);
294
   COLORUBV(col);
295
}
296
 
297
static void
298
loopback_Color4dv( const GLdouble *v )
299
{
300
   GLubyte col[4];
301
   GLfloat r = (GLfloat) v[0];
302
   GLfloat g = (GLfloat) v[1];
303
   GLfloat b = (GLfloat) v[2];
304
   GLfloat a = (GLfloat) v[3];
305
   UNCLAMPED_FLOAT_TO_UBYTE(col[0], r);
306
   UNCLAMPED_FLOAT_TO_UBYTE(col[1], g);
307
   UNCLAMPED_FLOAT_TO_UBYTE(col[2], b);
308
   UNCLAMPED_FLOAT_TO_UBYTE(col[3], a);
309
   COLORUBV( col );
310
}
311
 
312
static void
313
loopback_Color4iv( const GLint *v )
314
{
315
   GLubyte col[4];
316
   col[0] = INT_TO_UBYTE(v[0]);
317
   col[1] = INT_TO_UBYTE(v[1]);
318
   col[2] = INT_TO_UBYTE(v[2]);
319
   col[3] = INT_TO_UBYTE(v[3]);
320
   COLORUBV(col);
321
}
322
 
323
static void
324
loopback_Color4sv( const GLshort *v)
325
{
326
   GLubyte col[4];
327
   col[0] = SHORT_TO_UBYTE(v[0]);
328
   col[1] = SHORT_TO_UBYTE(v[1]);
329
   col[2] = SHORT_TO_UBYTE(v[2]);
330
   col[3] = SHORT_TO_UBYTE(v[3]);
331
   COLORUBV(col);
332
}
333
 
334
static void
335
loopback_Color4uiv( const GLuint *v)
336
{
337
   GLubyte col[4];
338
   col[0] = UINT_TO_UBYTE(v[0]);
339
   col[1] = UINT_TO_UBYTE(v[1]);
340
   col[2] = UINT_TO_UBYTE(v[2]);
341
   col[3] = UINT_TO_UBYTE(v[3]);
342
   COLORUBV(col);
343
}
344
 
345
static void
346
loopback_Color4usv( const GLushort *v)
347
{
348
   GLubyte col[4];
349
   col[0] = USHORT_TO_UBYTE(v[0]);
350
   col[1] = USHORT_TO_UBYTE(v[1]);
351
   col[2] = USHORT_TO_UBYTE(v[2]);
352
   col[3] = USHORT_TO_UBYTE(v[3]);
353
   COLORUBV(col);
354
}
355
 
356
static void
357
loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue )
358
{
359
   COLORF( BYTE_TO_FLOAT(red),
360
           BYTE_TO_FLOAT(green),
361
           BYTE_TO_FLOAT(blue),
362
           1.0 );
363
}
364
 
365
static void
366
loopback_Color3d_f( GLdouble red, GLdouble green, GLdouble blue )
367
{
368
   COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, 1.0 );
369
}
370
 
371
static void
372
loopback_Color3i_f( GLint red, GLint green, GLint blue )
373
{
374
   COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
375
           INT_TO_FLOAT(blue), 1.0);
376
}
377
 
378
static void
379
loopback_Color3s_f( GLshort red, GLshort green, GLshort blue )
380
{
381
   COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
382
           SHORT_TO_FLOAT(blue), 1.0);
383
}
384
 
385
static void
386
loopback_Color3ui_f( GLuint red, GLuint green, GLuint blue )
387
{
388
   COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
389
           UINT_TO_FLOAT(blue), 1.0 );
390
}
391
 
392
static void
393
loopback_Color3us_f( GLushort red, GLushort green, GLushort blue )
394
{
395
   COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
396
           USHORT_TO_FLOAT(blue), 1.0 );
397
}
398
 
399
 
400
static void
401
loopback_Color3bv_f( const GLbyte *v )
402
{
403
   COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
404
           BYTE_TO_FLOAT(v[2]), 1.0 );
405
}
406
 
407
static void
408
loopback_Color3dv_f( const GLdouble *v )
409
{
410
   COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0 );
411
}
412
 
413
static void
414
loopback_Color3iv_f( const GLint *v )
415
{
416
   COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
417
           INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]) );
418
}
419
 
420
static void
421
loopback_Color3sv_f( const GLshort *v )
422
{
423
   COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
424
           SHORT_TO_FLOAT(v[2]), 1.0 );
425
}
426
 
427
static void
428
loopback_Color3uiv_f( const GLuint *v )
429
{
430
   COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
431
           UINT_TO_FLOAT(v[2]), 1.0 );
432
}
433
 
434
static void
435
loopback_Color3usv_f( const GLushort *v )
436
{
437
   COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
438
           USHORT_TO_FLOAT(v[2]), 1.0 );
439
}
440
 
441
 
442
static void
443
loopback_Color4b_f( GLbyte red, GLbyte green, GLbyte blue,
444
                              GLbyte alpha )
445
{
446
   COLORF( BYTE_TO_FLOAT(red), BYTE_TO_FLOAT(green),
447
           BYTE_TO_FLOAT(blue), BYTE_TO_FLOAT(alpha) );
448
}
449
 
450
static void
451
loopback_Color4d_f( GLdouble red, GLdouble green, GLdouble blue,
452
                              GLdouble alpha )
453
{
454
   COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, (GLfloat) alpha );
455
}
456
 
457
static void
458
loopback_Color4i_f( GLint red, GLint green, GLint blue, GLint alpha )
459
{
460
   COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green),
461
           INT_TO_FLOAT(blue), INT_TO_FLOAT(alpha) );
462
}
463
 
464
static void
465
loopback_Color4s_f( GLshort red, GLshort green, GLshort blue,
466
                              GLshort alpha )
467
{
468
   COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
469
           SHORT_TO_FLOAT(blue), SHORT_TO_FLOAT(alpha) );
470
}
471
 
472
static void
473
loopback_Color4ui_f( GLuint red, GLuint green, GLuint blue, GLuint alpha )
474
{
475
   COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
476
           UINT_TO_FLOAT(blue), UINT_TO_FLOAT(alpha) );
477
}
478
 
479
static void
480
loopback_Color4us_f( GLushort red, GLushort green, GLushort blue, GLushort alpha )
481
{
482
   COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
483
           USHORT_TO_FLOAT(blue), USHORT_TO_FLOAT(alpha) );
484
}
485
 
486
 
487
static void
488
loopback_Color4iv_f( const GLint *v )
489
{
490
   COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
491
           INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]) );
492
}
493
 
494
 
495
static void
496
loopback_Color4bv_f( const GLbyte *v )
497
{
498
   COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
499
           BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]) );
500
}
501
 
502
static void
503
loopback_Color4dv_f( const GLdouble *v )
504
{
505
   COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3] );
506
}
507
 
508
 
509
static void
510
loopback_Color4sv_f( const GLshort *v)
511
{
512
   COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
513
           SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]) );
514
}
515
 
516
 
517
static void
518
loopback_Color4uiv_f( const GLuint *v)
519
{
520
   COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
521
           UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]) );
522
}
523
 
524
static void
525
loopback_Color4usv_f( const GLushort *v)
526
{
527
   COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
528
           USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]) );
529
}
530
 
531
static void
532
loopback_FogCoorddEXT( GLdouble d )
533
{
534
   FOGCOORDF( (GLfloat) d );
535
}
536
 
537
static void
538
loopback_FogCoorddvEXT( const GLdouble *v )
539
{
540
   FOGCOORDF( (GLfloat) *v );
541
}
542
 
543
 
544
static void
545
loopback_Indexd( GLdouble c )
546
{
547
   INDEX( (GLint) c );
548
}
549
 
550
static void
551
loopback_Indexf( GLfloat c )
552
{
553
   INDEX( (GLuint) (GLint) c );
554
}
555
 
556
static void
557
loopback_Indexs( GLshort c )
558
{
559
   INDEX( (GLint) c );
560
}
561
 
562
static void
563
loopback_Indexub( GLubyte c )
564
{
565
   INDEX( (GLint) c );
566
}
567
 
568
static void
569
loopback_Indexdv( const GLdouble *c )
570
{
571
   INDEX( (GLint) (GLint) *c );
572
}
573
 
574
static void
575
loopback_Indexfv( const GLfloat *c )
576
{
577
   INDEX( (GLint) (GLint) *c );
578
}
579
 
580
static void
581
loopback_Indexiv( const GLint *c )
582
{
583
   INDEX( *c );
584
}
585
 
586
static void
587
loopback_Indexsv( const GLshort *c )
588
{
589
   INDEX( (GLint) *c );
590
}
591
 
592
static void
593
loopback_Indexubv( const GLubyte *c )
594
{
595
   INDEX( (GLint) *c );
596
}
597
 
598
static void
599
loopback_Normal3b( GLbyte nx, GLbyte ny, GLbyte nz )
600
{
601
   NORMAL( BYTE_TO_FLOAT(nx), BYTE_TO_FLOAT(ny), BYTE_TO_FLOAT(nz) );
602
}
603
 
604
static void
605
loopback_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz )
606
{
607
   NORMAL((GLfloat) nx, (GLfloat) ny, (GLfloat) nz);
608
}
609
 
610
static void
611
loopback_Normal3i( GLint nx, GLint ny, GLint nz )
612
{
613
   NORMAL( INT_TO_FLOAT(nx), INT_TO_FLOAT(ny), INT_TO_FLOAT(nz) );
614
}
615
 
616
static void
617
loopback_Normal3s( GLshort nx, GLshort ny, GLshort nz )
618
{
619
   NORMAL( SHORT_TO_FLOAT(nx), SHORT_TO_FLOAT(ny), SHORT_TO_FLOAT(nz) );
620
}
621
 
622
static void
623
loopback_Normal3bv( const GLbyte *v )
624
{
625
   NORMAL( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]) );
626
}
627
 
628
static void
629
loopback_Normal3dv( const GLdouble *v )
630
{
631
   NORMAL( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
632
}
633
 
634
static void
635
loopback_Normal3iv( const GLint *v )
636
{
637
   NORMAL( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]) );
638
}
639
 
640
static void
641
loopback_Normal3sv( const GLshort *v )
642
{
643
   NORMAL( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]) );
644
}
645
 
646
static void
647
loopback_TexCoord1d( GLdouble s )
648
{
649
   TEXCOORD1((GLfloat) s);
650
}
651
 
652
static void
653
loopback_TexCoord1i( GLint s )
654
{
655
   TEXCOORD1((GLfloat) s);
656
}
657
 
658
static void
659
loopback_TexCoord1s( GLshort s )
660
{
661
   TEXCOORD1((GLfloat) s);
662
}
663
 
664
static void
665
loopback_TexCoord2d( GLdouble s, GLdouble t )
666
{
667
   TEXCOORD2((GLfloat) s,(GLfloat) t);
668
}
669
 
670
static void
671
loopback_TexCoord2s( GLshort s, GLshort t )
672
{
673
   TEXCOORD2((GLfloat) s,(GLfloat) t);
674
}
675
 
676
static void
677
loopback_TexCoord2i( GLint s, GLint t )
678
{
679
   TEXCOORD2((GLfloat) s,(GLfloat) t);
680
}
681
 
682
static void
683
loopback_TexCoord3d( GLdouble s, GLdouble t, GLdouble r )
684
{
685
   TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
686
}
687
 
688
static void
689
loopback_TexCoord3i( GLint s, GLint t, GLint r )
690
{
691
   TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
692
}
693
 
694
static void
695
loopback_TexCoord3s( GLshort s, GLshort t, GLshort r )
696
{
697
   TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r);
698
}
699
 
700
static void
701
loopback_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q )
702
{
703
   TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
704
}
705
 
706
static void
707
loopback_TexCoord4i( GLint s, GLint t, GLint r, GLint q )
708
{
709
   TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
710
}
711
 
712
static void
713
loopback_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q )
714
{
715
   TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
716
}
717
 
718
static void
719
loopback_TexCoord1dv( const GLdouble *v )
720
{
721
   TEXCOORD1((GLfloat) v[0]);
722
}
723
 
724
static void
725
loopback_TexCoord1iv( const GLint *v )
726
{
727
   TEXCOORD1((GLfloat) v[0]);
728
}
729
 
730
static void
731
loopback_TexCoord1sv( const GLshort *v )
732
{
733
   TEXCOORD1((GLfloat) v[0]);
734
}
735
 
736
static void
737
loopback_TexCoord2dv( const GLdouble *v )
738
{
739
   TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
740
}
741
 
742
static void
743
loopback_TexCoord2iv( const GLint *v )
744
{
745
   TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
746
}
747
 
748
static void
749
loopback_TexCoord2sv( const GLshort *v )
750
{
751
   TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
752
}
753
 
754
static void
755
loopback_TexCoord3dv( const GLdouble *v )
756
{
757
   TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]);
758
}
759
 
760
static void
761
loopback_TexCoord3iv( const GLint *v )
762
{
763
   TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
764
}
765
 
766
static void
767
loopback_TexCoord3sv( const GLshort *v )
768
{
769
   TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
770
}
771
 
772
static void
773
loopback_TexCoord4dv( const GLdouble *v )
774
{
775
   TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
776
}
777
 
778
static void
779
loopback_TexCoord4iv( const GLint *v )
780
{
781
   TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
782
}
783
 
784
static void
785
loopback_TexCoord4sv( const GLshort *v )
786
{
787
   TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
788
}
789
 
790
static void
791
loopback_Vertex2d( GLdouble x, GLdouble y )
792
{
793
   VERTEX2( (GLfloat) x, (GLfloat) y );
794
}
795
 
796
static void
797
loopback_Vertex2i( GLint x, GLint y )
798
{
799
   VERTEX2( (GLfloat) x, (GLfloat) y );
800
}
801
 
802
static void
803
loopback_Vertex2s( GLshort x, GLshort y )
804
{
805
   VERTEX2( (GLfloat) x, (GLfloat) y );
806
}
807
 
808
static void
809
loopback_Vertex3d( GLdouble x, GLdouble y, GLdouble z )
810
{
811
   VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
812
}
813
 
814
static void
815
loopback_Vertex3i( GLint x, GLint y, GLint z )
816
{
817
   VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
818
}
819
 
820
static void
821
loopback_Vertex3s( GLshort x, GLshort y, GLshort z )
822
{
823
   VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z );
824
}
825
 
826
static void
827
loopback_Vertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w )
828
{
829
   VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
830
}
831
 
832
static void
833
loopback_Vertex4i( GLint x, GLint y, GLint z, GLint w )
834
{
835
   VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
836
}
837
 
838
static void
839
loopback_Vertex4s( GLshort x, GLshort y, GLshort z, GLshort w )
840
{
841
   VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
842
}
843
 
844
static void
845
loopback_Vertex2dv( const GLdouble *v )
846
{
847
   VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
848
}
849
 
850
static void
851
loopback_Vertex2iv( const GLint *v )
852
{
853
   VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
854
}
855
 
856
static void
857
loopback_Vertex2sv( const GLshort *v )
858
{
859
   VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
860
}
861
 
862
static void
863
loopback_Vertex3dv( const GLdouble *v )
864
{
865
   VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
866
}
867
 
868
static void
869
loopback_Vertex3iv( const GLint *v )
870
{
871
   VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
872
}
873
 
874
static void
875
loopback_Vertex3sv( const GLshort *v )
876
{
877
   VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
878
}
879
 
880
static void
881
loopback_Vertex4dv( const GLdouble *v )
882
{
883
   VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
884
            (GLfloat) v[2], (GLfloat) v[3] );
885
}
886
 
887
static void
888
loopback_Vertex4iv( const GLint *v )
889
{
890
   VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
891
            (GLfloat) v[2], (GLfloat) v[3] );
892
}
893
 
894
static void
895
loopback_Vertex4sv( const GLshort *v )
896
{
897
   VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
898
            (GLfloat) v[2], (GLfloat) v[3] );
899
}
900
 
901
static void
902
loopback_MultiTexCoord1dARB(GLenum target, GLdouble s)
903
{
904
   MULTI_TEXCOORD1( target, (GLfloat) s );
905
}
906
 
907
static void
908
loopback_MultiTexCoord1dvARB(GLenum target, const GLdouble *v)
909
{
910
   MULTI_TEXCOORD1( target, (GLfloat) v[0] );
911
}
912
 
913
static void
914
loopback_MultiTexCoord1iARB(GLenum target, GLint s)
915
{
916
   MULTI_TEXCOORD1( target, (GLfloat) s );
917
}
918
 
919
static void
920
loopback_MultiTexCoord1ivARB(GLenum target, const GLint *v)
921
{
922
   MULTI_TEXCOORD1( target, (GLfloat) v[0] );
923
}
924
 
925
static void
926
loopback_MultiTexCoord1sARB(GLenum target, GLshort s)
927
{
928
   MULTI_TEXCOORD1( target, (GLfloat) s );
929
}
930
 
931
static void
932
loopback_MultiTexCoord1svARB(GLenum target, const GLshort *v)
933
{
934
   MULTI_TEXCOORD1( target, (GLfloat) v[0] );
935
}
936
 
937
static void
938
loopback_MultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
939
{
940
   MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
941
}
942
 
943
static void
944
loopback_MultiTexCoord2dvARB(GLenum target, const GLdouble *v)
945
{
946
   MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
947
}
948
 
949
static void
950
loopback_MultiTexCoord2iARB(GLenum target, GLint s, GLint t)
951
{
952
   MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
953
}
954
 
955
static void
956
loopback_MultiTexCoord2ivARB(GLenum target, const GLint *v)
957
{
958
   MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
959
}
960
 
961
static void
962
loopback_MultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
963
{
964
   MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t );
965
}
966
 
967
static void
968
loopback_MultiTexCoord2svARB(GLenum target, const GLshort *v)
969
{
970
   MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] );
971
}
972
 
973
static void
974
loopback_MultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
975
{
976
   MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
977
}
978
 
979
static void
980
loopback_MultiTexCoord3dvARB(GLenum target, const GLdouble *v)
981
{
982
   MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
983
}
984
 
985
static void
986
loopback_MultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
987
{
988
   MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
989
}
990
 
991
static void
992
loopback_MultiTexCoord3ivARB(GLenum target, const GLint *v)
993
{
994
   MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
995
}
996
 
997
static void
998
loopback_MultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
999
{
1000
   MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r );
1001
}
1002
 
1003
static void
1004
loopback_MultiTexCoord3svARB(GLenum target, const GLshort *v)
1005
{
1006
   MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
1007
}
1008
 
1009
static void
1010
loopback_MultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1011
{
1012
   MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
1013
                    (GLfloat) r, (GLfloat) q );
1014
}
1015
 
1016
static void
1017
loopback_MultiTexCoord4dvARB(GLenum target, const GLdouble *v)
1018
{
1019
   MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
1020
                    (GLfloat) v[2], (GLfloat) v[3] );
1021
}
1022
 
1023
static void
1024
loopback_MultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
1025
{
1026
   MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
1027
                    (GLfloat) r, (GLfloat) q );
1028
}
1029
 
1030
static void
1031
loopback_MultiTexCoord4ivARB(GLenum target, const GLint *v)
1032
{
1033
   MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
1034
                    (GLfloat) v[2], (GLfloat) v[3] );
1035
}
1036
 
1037
static void
1038
loopback_MultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
1039
{
1040
   MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t,
1041
                    (GLfloat) r, (GLfloat) q );
1042
}
1043
 
1044
static void
1045
loopback_MultiTexCoord4svARB(GLenum target, const GLshort *v)
1046
{
1047
   MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1],
1048
                    (GLfloat) v[2], (GLfloat) v[3] );
1049
}
1050
 
1051
static void
1052
loopback_EvalCoord2dv( const GLdouble *u )
1053
{
1054
   EVALCOORD2( (GLfloat) u[0], (GLfloat) u[1] );
1055
}
1056
 
1057
static void
1058
loopback_EvalCoord2fv( const GLfloat *u )
1059
{
1060
   EVALCOORD2( u[0], u[1] );
1061
}
1062
 
1063
static void
1064
loopback_EvalCoord2d( GLdouble u, GLdouble v )
1065
{
1066
   EVALCOORD2( (GLfloat) u, (GLfloat) v );
1067
}
1068
 
1069
static void
1070
loopback_EvalCoord1dv( const GLdouble *u )
1071
{
1072
   EVALCOORD1( (GLfloat) *u );
1073
}
1074
 
1075
static void
1076
loopback_EvalCoord1fv( const GLfloat *u )
1077
{
1078
   EVALCOORD1( (GLfloat) *u );
1079
}
1080
 
1081
static void
1082
loopback_EvalCoord1d( GLdouble u )
1083
{
1084
   EVALCOORD1( (GLfloat) u );
1085
}
1086
 
1087
static void
1088
loopback_Materialf( GLenum face, GLenum pname, GLfloat param )
1089
{
1090
   GLfloat fparam[4];
1091
   fparam[0] = param;
1092
   MATERIALFV( face, pname, fparam );
1093
}
1094
 
1095
static void
1096
loopback_Materiali(GLenum face, GLenum pname, GLint param )
1097
{
1098
   GLfloat p = (GLfloat) param;
1099
   MATERIALFV(face, pname, &p);
1100
}
1101
 
1102
static void
1103
loopback_Materialiv(GLenum face, GLenum pname, const GLint *params )
1104
{
1105
   GLfloat fparam[4];
1106
   switch (pname) {
1107
   case GL_AMBIENT:
1108
   case GL_DIFFUSE:
1109
   case GL_SPECULAR:
1110
   case GL_EMISSION:
1111
   case GL_AMBIENT_AND_DIFFUSE:
1112
      fparam[0] = INT_TO_FLOAT( params[0] );
1113
      fparam[1] = INT_TO_FLOAT( params[1] );
1114
      fparam[2] = INT_TO_FLOAT( params[2] );
1115
      fparam[3] = INT_TO_FLOAT( params[3] );
1116
      break;
1117
   case GL_SHININESS:
1118
      fparam[0] = (GLfloat) params[0];
1119
      break;
1120
   case GL_COLOR_INDEXES:
1121
      fparam[0] = (GLfloat) params[0];
1122
      fparam[1] = (GLfloat) params[1];
1123
      fparam[2] = (GLfloat) params[2];
1124
      break;
1125
   default:
1126
      ;
1127
   }
1128
   MATERIALFV(face, pname, fparam);
1129
}
1130
 
1131
 
1132
static void
1133
loopback_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
1134
{
1135
   RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
1136
}
1137
 
1138
static void
1139
loopback_Rectdv(const GLdouble *v1, const GLdouble *v2)
1140
{
1141
   RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
1142
}
1143
 
1144
static void
1145
loopback_Rectfv(const GLfloat *v1, const GLfloat *v2)
1146
{
1147
   RECTF(v1[0], v1[1], v2[0], v2[1]);
1148
}
1149
 
1150
static void
1151
loopback_Recti(GLint x1, GLint y1, GLint x2, GLint y2)
1152
{
1153
   RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
1154
}
1155
 
1156
static void
1157
loopback_Rectiv(const GLint *v1, const GLint *v2)
1158
{
1159
   RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
1160
}
1161
 
1162
static void
1163
loopback_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
1164
{
1165
   RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2);
1166
}
1167
 
1168
static void
1169
loopback_Rectsv(const GLshort *v1, const GLshort *v2)
1170
{
1171
   RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
1172
}
1173
 
1174
static void
1175
loopback_SecondaryColor3bEXT( GLbyte red, GLbyte green, GLbyte blue )
1176
{
1177
   SECONDARYCOLORUB( BYTE_TO_UBYTE(red),
1178
                     BYTE_TO_UBYTE(green),
1179
                     BYTE_TO_UBYTE(blue) );
1180
}
1181
 
1182
static void
1183
loopback_SecondaryColor3dEXT( GLdouble red, GLdouble green, GLdouble blue )
1184
{
1185
   GLubyte col[3];
1186
   GLfloat r = (GLfloat) red;
1187
   GLfloat g = (GLfloat) green;
1188
   GLfloat b = (GLfloat) blue;
1189
   UNCLAMPED_FLOAT_TO_UBYTE(col[0], r);
1190
   UNCLAMPED_FLOAT_TO_UBYTE(col[1], g);
1191
   UNCLAMPED_FLOAT_TO_UBYTE(col[2], b);
1192
   SECONDARYCOLORUB( col[0], col[1], col[2] );
1193
}
1194
 
1195
static void
1196
loopback_SecondaryColor3iEXT( GLint red, GLint green, GLint blue )
1197
{
1198
   SECONDARYCOLORUB( INT_TO_UBYTE(red),
1199
                     INT_TO_UBYTE(green),
1200
                     INT_TO_UBYTE(blue));
1201
}
1202
 
1203
static void
1204
loopback_SecondaryColor3sEXT( GLshort red, GLshort green, GLshort blue )
1205
{
1206
   SECONDARYCOLORUB(SHORT_TO_UBYTE(red),
1207
                    SHORT_TO_UBYTE(green),
1208
                    SHORT_TO_UBYTE(blue));
1209
}
1210
 
1211
static void
1212
loopback_SecondaryColor3uiEXT( GLuint red, GLuint green, GLuint blue )
1213
{
1214
   SECONDARYCOLORUB(UINT_TO_UBYTE(red),
1215
                    UINT_TO_UBYTE(green),
1216
                    UINT_TO_UBYTE(blue));
1217
}
1218
 
1219
static void
1220
loopback_SecondaryColor3usEXT( GLushort red, GLushort green, GLushort blue )
1221
{
1222
   SECONDARYCOLORUB(USHORT_TO_UBYTE(red),
1223
                    USHORT_TO_UBYTE(green),
1224
                    USHORT_TO_UBYTE(blue));
1225
}
1226
 
1227
static void
1228
loopback_SecondaryColor3bvEXT( const GLbyte *v )
1229
{
1230
   const GLfloat a = BYTE_TO_FLOAT(v[0]);
1231
   const GLfloat b = BYTE_TO_FLOAT(v[1]);
1232
   const GLfloat c = BYTE_TO_FLOAT(v[2]);
1233
   SECONDARYCOLORF(a,b,c);
1234
}
1235
 
1236
static void
1237
loopback_SecondaryColor3dvEXT( const GLdouble *v )
1238
{
1239
   GLubyte col[3];
1240
   GLfloat r = (GLfloat) v[0];
1241
   GLfloat g = (GLfloat) v[1];
1242
   GLfloat b = (GLfloat) v[2];
1243
   UNCLAMPED_FLOAT_TO_UBYTE(col[0], r);
1244
   UNCLAMPED_FLOAT_TO_UBYTE(col[1], g);
1245
   UNCLAMPED_FLOAT_TO_UBYTE(col[2], b);
1246
   SECONDARYCOLORUB( col[0], col[1], col[2] );
1247
}
1248
 
1249
static void
1250
loopback_SecondaryColor3ivEXT( const GLint *v )
1251
{
1252
   SECONDARYCOLORUB(INT_TO_UBYTE(v[0]),
1253
                    INT_TO_UBYTE(v[1]),
1254
                    INT_TO_UBYTE(v[2]));
1255
}
1256
 
1257
static void
1258
loopback_SecondaryColor3svEXT( const GLshort *v )
1259
{
1260
   SECONDARYCOLORUB(SHORT_TO_UBYTE(v[0]),
1261
                    SHORT_TO_UBYTE(v[1]),
1262
                    SHORT_TO_UBYTE(v[2]));
1263
}
1264
 
1265
static void
1266
loopback_SecondaryColor3uivEXT( const GLuint *v )
1267
{
1268
   SECONDARYCOLORUB(UINT_TO_UBYTE(v[0]),
1269
                    UINT_TO_UBYTE(v[1]),
1270
                    UINT_TO_UBYTE(v[2]));
1271
}
1272
 
1273
static void
1274
loopback_SecondaryColor3usvEXT( const GLushort *v )
1275
{
1276
   SECONDARYCOLORUB(USHORT_TO_UBYTE(v[0]),
1277
                    USHORT_TO_UBYTE(v[1]),
1278
                    USHORT_TO_UBYTE(v[2]));
1279
}
1280
 
1281
 
1282
static void
1283
loopback_SecondaryColor3bEXT_f( GLbyte red, GLbyte green, GLbyte blue )
1284
{
1285
   SECONDARYCOLORF( BYTE_TO_FLOAT(red),
1286
                    BYTE_TO_FLOAT(green),
1287
                    BYTE_TO_FLOAT(blue) );
1288
}
1289
 
1290
static void
1291
loopback_SecondaryColor3dEXT_f( GLdouble red, GLdouble green, GLdouble blue )
1292
{
1293
   SECONDARYCOLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue );
1294
}
1295
 
1296
static void
1297
loopback_SecondaryColor3iEXT_f( GLint red, GLint green, GLint blue )
1298
{
1299
   SECONDARYCOLORF( INT_TO_FLOAT(red),
1300
                    INT_TO_FLOAT(green),
1301
                    INT_TO_FLOAT(blue));
1302
}
1303
 
1304
static void
1305
loopback_SecondaryColor3sEXT_f( GLshort red, GLshort green, GLshort blue )
1306
{
1307
   SECONDARYCOLORF(SHORT_TO_FLOAT(red),
1308
                   SHORT_TO_FLOAT(green),
1309
                   SHORT_TO_FLOAT(blue));
1310
}
1311
 
1312
static void
1313
loopback_SecondaryColor3uiEXT_f( GLuint red, GLuint green, GLuint blue )
1314
{
1315
   SECONDARYCOLORF(UINT_TO_FLOAT(red),
1316
                   UINT_TO_FLOAT(green),
1317
                   UINT_TO_FLOAT(blue));
1318
}
1319
 
1320
static void
1321
loopback_SecondaryColor3usEXT_f( GLushort red, GLushort green, GLushort blue )
1322
{
1323
   SECONDARYCOLORF(USHORT_TO_FLOAT(red),
1324
                   USHORT_TO_FLOAT(green),
1325
                   USHORT_TO_FLOAT(blue));
1326
}
1327
 
1328
static void
1329
loopback_SecondaryColor3bvEXT_f( const GLbyte *v )
1330
{
1331
   SECONDARYCOLORF(BYTE_TO_FLOAT(v[0]),
1332
                   BYTE_TO_FLOAT(v[1]),
1333
                   BYTE_TO_FLOAT(v[2]));
1334
}
1335
 
1336
static void
1337
loopback_SecondaryColor3dvEXT_f( const GLdouble *v )
1338
{
1339
   SECONDARYCOLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
1340
}
1341
static void
1342
loopback_SecondaryColor3ivEXT_f( const GLint *v )
1343
{
1344
   SECONDARYCOLORF(INT_TO_FLOAT(v[0]),
1345
                   INT_TO_FLOAT(v[1]),
1346
                   INT_TO_FLOAT(v[2]));
1347
}
1348
 
1349
static void
1350
loopback_SecondaryColor3svEXT_f( const GLshort *v )
1351
{
1352
   SECONDARYCOLORF(SHORT_TO_FLOAT(v[0]),
1353
                   SHORT_TO_FLOAT(v[1]),
1354
                   SHORT_TO_FLOAT(v[2]));
1355
}
1356
 
1357
static void
1358
loopback_SecondaryColor3uivEXT_f( const GLuint *v )
1359
{
1360
   SECONDARYCOLORF(UINT_TO_FLOAT(v[0]),
1361
                   UINT_TO_FLOAT(v[1]),
1362
                   UINT_TO_FLOAT(v[2]));
1363
}
1364
 
1365
static void
1366
loopback_SecondaryColor3usvEXT_f( const GLushort *v )
1367
{
1368
   SECONDARYCOLORF(USHORT_TO_FLOAT(v[0]),
1369
                   USHORT_TO_FLOAT(v[1]),
1370
                   USHORT_TO_FLOAT(v[2]));
1371
}
1372
 
1373
 
1374
/*
1375
 * GL_NV_vertex_program
1376
 */
1377
 
1378
static void
1379
loopback_VertexAttrib1sNV(GLuint index, GLshort x)
1380
{
1381
   ATTRIB(index, (GLfloat) x, 0.0F, 0.0F, 1.0F);
1382
}
1383
 
1384
static void
1385
loopback_VertexAttrib1fNV(GLuint index, GLfloat x)
1386
{
1387
   ATTRIB(index, x, 0.0F, 0.0F, 1.0F);
1388
}
1389
 
1390
static void
1391
loopback_VertexAttrib1dNV(GLuint index, GLdouble x)
1392
{
1393
   ATTRIB(index, (GLfloat) x, 0.0F, 0.0F, 1.0F);
1394
}
1395
 
1396
static void
1397
loopback_VertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
1398
{
1399
   ATTRIB(index, (GLfloat) x, y, 0.0F, 1.0F);
1400
}
1401
 
1402
static void
1403
loopback_VertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
1404
{
1405
   ATTRIB(index, (GLfloat) x, y, 0.0F, 1.0F);
1406
}
1407
 
1408
static void
1409
loopback_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
1410
{
1411
   ATTRIB(index, (GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
1412
}
1413
 
1414
static void
1415
loopback_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
1416
{
1417
   ATTRIB(index, (GLfloat) x, y, z, 1.0F);
1418
}
1419
 
1420
static void
1421
loopback_VertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
1422
{
1423
   ATTRIB(index, x, y, z, 1.0F);
1424
}
1425
 
1426
static void
1427
loopback_VertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
1428
{
1429
   ATTRIB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
1430
}
1431
 
1432
static void
1433
loopback_VertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
1434
{
1435
   ATTRIB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1436
}
1437
 
1438
static void
1439
loopback_VertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
1440
{
1441
   ATTRIB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
1442
}
1443
 
1444
static void
1445
loopback_VertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
1446
{
1447
   ATTRIB(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
1448
        UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
1449
}
1450
 
1451
static void
1452
loopback_VertexAttrib1svNV(GLuint index, const GLshort *v)
1453
{
1454
   ATTRIB(index, (GLfloat) v[0], 0.0F, 0.0F, 1.0F);
1455
}
1456
 
1457
static void
1458
loopback_VertexAttrib1fvNV(GLuint index, const GLfloat *v)
1459
{
1460
   ATTRIB(index, v[0], 0.0F, 0.0F, 1.0F);
1461
}
1462
 
1463
static void
1464
loopback_VertexAttrib1dvNV(GLuint index, const GLdouble *v)
1465
{
1466
   ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
1467
}
1468
 
1469
static void
1470
loopback_VertexAttrib2svNV(GLuint index, const GLshort *v)
1471
{
1472
   ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
1473
}
1474
 
1475
static void
1476
loopback_VertexAttrib2fvNV(GLuint index, const GLfloat *v)
1477
{
1478
   ATTRIB(index, v[0], v[1], 0.0F, 1.0F);
1479
}
1480
 
1481
static void
1482
loopback_VertexAttrib2dvNV(GLuint index, const GLdouble *v)
1483
{
1484
   ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
1485
}
1486
 
1487
static void
1488
loopback_VertexAttrib3svNV(GLuint index, const GLshort *v)
1489
{
1490
   ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
1491
}
1492
 
1493
static void
1494
loopback_VertexAttrib3fvNV(GLuint index, const GLfloat *v)
1495
{
1496
   ATTRIB(index, v[0], v[1], v[2], 1.0F);
1497
}
1498
 
1499
static void
1500
loopback_VertexAttrib3dvNV(GLuint index, const GLdouble *v)
1501
{
1502
   ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
1503
}
1504
 
1505
static void
1506
loopback_VertexAttrib4svNV(GLuint index, const GLshort *v)
1507
{
1508
   ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
1509
}
1510
 
1511
static void
1512
loopback_VertexAttrib4fvNV(GLuint index, const GLfloat *v)
1513
{
1514
   ATTRIB(index, v[0], v[1], v[2], v[3]);
1515
}
1516
 
1517
static void
1518
loopback_VertexAttrib4dvNV(GLuint index, const GLdouble *v)
1519
{
1520
   ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
1521
}
1522
 
1523
static void
1524
loopback_VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
1525
{
1526
   ATTRIB(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
1527
          UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
1528
}
1529
 
1530
 
1531
static void
1532
loopback_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v)
1533
{
1534
   GLint i;
1535
   for (i = n - 1; i >= 0; i--)
1536
      loopback_VertexAttrib1svNV(index + i, v + i);
1537
}
1538
 
1539
static void
1540
loopback_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v)
1541
{
1542
   GLint i;
1543
   for (i = n - 1; i >= 0; i--)
1544
      loopback_VertexAttrib1fvNV(index + i, v + i);
1545
}
1546
 
1547
static void
1548
loopback_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v)
1549
{
1550
   GLint i;
1551
   for (i = n - 1; i >= 0; i--)
1552
      loopback_VertexAttrib1dvNV(index + i, v + i);
1553
}
1554
 
1555
static void
1556
loopback_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v)
1557
{
1558
   GLint i;
1559
   for (i = n - 1; i >= 0; i--)
1560
      loopback_VertexAttrib2svNV(index + i, v + 2 * i);
1561
}
1562
 
1563
static void
1564
loopback_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v)
1565
{
1566
   GLint i;
1567
   for (i = n - 1; i >= 0; i--)
1568
      loopback_VertexAttrib2fvNV(index + i, v + 2 * i);
1569
}
1570
 
1571
static void
1572
loopback_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v)
1573
{
1574
   GLint i;
1575
   for (i = n - 1; i >= 0; i--)
1576
      loopback_VertexAttrib2dvNV(index + i, v + 2 * i);
1577
}
1578
 
1579
static void
1580
loopback_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v)
1581
{
1582
   GLint i;
1583
   for (i = n - 1; i >= 0; i--)
1584
      loopback_VertexAttrib3svNV(index + i, v + 3 * i);
1585
}
1586
 
1587
static void
1588
loopback_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v)
1589
{
1590
   GLint i;
1591
   for (i = n - 1; i >= 0; i--)
1592
      loopback_VertexAttrib3fvNV(index + i, v + 3 * i);
1593
}
1594
 
1595
static void
1596
loopback_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v)
1597
{
1598
   GLint i;
1599
   for (i = n - 1; i >= 0; i--)
1600
      loopback_VertexAttrib3dvNV(index + i, v + 3 * i);
1601
}
1602
 
1603
static void
1604
loopback_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v)
1605
{
1606
   GLint i;
1607
   for (i = n - 1; i >= 0; i--)
1608
      loopback_VertexAttrib4svNV(index + i, v + 4 * i);
1609
}
1610
 
1611
static void
1612
loopback_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v)
1613
{
1614
   GLint i;
1615
   for (i = n - 1; i >= 0; i--)
1616
      loopback_VertexAttrib4fvNV(index + i, v + 4 * i);
1617
}
1618
 
1619
static void
1620
loopback_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v)
1621
{
1622
   GLint i;
1623
   for (i = n - 1; i >= 0; i--)
1624
      loopback_VertexAttrib4dvNV(index + i, v + 4 * i);
1625
}
1626
 
1627
static void
1628
loopback_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
1629
{
1630
   GLint i;
1631
   for (i = n - 1; i >= 0; i--)
1632
      loopback_VertexAttrib4ubvNV(index + i, v + 4 * i);
1633
}
1634
 
1635
 
1636
 
1637
void
1638
_mesa_loopback_prefer_float( struct _glapi_table *dest,
1639
                             GLboolean prefer_float_colors )
1640
{
1641
   if (!prefer_float_colors) {
1642
      dest->Color3b = loopback_Color3b;
1643
      dest->Color3d = loopback_Color3d;
1644
      dest->Color3i = loopback_Color3i;
1645
      dest->Color3s = loopback_Color3s;
1646
      dest->Color3ui = loopback_Color3ui;
1647
      dest->Color3us = loopback_Color3us;
1648
      dest->Color4b = loopback_Color4b;
1649
      dest->Color4d = loopback_Color4d;
1650
      dest->Color4i = loopback_Color4i;
1651
      dest->Color4s = loopback_Color4s;
1652
      dest->Color4ui = loopback_Color4ui;
1653
      dest->Color4us = loopback_Color4us;
1654
      dest->Color3bv = loopback_Color3bv;
1655
      dest->Color3dv = loopback_Color3dv;
1656
      dest->Color3iv = loopback_Color3iv;
1657
      dest->Color3sv = loopback_Color3sv;
1658
      dest->Color3uiv = loopback_Color3uiv;
1659
      dest->Color3usv = loopback_Color3usv;
1660
      dest->Color4bv = loopback_Color4bv;
1661
      dest->Color4dv = loopback_Color4dv;
1662
      dest->Color4iv = loopback_Color4iv;
1663
      dest->Color4sv = loopback_Color4sv;
1664
      dest->Color4uiv = loopback_Color4uiv;
1665
      dest->Color4usv = loopback_Color4usv;
1666
      dest->SecondaryColor3bEXT = loopback_SecondaryColor3bEXT;
1667
      dest->SecondaryColor3dEXT = loopback_SecondaryColor3dEXT;
1668
      dest->SecondaryColor3iEXT = loopback_SecondaryColor3iEXT;
1669
      dest->SecondaryColor3sEXT = loopback_SecondaryColor3sEXT;
1670
      dest->SecondaryColor3uiEXT = loopback_SecondaryColor3uiEXT;
1671
      dest->SecondaryColor3usEXT = loopback_SecondaryColor3usEXT;
1672
      dest->SecondaryColor3bvEXT = loopback_SecondaryColor3bvEXT;
1673
      dest->SecondaryColor3dvEXT = loopback_SecondaryColor3dvEXT;
1674
      dest->SecondaryColor3ivEXT = loopback_SecondaryColor3ivEXT;
1675
      dest->SecondaryColor3svEXT = loopback_SecondaryColor3svEXT;
1676
      dest->SecondaryColor3uivEXT = loopback_SecondaryColor3uivEXT;
1677
      dest->SecondaryColor3usvEXT = loopback_SecondaryColor3usvEXT;
1678
   }
1679
   else {
1680
      dest->Color3b = loopback_Color3b_f;
1681
      dest->Color3d = loopback_Color3d_f;
1682
      dest->Color3i = loopback_Color3i_f;
1683
      dest->Color3s = loopback_Color3s_f;
1684
      dest->Color3ui = loopback_Color3ui_f;
1685
      dest->Color3us = loopback_Color3us_f;
1686
      dest->Color4b = loopback_Color4b_f;
1687
      dest->Color4d = loopback_Color4d_f;
1688
      dest->Color4i = loopback_Color4i_f;
1689
      dest->Color4s = loopback_Color4s_f;
1690
      dest->Color4ui = loopback_Color4ui_f;
1691
      dest->Color4us = loopback_Color4us_f;
1692
      dest->Color3bv = loopback_Color3bv_f;
1693
      dest->Color3dv = loopback_Color3dv_f;
1694
      dest->Color3iv = loopback_Color3iv_f;
1695
      dest->Color3sv = loopback_Color3sv_f;
1696
      dest->Color3uiv = loopback_Color3uiv_f;
1697
      dest->Color3usv = loopback_Color3usv_f;
1698
      dest->Color4bv = loopback_Color4bv_f;
1699
      dest->Color4dv = loopback_Color4dv_f;
1700
      dest->Color4iv = loopback_Color4iv_f;
1701
      dest->Color4sv = loopback_Color4sv_f;
1702
      dest->Color4uiv = loopback_Color4uiv_f;
1703
      dest->Color4usv = loopback_Color4usv_f;
1704
      dest->SecondaryColor3bEXT = loopback_SecondaryColor3bEXT_f;
1705
      dest->SecondaryColor3dEXT = loopback_SecondaryColor3dEXT_f;
1706
      dest->SecondaryColor3iEXT = loopback_SecondaryColor3iEXT_f;
1707
      dest->SecondaryColor3sEXT = loopback_SecondaryColor3sEXT_f;
1708
      dest->SecondaryColor3uiEXT = loopback_SecondaryColor3uiEXT_f;
1709
      dest->SecondaryColor3usEXT = loopback_SecondaryColor3usEXT_f;
1710
      dest->SecondaryColor3bvEXT = loopback_SecondaryColor3bvEXT_f;
1711
      dest->SecondaryColor3dvEXT = loopback_SecondaryColor3dvEXT_f;
1712
      dest->SecondaryColor3ivEXT = loopback_SecondaryColor3ivEXT_f;
1713
      dest->SecondaryColor3svEXT = loopback_SecondaryColor3svEXT_f;
1714
      dest->SecondaryColor3uivEXT = loopback_SecondaryColor3uivEXT_f;
1715
      dest->SecondaryColor3usvEXT = loopback_SecondaryColor3usvEXT_f;
1716
   }
1717
}
1718
 
1719
/* Passing prefer_float_colors as true will mean that all colors
1720
 * *except* Color{34}ub{v} are passed as floats.  Setting it false will
1721
 * mean all colors *except* Color{34}f{v} are passed as ubytes.
1722
 *
1723
 * This code never registers handlers for any of the entry points
1724
 * listed in vtxfmt.h.
1725
 */
1726
void
1727
_mesa_loopback_init_api_table( struct _glapi_table *dest,
1728
                               GLboolean prefer_float_colors )
1729
{
1730
   _mesa_loopback_prefer_float( dest, prefer_float_colors );
1731
 
1732
   dest->Indexd = loopback_Indexd;
1733
   dest->Indexf = loopback_Indexf;
1734
   dest->Indexs = loopback_Indexs;
1735
   dest->Indexub = loopback_Indexub;
1736
   dest->Indexdv = loopback_Indexdv;
1737
   dest->Indexfv = loopback_Indexfv;
1738
   dest->Indexiv = loopback_Indexiv;
1739
   dest->Indexsv = loopback_Indexsv;
1740
   dest->Indexubv = loopback_Indexubv;
1741
   dest->Normal3b = loopback_Normal3b;
1742
   dest->Normal3d = loopback_Normal3d;
1743
   dest->Normal3i = loopback_Normal3i;
1744
   dest->Normal3s = loopback_Normal3s;
1745
   dest->Normal3bv = loopback_Normal3bv;
1746
   dest->Normal3dv = loopback_Normal3dv;
1747
   dest->Normal3iv = loopback_Normal3iv;
1748
   dest->Normal3sv = loopback_Normal3sv;
1749
   dest->TexCoord1d = loopback_TexCoord1d;
1750
   dest->TexCoord1i = loopback_TexCoord1i;
1751
   dest->TexCoord1s = loopback_TexCoord1s;
1752
   dest->TexCoord2d = loopback_TexCoord2d;
1753
   dest->TexCoord2s = loopback_TexCoord2s;
1754
   dest->TexCoord2i = loopback_TexCoord2i;
1755
   dest->TexCoord3d = loopback_TexCoord3d;
1756
   dest->TexCoord3i = loopback_TexCoord3i;
1757
   dest->TexCoord3s = loopback_TexCoord3s;
1758
   dest->TexCoord4d = loopback_TexCoord4d;
1759
   dest->TexCoord4i = loopback_TexCoord4i;
1760
   dest->TexCoord4s = loopback_TexCoord4s;
1761
   dest->TexCoord1dv = loopback_TexCoord1dv;
1762
   dest->TexCoord1iv = loopback_TexCoord1iv;
1763
   dest->TexCoord1sv = loopback_TexCoord1sv;
1764
   dest->TexCoord2dv = loopback_TexCoord2dv;
1765
   dest->TexCoord2iv = loopback_TexCoord2iv;
1766
   dest->TexCoord2sv = loopback_TexCoord2sv;
1767
   dest->TexCoord3dv = loopback_TexCoord3dv;
1768
   dest->TexCoord3iv = loopback_TexCoord3iv;
1769
   dest->TexCoord3sv = loopback_TexCoord3sv;
1770
   dest->TexCoord4dv = loopback_TexCoord4dv;
1771
   dest->TexCoord4iv = loopback_TexCoord4iv;
1772
   dest->TexCoord4sv = loopback_TexCoord4sv;
1773
   dest->Vertex2d = loopback_Vertex2d;
1774
   dest->Vertex2i = loopback_Vertex2i;
1775
   dest->Vertex2s = loopback_Vertex2s;
1776
   dest->Vertex3d = loopback_Vertex3d;
1777
   dest->Vertex3i = loopback_Vertex3i;
1778
   dest->Vertex3s = loopback_Vertex3s;
1779
   dest->Vertex4d = loopback_Vertex4d;
1780
   dest->Vertex4i = loopback_Vertex4i;
1781
   dest->Vertex4s = loopback_Vertex4s;
1782
   dest->Vertex2dv = loopback_Vertex2dv;
1783
   dest->Vertex2iv = loopback_Vertex2iv;
1784
   dest->Vertex2sv = loopback_Vertex2sv;
1785
   dest->Vertex3dv = loopback_Vertex3dv;
1786
   dest->Vertex3iv = loopback_Vertex3iv;
1787
   dest->Vertex3sv = loopback_Vertex3sv;
1788
   dest->Vertex4dv = loopback_Vertex4dv;
1789
   dest->Vertex4iv = loopback_Vertex4iv;
1790
   dest->Vertex4sv = loopback_Vertex4sv;
1791
   dest->MultiTexCoord1dARB = loopback_MultiTexCoord1dARB;
1792
   dest->MultiTexCoord1dvARB = loopback_MultiTexCoord1dvARB;
1793
   dest->MultiTexCoord1iARB = loopback_MultiTexCoord1iARB;
1794
   dest->MultiTexCoord1ivARB = loopback_MultiTexCoord1ivARB;
1795
   dest->MultiTexCoord1sARB = loopback_MultiTexCoord1sARB;
1796
   dest->MultiTexCoord1svARB = loopback_MultiTexCoord1svARB;
1797
   dest->MultiTexCoord2dARB = loopback_MultiTexCoord2dARB;
1798
   dest->MultiTexCoord2dvARB = loopback_MultiTexCoord2dvARB;
1799
   dest->MultiTexCoord2iARB = loopback_MultiTexCoord2iARB;
1800
   dest->MultiTexCoord2ivARB = loopback_MultiTexCoord2ivARB;
1801
   dest->MultiTexCoord2sARB = loopback_MultiTexCoord2sARB;
1802
   dest->MultiTexCoord2svARB = loopback_MultiTexCoord2svARB;
1803
   dest->MultiTexCoord3dARB = loopback_MultiTexCoord3dARB;
1804
   dest->MultiTexCoord3dvARB = loopback_MultiTexCoord3dvARB;
1805
   dest->MultiTexCoord3iARB = loopback_MultiTexCoord3iARB;
1806
   dest->MultiTexCoord3ivARB = loopback_MultiTexCoord3ivARB;
1807
   dest->MultiTexCoord3sARB = loopback_MultiTexCoord3sARB;
1808
   dest->MultiTexCoord3svARB = loopback_MultiTexCoord3svARB;
1809
   dest->MultiTexCoord4dARB = loopback_MultiTexCoord4dARB;
1810
   dest->MultiTexCoord4dvARB = loopback_MultiTexCoord4dvARB;
1811
   dest->MultiTexCoord4iARB = loopback_MultiTexCoord4iARB;
1812
   dest->MultiTexCoord4ivARB = loopback_MultiTexCoord4ivARB;
1813
   dest->MultiTexCoord4sARB = loopback_MultiTexCoord4sARB;
1814
   dest->MultiTexCoord4svARB = loopback_MultiTexCoord4svARB;
1815
   dest->EvalCoord2dv = loopback_EvalCoord2dv;
1816
   dest->EvalCoord2fv = loopback_EvalCoord2fv;
1817
   dest->EvalCoord2d = loopback_EvalCoord2d;
1818
   dest->EvalCoord1dv = loopback_EvalCoord1dv;
1819
   dest->EvalCoord1fv = loopback_EvalCoord1fv;
1820
   dest->EvalCoord1d = loopback_EvalCoord1d;
1821
   dest->Materialf = loopback_Materialf;
1822
   dest->Materiali = loopback_Materiali;
1823
   dest->Materialiv = loopback_Materialiv;
1824
   dest->Rectd = loopback_Rectd;
1825
   dest->Rectdv = loopback_Rectdv;
1826
   dest->Rectfv = loopback_Rectfv;
1827
   dest->Recti = loopback_Recti;
1828
   dest->Rectiv = loopback_Rectiv;
1829
   dest->Rects = loopback_Rects;
1830
   dest->Rectsv = loopback_Rectsv;
1831
   dest->FogCoorddEXT = loopback_FogCoorddEXT;
1832
   dest->FogCoorddvEXT = loopback_FogCoorddvEXT;
1833
 
1834
   dest->VertexAttrib1sNV = loopback_VertexAttrib1sNV;
1835
   dest->VertexAttrib1fNV = loopback_VertexAttrib1fNV;
1836
   dest->VertexAttrib1dNV = loopback_VertexAttrib1dNV;
1837
   dest->VertexAttrib2sNV = loopback_VertexAttrib2sNV;
1838
   dest->VertexAttrib2fNV = loopback_VertexAttrib2fNV;
1839
   dest->VertexAttrib2dNV = loopback_VertexAttrib2dNV;
1840
   dest->VertexAttrib3sNV = loopback_VertexAttrib3sNV;
1841
   dest->VertexAttrib3fNV = loopback_VertexAttrib3fNV;
1842
   dest->VertexAttrib3dNV = loopback_VertexAttrib3dNV;
1843
   dest->VertexAttrib4sNV = loopback_VertexAttrib4sNV;
1844
   dest->VertexAttrib4dNV = loopback_VertexAttrib4dNV;
1845
   dest->VertexAttrib4ubNV = loopback_VertexAttrib4ubNV;
1846
 
1847
   dest->VertexAttrib1svNV = loopback_VertexAttrib1svNV;
1848
   dest->VertexAttrib1fvNV = loopback_VertexAttrib1fvNV;
1849
   dest->VertexAttrib1dvNV = loopback_VertexAttrib1dvNV;
1850
   dest->VertexAttrib2svNV = loopback_VertexAttrib2svNV;
1851
   dest->VertexAttrib2fvNV = loopback_VertexAttrib2fvNV;
1852
   dest->VertexAttrib2dvNV = loopback_VertexAttrib2dvNV;
1853
   dest->VertexAttrib3svNV = loopback_VertexAttrib3svNV;
1854
   dest->VertexAttrib3fvNV = loopback_VertexAttrib3fvNV;
1855
   dest->VertexAttrib3dvNV = loopback_VertexAttrib3dvNV;
1856
   dest->VertexAttrib4svNV = loopback_VertexAttrib4svNV;
1857
   dest->VertexAttrib4fvNV = loopback_VertexAttrib4fvNV;
1858
   dest->VertexAttrib4dvNV = loopback_VertexAttrib4dvNV;
1859
   dest->VertexAttrib4ubvNV = loopback_VertexAttrib4ubvNV;
1860
 
1861
   dest->VertexAttribs1svNV = loopback_VertexAttribs1svNV;
1862
   dest->VertexAttribs1fvNV = loopback_VertexAttribs1fvNV;
1863
   dest->VertexAttribs1dvNV = loopback_VertexAttribs1dvNV;
1864
   dest->VertexAttribs2svNV = loopback_VertexAttribs2svNV;
1865
   dest->VertexAttribs2fvNV = loopback_VertexAttribs2fvNV;
1866
   dest->VertexAttribs2dvNV = loopback_VertexAttribs2dvNV;
1867
   dest->VertexAttribs3svNV = loopback_VertexAttribs3svNV;
1868
   dest->VertexAttribs3fvNV = loopback_VertexAttribs3fvNV;
1869
   dest->VertexAttribs3dvNV = loopback_VertexAttribs3dvNV;
1870
   dest->VertexAttribs4svNV = loopback_VertexAttribs4svNV;
1871
   dest->VertexAttribs4fvNV = loopback_VertexAttribs4fvNV;
1872
   dest->VertexAttribs4dvNV = loopback_VertexAttribs4dvNV;
1873
   dest->VertexAttribs4ubvNV = loopback_VertexAttribs4ubvNV;
1874
 
1875
}