4 * \author Keith Whitwell <keith@tungstengraphics.com>
8 * Mesa 3-D graphics library
11 * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
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:
20 * The above copyright notice and this permission notice shall be included
21 * in all copies or substantial portions of the Software.
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.
34 #include "glapitable.h"
37 #include "api_loopback.h"
39 /* KW: A set of functions to convert unusual Color/Normal/Vertex/etc
40 * calls to a smaller set of driver-provided formats. Currently just
41 * go back to dispatch to find these (eg. call glNormal3f directly),
44 * The driver must supply all of the remaining entry points, which are
45 * listed in dd.h. The easiest way for a driver to do this is to
46 * install the supplied software t&l module.
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) glIndexf(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)
67 /* Extension functions must be dereferenced through _glapi_Dispatch as
68 * not all libGL.so's will have all the uptodate entrypoints.
70 #define ATTRIB1(index,x) _glapi_Dispatch->VertexAttrib1fNV(index,x)
71 #define ATTRIB2(index,x,y) _glapi_Dispatch->VertexAttrib2fNV(index,x,y)
72 #define ATTRIB3(index,x,y,z) _glapi_Dispatch->VertexAttrib3fNV(index,x,y,z)
73 #define ATTRIB4(index,x,y,z,w) _glapi_Dispatch->VertexAttrib4fNV(index,x,y,z,w)
74 #define FOGCOORDF(x) _glapi_Dispatch->FogCoordfEXT(x)
75 #define SECONDARYCOLORF(a,b,c) _glapi_Dispatch->SecondaryColor3fEXT(a,b,c)
77 static void GLAPIENTRY
78 loopback_Color3b_f( GLbyte red
, GLbyte green
, GLbyte blue
)
80 COLORF( BYTE_TO_FLOAT(red
),
86 static void GLAPIENTRY
87 loopback_Color3d_f( GLdouble red
, GLdouble green
, GLdouble blue
)
89 COLORF( (GLfloat
) red
, (GLfloat
) green
, (GLfloat
) blue
, 1.0 );
92 static void GLAPIENTRY
93 loopback_Color3i_f( GLint red
, GLint green
, GLint blue
)
95 COLORF( INT_TO_FLOAT(red
), INT_TO_FLOAT(green
),
96 INT_TO_FLOAT(blue
), 1.0);
99 static void GLAPIENTRY
100 loopback_Color3s_f( GLshort red
, GLshort green
, GLshort blue
)
102 COLORF( SHORT_TO_FLOAT(red
), SHORT_TO_FLOAT(green
),
103 SHORT_TO_FLOAT(blue
), 1.0);
106 static void GLAPIENTRY
107 loopback_Color3ui_f( GLuint red
, GLuint green
, GLuint blue
)
109 COLORF( UINT_TO_FLOAT(red
), UINT_TO_FLOAT(green
),
110 UINT_TO_FLOAT(blue
), 1.0 );
113 static void GLAPIENTRY
114 loopback_Color3us_f( GLushort red
, GLushort green
, GLushort blue
)
116 COLORF( USHORT_TO_FLOAT(red
), USHORT_TO_FLOAT(green
),
117 USHORT_TO_FLOAT(blue
), 1.0 );
120 static void GLAPIENTRY
121 loopback_Color3ub_f( GLubyte red
, GLubyte green
, GLubyte blue
)
123 COLORF( UBYTE_TO_FLOAT(red
), UBYTE_TO_FLOAT(green
),
124 UBYTE_TO_FLOAT(blue
), 1.0 );
128 static void GLAPIENTRY
129 loopback_Color3bv_f( const GLbyte
*v
)
131 COLORF( BYTE_TO_FLOAT(v
[0]), BYTE_TO_FLOAT(v
[1]),
132 BYTE_TO_FLOAT(v
[2]), 1.0 );
135 static void GLAPIENTRY
136 loopback_Color3dv_f( const GLdouble
*v
)
138 COLORF( (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2], 1.0 );
141 static void GLAPIENTRY
142 loopback_Color3iv_f( const GLint
*v
)
144 COLORF( INT_TO_FLOAT(v
[0]), INT_TO_FLOAT(v
[1]),
145 INT_TO_FLOAT(v
[2]), INT_TO_FLOAT(v
[3]) );
148 static void GLAPIENTRY
149 loopback_Color3sv_f( const GLshort
*v
)
151 COLORF( SHORT_TO_FLOAT(v
[0]), SHORT_TO_FLOAT(v
[1]),
152 SHORT_TO_FLOAT(v
[2]), 1.0 );
155 static void GLAPIENTRY
156 loopback_Color3uiv_f( const GLuint
*v
)
158 COLORF( UINT_TO_FLOAT(v
[0]), UINT_TO_FLOAT(v
[1]),
159 UINT_TO_FLOAT(v
[2]), 1.0 );
162 static void GLAPIENTRY
163 loopback_Color3usv_f( const GLushort
*v
)
165 COLORF( USHORT_TO_FLOAT(v
[0]), USHORT_TO_FLOAT(v
[1]),
166 USHORT_TO_FLOAT(v
[2]), 1.0 );
169 static void GLAPIENTRY
170 loopback_Color3ubv_f( const GLubyte
*v
)
172 COLORF( UBYTE_TO_FLOAT(v
[0]), UBYTE_TO_FLOAT(v
[1]),
173 UBYTE_TO_FLOAT(v
[2]), 1.0 );
177 static void GLAPIENTRY
178 loopback_Color4b_f( GLbyte red
, GLbyte green
, GLbyte blue
,
181 COLORF( BYTE_TO_FLOAT(red
), BYTE_TO_FLOAT(green
),
182 BYTE_TO_FLOAT(blue
), BYTE_TO_FLOAT(alpha
) );
185 static void GLAPIENTRY
186 loopback_Color4d_f( GLdouble red
, GLdouble green
, GLdouble blue
,
189 COLORF( (GLfloat
) red
, (GLfloat
) green
, (GLfloat
) blue
, (GLfloat
) alpha
);
192 static void GLAPIENTRY
193 loopback_Color4i_f( GLint red
, GLint green
, GLint blue
, GLint alpha
)
195 COLORF( INT_TO_FLOAT(red
), INT_TO_FLOAT(green
),
196 INT_TO_FLOAT(blue
), INT_TO_FLOAT(alpha
) );
199 static void GLAPIENTRY
200 loopback_Color4s_f( GLshort red
, GLshort green
, GLshort blue
,
203 COLORF( SHORT_TO_FLOAT(red
), SHORT_TO_FLOAT(green
),
204 SHORT_TO_FLOAT(blue
), SHORT_TO_FLOAT(alpha
) );
207 static void GLAPIENTRY
208 loopback_Color4ui_f( GLuint red
, GLuint green
, GLuint blue
, GLuint alpha
)
210 COLORF( UINT_TO_FLOAT(red
), UINT_TO_FLOAT(green
),
211 UINT_TO_FLOAT(blue
), UINT_TO_FLOAT(alpha
) );
214 static void GLAPIENTRY
215 loopback_Color4us_f( GLushort red
, GLushort green
, GLushort blue
, GLushort alpha
)
217 COLORF( USHORT_TO_FLOAT(red
), USHORT_TO_FLOAT(green
),
218 USHORT_TO_FLOAT(blue
), USHORT_TO_FLOAT(alpha
) );
221 static void GLAPIENTRY
222 loopback_Color4ub_f( GLubyte red
, GLubyte green
, GLubyte blue
, GLubyte alpha
)
224 COLORF( UBYTE_TO_FLOAT(red
), UBYTE_TO_FLOAT(green
),
225 UBYTE_TO_FLOAT(blue
), UBYTE_TO_FLOAT(alpha
) );
229 static void GLAPIENTRY
230 loopback_Color4iv_f( const GLint
*v
)
232 COLORF( INT_TO_FLOAT(v
[0]), INT_TO_FLOAT(v
[1]),
233 INT_TO_FLOAT(v
[2]), INT_TO_FLOAT(v
[3]) );
237 static void GLAPIENTRY
238 loopback_Color4bv_f( const GLbyte
*v
)
240 COLORF( BYTE_TO_FLOAT(v
[0]), BYTE_TO_FLOAT(v
[1]),
241 BYTE_TO_FLOAT(v
[2]), BYTE_TO_FLOAT(v
[3]) );
244 static void GLAPIENTRY
245 loopback_Color4dv_f( const GLdouble
*v
)
247 COLORF( (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2], (GLfloat
) v
[3] );
251 static void GLAPIENTRY
252 loopback_Color4sv_f( const GLshort
*v
)
254 COLORF( SHORT_TO_FLOAT(v
[0]), SHORT_TO_FLOAT(v
[1]),
255 SHORT_TO_FLOAT(v
[2]), SHORT_TO_FLOAT(v
[3]) );
259 static void GLAPIENTRY
260 loopback_Color4uiv_f( const GLuint
*v
)
262 COLORF( UINT_TO_FLOAT(v
[0]), UINT_TO_FLOAT(v
[1]),
263 UINT_TO_FLOAT(v
[2]), UINT_TO_FLOAT(v
[3]) );
266 static void GLAPIENTRY
267 loopback_Color4usv_f( const GLushort
*v
)
269 COLORF( USHORT_TO_FLOAT(v
[0]), USHORT_TO_FLOAT(v
[1]),
270 USHORT_TO_FLOAT(v
[2]), USHORT_TO_FLOAT(v
[3]) );
273 static void GLAPIENTRY
274 loopback_Color4ubv_f( const GLubyte
*v
)
276 COLORF( UBYTE_TO_FLOAT(v
[0]), UBYTE_TO_FLOAT(v
[1]),
277 UBYTE_TO_FLOAT(v
[2]), UBYTE_TO_FLOAT(v
[3]) );
280 static void GLAPIENTRY
281 loopback_FogCoorddEXT( GLdouble d
)
283 FOGCOORDF( (GLfloat
) d
);
286 static void GLAPIENTRY
287 loopback_FogCoorddvEXT( const GLdouble
*v
)
289 FOGCOORDF( (GLfloat
) *v
);
293 static void GLAPIENTRY
294 loopback_Indexd( GLdouble c
)
296 INDEX( (GLfloat
) c
);
299 static void GLAPIENTRY
300 loopback_Indexi( GLint c
)
302 INDEX( (GLfloat
) c
);
305 static void GLAPIENTRY
306 loopback_Indexs( GLshort c
)
308 INDEX( (GLfloat
) c
);
311 static void GLAPIENTRY
312 loopback_Indexub( GLubyte c
)
314 INDEX( (GLfloat
) c
);
317 static void GLAPIENTRY
318 loopback_Indexdv( const GLdouble
*c
)
320 INDEX( (GLfloat
) *c
);
323 static void GLAPIENTRY
324 loopback_Indexiv( const GLint
*c
)
326 INDEX( (GLfloat
) *c
);
329 static void GLAPIENTRY
330 loopback_Indexsv( const GLshort
*c
)
332 INDEX( (GLfloat
) *c
);
335 static void GLAPIENTRY
336 loopback_Indexubv( const GLubyte
*c
)
338 INDEX( (GLfloat
) *c
);
341 static void GLAPIENTRY
342 loopback_Normal3b( GLbyte nx
, GLbyte ny
, GLbyte nz
)
344 NORMAL( BYTE_TO_FLOAT(nx
), BYTE_TO_FLOAT(ny
), BYTE_TO_FLOAT(nz
) );
347 static void GLAPIENTRY
348 loopback_Normal3d( GLdouble nx
, GLdouble ny
, GLdouble nz
)
350 NORMAL((GLfloat
) nx
, (GLfloat
) ny
, (GLfloat
) nz
);
353 static void GLAPIENTRY
354 loopback_Normal3i( GLint nx
, GLint ny
, GLint nz
)
356 NORMAL( INT_TO_FLOAT(nx
), INT_TO_FLOAT(ny
), INT_TO_FLOAT(nz
) );
359 static void GLAPIENTRY
360 loopback_Normal3s( GLshort nx
, GLshort ny
, GLshort nz
)
362 NORMAL( SHORT_TO_FLOAT(nx
), SHORT_TO_FLOAT(ny
), SHORT_TO_FLOAT(nz
) );
365 static void GLAPIENTRY
366 loopback_Normal3bv( const GLbyte
*v
)
368 NORMAL( BYTE_TO_FLOAT(v
[0]), BYTE_TO_FLOAT(v
[1]), BYTE_TO_FLOAT(v
[2]) );
371 static void GLAPIENTRY
372 loopback_Normal3dv( const GLdouble
*v
)
374 NORMAL( (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2] );
377 static void GLAPIENTRY
378 loopback_Normal3iv( const GLint
*v
)
380 NORMAL( INT_TO_FLOAT(v
[0]), INT_TO_FLOAT(v
[1]), INT_TO_FLOAT(v
[2]) );
383 static void GLAPIENTRY
384 loopback_Normal3sv( const GLshort
*v
)
386 NORMAL( SHORT_TO_FLOAT(v
[0]), SHORT_TO_FLOAT(v
[1]), SHORT_TO_FLOAT(v
[2]) );
389 static void GLAPIENTRY
390 loopback_TexCoord1d( GLdouble s
)
392 TEXCOORD1((GLfloat
) s
);
395 static void GLAPIENTRY
396 loopback_TexCoord1i( GLint s
)
398 TEXCOORD1((GLfloat
) s
);
401 static void GLAPIENTRY
402 loopback_TexCoord1s( GLshort s
)
404 TEXCOORD1((GLfloat
) s
);
407 static void GLAPIENTRY
408 loopback_TexCoord2d( GLdouble s
, GLdouble t
)
410 TEXCOORD2((GLfloat
) s
,(GLfloat
) t
);
413 static void GLAPIENTRY
414 loopback_TexCoord2s( GLshort s
, GLshort t
)
416 TEXCOORD2((GLfloat
) s
,(GLfloat
) t
);
419 static void GLAPIENTRY
420 loopback_TexCoord2i( GLint s
, GLint t
)
422 TEXCOORD2((GLfloat
) s
,(GLfloat
) t
);
425 static void GLAPIENTRY
426 loopback_TexCoord3d( GLdouble s
, GLdouble t
, GLdouble r
)
428 TEXCOORD3((GLfloat
) s
,(GLfloat
) t
,(GLfloat
) r
);
431 static void GLAPIENTRY
432 loopback_TexCoord3i( GLint s
, GLint t
, GLint r
)
434 TEXCOORD3((GLfloat
) s
,(GLfloat
) t
,(GLfloat
) r
);
437 static void GLAPIENTRY
438 loopback_TexCoord3s( GLshort s
, GLshort t
, GLshort r
)
440 TEXCOORD3((GLfloat
) s
,(GLfloat
) t
,(GLfloat
) r
);
443 static void GLAPIENTRY
444 loopback_TexCoord4d( GLdouble s
, GLdouble t
, GLdouble r
, GLdouble q
)
446 TEXCOORD4((GLfloat
) s
,(GLfloat
) t
,(GLfloat
) r
,(GLfloat
) q
);
449 static void GLAPIENTRY
450 loopback_TexCoord4i( GLint s
, GLint t
, GLint r
, GLint q
)
452 TEXCOORD4((GLfloat
) s
,(GLfloat
) t
,(GLfloat
) r
,(GLfloat
) q
);
455 static void GLAPIENTRY
456 loopback_TexCoord4s( GLshort s
, GLshort t
, GLshort r
, GLshort q
)
458 TEXCOORD4((GLfloat
) s
,(GLfloat
) t
,(GLfloat
) r
,(GLfloat
) q
);
461 static void GLAPIENTRY
462 loopback_TexCoord1dv( const GLdouble
*v
)
464 TEXCOORD1((GLfloat
) v
[0]);
467 static void GLAPIENTRY
468 loopback_TexCoord1iv( const GLint
*v
)
470 TEXCOORD1((GLfloat
) v
[0]);
473 static void GLAPIENTRY
474 loopback_TexCoord1sv( const GLshort
*v
)
476 TEXCOORD1((GLfloat
) v
[0]);
479 static void GLAPIENTRY
480 loopback_TexCoord2dv( const GLdouble
*v
)
482 TEXCOORD2((GLfloat
) v
[0],(GLfloat
) v
[1]);
485 static void GLAPIENTRY
486 loopback_TexCoord2iv( const GLint
*v
)
488 TEXCOORD2((GLfloat
) v
[0],(GLfloat
) v
[1]);
491 static void GLAPIENTRY
492 loopback_TexCoord2sv( const GLshort
*v
)
494 TEXCOORD2((GLfloat
) v
[0],(GLfloat
) v
[1]);
497 static void GLAPIENTRY
498 loopback_TexCoord3dv( const GLdouble
*v
)
500 TEXCOORD2((GLfloat
) v
[0],(GLfloat
) v
[1]);
503 static void GLAPIENTRY
504 loopback_TexCoord3iv( const GLint
*v
)
506 TEXCOORD3((GLfloat
) v
[0],(GLfloat
) v
[1],(GLfloat
) v
[2]);
509 static void GLAPIENTRY
510 loopback_TexCoord3sv( const GLshort
*v
)
512 TEXCOORD3((GLfloat
) v
[0],(GLfloat
) v
[1],(GLfloat
) v
[2]);
515 static void GLAPIENTRY
516 loopback_TexCoord4dv( const GLdouble
*v
)
518 TEXCOORD4((GLfloat
) v
[0],(GLfloat
) v
[1],(GLfloat
) v
[2],(GLfloat
) v
[3]);
521 static void GLAPIENTRY
522 loopback_TexCoord4iv( const GLint
*v
)
524 TEXCOORD4((GLfloat
) v
[0],(GLfloat
) v
[1],(GLfloat
) v
[2],(GLfloat
) v
[3]);
527 static void GLAPIENTRY
528 loopback_TexCoord4sv( const GLshort
*v
)
530 TEXCOORD4((GLfloat
) v
[0],(GLfloat
) v
[1],(GLfloat
) v
[2],(GLfloat
) v
[3]);
533 static void GLAPIENTRY
534 loopback_Vertex2d( GLdouble x
, GLdouble y
)
536 VERTEX2( (GLfloat
) x
, (GLfloat
) y
);
539 static void GLAPIENTRY
540 loopback_Vertex2i( GLint x
, GLint y
)
542 VERTEX2( (GLfloat
) x
, (GLfloat
) y
);
545 static void GLAPIENTRY
546 loopback_Vertex2s( GLshort x
, GLshort y
)
548 VERTEX2( (GLfloat
) x
, (GLfloat
) y
);
551 static void GLAPIENTRY
552 loopback_Vertex3d( GLdouble x
, GLdouble y
, GLdouble z
)
554 VERTEX3( (GLfloat
) x
, (GLfloat
) y
, (GLfloat
) z
);
557 static void GLAPIENTRY
558 loopback_Vertex3i( GLint x
, GLint y
, GLint z
)
560 VERTEX3( (GLfloat
) x
, (GLfloat
) y
, (GLfloat
) z
);
563 static void GLAPIENTRY
564 loopback_Vertex3s( GLshort x
, GLshort y
, GLshort z
)
566 VERTEX3( (GLfloat
) x
, (GLfloat
) y
, (GLfloat
) z
);
569 static void GLAPIENTRY
570 loopback_Vertex4d( GLdouble x
, GLdouble y
, GLdouble z
, GLdouble w
)
572 VERTEX4( (GLfloat
) x
, (GLfloat
) y
, (GLfloat
) z
, (GLfloat
) w
);
575 static void GLAPIENTRY
576 loopback_Vertex4i( GLint x
, GLint y
, GLint z
, GLint w
)
578 VERTEX4( (GLfloat
) x
, (GLfloat
) y
, (GLfloat
) z
, (GLfloat
) w
);
581 static void GLAPIENTRY
582 loopback_Vertex4s( GLshort x
, GLshort y
, GLshort z
, GLshort w
)
584 VERTEX4( (GLfloat
) x
, (GLfloat
) y
, (GLfloat
) z
, (GLfloat
) w
);
587 static void GLAPIENTRY
588 loopback_Vertex2dv( const GLdouble
*v
)
590 VERTEX2( (GLfloat
) v
[0], (GLfloat
) v
[1] );
593 static void GLAPIENTRY
594 loopback_Vertex2iv( const GLint
*v
)
596 VERTEX2( (GLfloat
) v
[0], (GLfloat
) v
[1] );
599 static void GLAPIENTRY
600 loopback_Vertex2sv( const GLshort
*v
)
602 VERTEX2( (GLfloat
) v
[0], (GLfloat
) v
[1] );
605 static void GLAPIENTRY
606 loopback_Vertex3dv( const GLdouble
*v
)
608 VERTEX3( (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2] );
611 static void GLAPIENTRY
612 loopback_Vertex3iv( const GLint
*v
)
614 VERTEX3( (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2] );
617 static void GLAPIENTRY
618 loopback_Vertex3sv( const GLshort
*v
)
620 VERTEX3( (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2] );
623 static void GLAPIENTRY
624 loopback_Vertex4dv( const GLdouble
*v
)
626 VERTEX4( (GLfloat
) v
[0], (GLfloat
) v
[1],
627 (GLfloat
) v
[2], (GLfloat
) v
[3] );
630 static void GLAPIENTRY
631 loopback_Vertex4iv( const GLint
*v
)
633 VERTEX4( (GLfloat
) v
[0], (GLfloat
) v
[1],
634 (GLfloat
) v
[2], (GLfloat
) v
[3] );
637 static void GLAPIENTRY
638 loopback_Vertex4sv( const GLshort
*v
)
640 VERTEX4( (GLfloat
) v
[0], (GLfloat
) v
[1],
641 (GLfloat
) v
[2], (GLfloat
) v
[3] );
644 static void GLAPIENTRY
645 loopback_MultiTexCoord1dARB(GLenum target
, GLdouble s
)
647 MULTI_TEXCOORD1( target
, (GLfloat
) s
);
650 static void GLAPIENTRY
651 loopback_MultiTexCoord1dvARB(GLenum target
, const GLdouble
*v
)
653 MULTI_TEXCOORD1( target
, (GLfloat
) v
[0] );
656 static void GLAPIENTRY
657 loopback_MultiTexCoord1iARB(GLenum target
, GLint s
)
659 MULTI_TEXCOORD1( target
, (GLfloat
) s
);
662 static void GLAPIENTRY
663 loopback_MultiTexCoord1ivARB(GLenum target
, const GLint
*v
)
665 MULTI_TEXCOORD1( target
, (GLfloat
) v
[0] );
668 static void GLAPIENTRY
669 loopback_MultiTexCoord1sARB(GLenum target
, GLshort s
)
671 MULTI_TEXCOORD1( target
, (GLfloat
) s
);
674 static void GLAPIENTRY
675 loopback_MultiTexCoord1svARB(GLenum target
, const GLshort
*v
)
677 MULTI_TEXCOORD1( target
, (GLfloat
) v
[0] );
680 static void GLAPIENTRY
681 loopback_MultiTexCoord2dARB(GLenum target
, GLdouble s
, GLdouble t
)
683 MULTI_TEXCOORD2( target
, (GLfloat
) s
, (GLfloat
) t
);
686 static void GLAPIENTRY
687 loopback_MultiTexCoord2dvARB(GLenum target
, const GLdouble
*v
)
689 MULTI_TEXCOORD2( target
, (GLfloat
) v
[0], (GLfloat
) v
[1] );
692 static void GLAPIENTRY
693 loopback_MultiTexCoord2iARB(GLenum target
, GLint s
, GLint t
)
695 MULTI_TEXCOORD2( target
, (GLfloat
) s
, (GLfloat
) t
);
698 static void GLAPIENTRY
699 loopback_MultiTexCoord2ivARB(GLenum target
, const GLint
*v
)
701 MULTI_TEXCOORD2( target
, (GLfloat
) v
[0], (GLfloat
) v
[1] );
704 static void GLAPIENTRY
705 loopback_MultiTexCoord2sARB(GLenum target
, GLshort s
, GLshort t
)
707 MULTI_TEXCOORD2( target
, (GLfloat
) s
, (GLfloat
) t
);
710 static void GLAPIENTRY
711 loopback_MultiTexCoord2svARB(GLenum target
, const GLshort
*v
)
713 MULTI_TEXCOORD2( target
, (GLfloat
) v
[0], (GLfloat
) v
[1] );
716 static void GLAPIENTRY
717 loopback_MultiTexCoord3dARB(GLenum target
, GLdouble s
, GLdouble t
, GLdouble r
)
719 MULTI_TEXCOORD3( target
, (GLfloat
) s
, (GLfloat
) t
, (GLfloat
) r
);
722 static void GLAPIENTRY
723 loopback_MultiTexCoord3dvARB(GLenum target
, const GLdouble
*v
)
725 MULTI_TEXCOORD3( target
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2] );
728 static void GLAPIENTRY
729 loopback_MultiTexCoord3iARB(GLenum target
, GLint s
, GLint t
, GLint r
)
731 MULTI_TEXCOORD3( target
, (GLfloat
) s
, (GLfloat
) t
, (GLfloat
) r
);
734 static void GLAPIENTRY
735 loopback_MultiTexCoord3ivARB(GLenum target
, const GLint
*v
)
737 MULTI_TEXCOORD3( target
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2] );
740 static void GLAPIENTRY
741 loopback_MultiTexCoord3sARB(GLenum target
, GLshort s
, GLshort t
, GLshort r
)
743 MULTI_TEXCOORD3( target
, (GLfloat
) s
, (GLfloat
) t
, (GLfloat
) r
);
746 static void GLAPIENTRY
747 loopback_MultiTexCoord3svARB(GLenum target
, const GLshort
*v
)
749 MULTI_TEXCOORD3( target
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2] );
752 static void GLAPIENTRY
753 loopback_MultiTexCoord4dARB(GLenum target
, GLdouble s
, GLdouble t
, GLdouble r
, GLdouble q
)
755 MULTI_TEXCOORD4( target
, (GLfloat
) s
, (GLfloat
) t
,
756 (GLfloat
) r
, (GLfloat
) q
);
759 static void GLAPIENTRY
760 loopback_MultiTexCoord4dvARB(GLenum target
, const GLdouble
*v
)
762 MULTI_TEXCOORD4( target
, (GLfloat
) v
[0], (GLfloat
) v
[1],
763 (GLfloat
) v
[2], (GLfloat
) v
[3] );
766 static void GLAPIENTRY
767 loopback_MultiTexCoord4iARB(GLenum target
, GLint s
, GLint t
, GLint r
, GLint q
)
769 MULTI_TEXCOORD4( target
, (GLfloat
) s
, (GLfloat
) t
,
770 (GLfloat
) r
, (GLfloat
) q
);
773 static void GLAPIENTRY
774 loopback_MultiTexCoord4ivARB(GLenum target
, const GLint
*v
)
776 MULTI_TEXCOORD4( target
, (GLfloat
) v
[0], (GLfloat
) v
[1],
777 (GLfloat
) v
[2], (GLfloat
) v
[3] );
780 static void GLAPIENTRY
781 loopback_MultiTexCoord4sARB(GLenum target
, GLshort s
, GLshort t
, GLshort r
, GLshort q
)
783 MULTI_TEXCOORD4( target
, (GLfloat
) s
, (GLfloat
) t
,
784 (GLfloat
) r
, (GLfloat
) q
);
787 static void GLAPIENTRY
788 loopback_MultiTexCoord4svARB(GLenum target
, const GLshort
*v
)
790 MULTI_TEXCOORD4( target
, (GLfloat
) v
[0], (GLfloat
) v
[1],
791 (GLfloat
) v
[2], (GLfloat
) v
[3] );
794 static void GLAPIENTRY
795 loopback_EvalCoord2dv( const GLdouble
*u
)
797 EVALCOORD2( (GLfloat
) u
[0], (GLfloat
) u
[1] );
800 static void GLAPIENTRY
801 loopback_EvalCoord2fv( const GLfloat
*u
)
803 EVALCOORD2( u
[0], u
[1] );
806 static void GLAPIENTRY
807 loopback_EvalCoord2d( GLdouble u
, GLdouble v
)
809 EVALCOORD2( (GLfloat
) u
, (GLfloat
) v
);
812 static void GLAPIENTRY
813 loopback_EvalCoord1dv( const GLdouble
*u
)
815 EVALCOORD1( (GLfloat
) *u
);
818 static void GLAPIENTRY
819 loopback_EvalCoord1fv( const GLfloat
*u
)
821 EVALCOORD1( (GLfloat
) *u
);
824 static void GLAPIENTRY
825 loopback_EvalCoord1d( GLdouble u
)
827 EVALCOORD1( (GLfloat
) u
);
830 static void GLAPIENTRY
831 loopback_Materialf( GLenum face
, GLenum pname
, GLfloat param
)
835 MATERIALFV( face
, pname
, fparam
);
838 static void GLAPIENTRY
839 loopback_Materiali(GLenum face
, GLenum pname
, GLint param
)
841 GLfloat p
= (GLfloat
) param
;
842 MATERIALFV(face
, pname
, &p
);
845 static void GLAPIENTRY
846 loopback_Materialiv(GLenum face
, GLenum pname
, const GLint
*params
)
854 case GL_AMBIENT_AND_DIFFUSE
:
855 fparam
[0] = INT_TO_FLOAT( params
[0] );
856 fparam
[1] = INT_TO_FLOAT( params
[1] );
857 fparam
[2] = INT_TO_FLOAT( params
[2] );
858 fparam
[3] = INT_TO_FLOAT( params
[3] );
861 fparam
[0] = (GLfloat
) params
[0];
863 case GL_COLOR_INDEXES
:
864 fparam
[0] = (GLfloat
) params
[0];
865 fparam
[1] = (GLfloat
) params
[1];
866 fparam
[2] = (GLfloat
) params
[2];
871 MATERIALFV(face
, pname
, fparam
);
875 static void GLAPIENTRY
876 loopback_Rectd(GLdouble x1
, GLdouble y1
, GLdouble x2
, GLdouble y2
)
878 RECTF((GLfloat
) x1
, (GLfloat
) y1
, (GLfloat
) x2
, (GLfloat
) y2
);
881 static void GLAPIENTRY
882 loopback_Rectdv(const GLdouble
*v1
, const GLdouble
*v2
)
884 RECTF((GLfloat
) v1
[0], (GLfloat
) v1
[1], (GLfloat
) v2
[0], (GLfloat
) v2
[1]);
887 static void GLAPIENTRY
888 loopback_Rectfv(const GLfloat
*v1
, const GLfloat
*v2
)
890 RECTF(v1
[0], v1
[1], v2
[0], v2
[1]);
893 static void GLAPIENTRY
894 loopback_Recti(GLint x1
, GLint y1
, GLint x2
, GLint y2
)
896 RECTF((GLfloat
) x1
, (GLfloat
) y1
, (GLfloat
) x2
, (GLfloat
) y2
);
899 static void GLAPIENTRY
900 loopback_Rectiv(const GLint
*v1
, const GLint
*v2
)
902 RECTF((GLfloat
) v1
[0], (GLfloat
) v1
[1], (GLfloat
) v2
[0], (GLfloat
) v2
[1]);
905 static void GLAPIENTRY
906 loopback_Rects(GLshort x1
, GLshort y1
, GLshort x2
, GLshort y2
)
908 RECTF((GLfloat
) x1
, (GLfloat
) y1
, (GLfloat
) x2
, (GLfloat
) y2
);
911 static void GLAPIENTRY
912 loopback_Rectsv(const GLshort
*v1
, const GLshort
*v2
)
914 RECTF((GLfloat
) v1
[0], (GLfloat
) v1
[1], (GLfloat
) v2
[0], (GLfloat
) v2
[1]);
917 static void GLAPIENTRY
918 loopback_SecondaryColor3bEXT_f( GLbyte red
, GLbyte green
, GLbyte blue
)
920 SECONDARYCOLORF( BYTE_TO_FLOAT(red
),
921 BYTE_TO_FLOAT(green
),
922 BYTE_TO_FLOAT(blue
) );
925 static void GLAPIENTRY
926 loopback_SecondaryColor3dEXT_f( GLdouble red
, GLdouble green
, GLdouble blue
)
928 SECONDARYCOLORF( (GLfloat
) red
, (GLfloat
) green
, (GLfloat
) blue
);
931 static void GLAPIENTRY
932 loopback_SecondaryColor3iEXT_f( GLint red
, GLint green
, GLint blue
)
934 SECONDARYCOLORF( INT_TO_FLOAT(red
),
939 static void GLAPIENTRY
940 loopback_SecondaryColor3sEXT_f( GLshort red
, GLshort green
, GLshort blue
)
942 SECONDARYCOLORF(SHORT_TO_FLOAT(red
),
943 SHORT_TO_FLOAT(green
),
944 SHORT_TO_FLOAT(blue
));
947 static void GLAPIENTRY
948 loopback_SecondaryColor3uiEXT_f( GLuint red
, GLuint green
, GLuint blue
)
950 SECONDARYCOLORF(UINT_TO_FLOAT(red
),
951 UINT_TO_FLOAT(green
),
952 UINT_TO_FLOAT(blue
));
955 static void GLAPIENTRY
956 loopback_SecondaryColor3usEXT_f( GLushort red
, GLushort green
, GLushort blue
)
958 SECONDARYCOLORF(USHORT_TO_FLOAT(red
),
959 USHORT_TO_FLOAT(green
),
960 USHORT_TO_FLOAT(blue
));
963 static void GLAPIENTRY
964 loopback_SecondaryColor3ubEXT_f( GLubyte red
, GLubyte green
, GLubyte blue
)
966 SECONDARYCOLORF(UBYTE_TO_FLOAT(red
),
967 UBYTE_TO_FLOAT(green
),
968 UBYTE_TO_FLOAT(blue
));
971 static void GLAPIENTRY
972 loopback_SecondaryColor3bvEXT_f( const GLbyte
*v
)
974 SECONDARYCOLORF(BYTE_TO_FLOAT(v
[0]),
976 BYTE_TO_FLOAT(v
[2]));
979 static void GLAPIENTRY
980 loopback_SecondaryColor3dvEXT_f( const GLdouble
*v
)
982 SECONDARYCOLORF( (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2] );
984 static void GLAPIENTRY
985 loopback_SecondaryColor3ivEXT_f( const GLint
*v
)
987 SECONDARYCOLORF(INT_TO_FLOAT(v
[0]),
992 static void GLAPIENTRY
993 loopback_SecondaryColor3svEXT_f( const GLshort
*v
)
995 SECONDARYCOLORF(SHORT_TO_FLOAT(v
[0]),
996 SHORT_TO_FLOAT(v
[1]),
997 SHORT_TO_FLOAT(v
[2]));
1000 static void GLAPIENTRY
1001 loopback_SecondaryColor3uivEXT_f( const GLuint
*v
)
1003 SECONDARYCOLORF(UINT_TO_FLOAT(v
[0]),
1004 UINT_TO_FLOAT(v
[1]),
1005 UINT_TO_FLOAT(v
[2]));
1008 static void GLAPIENTRY
1009 loopback_SecondaryColor3usvEXT_f( const GLushort
*v
)
1011 SECONDARYCOLORF(USHORT_TO_FLOAT(v
[0]),
1012 USHORT_TO_FLOAT(v
[1]),
1013 USHORT_TO_FLOAT(v
[2]));
1016 static void GLAPIENTRY
1017 loopback_SecondaryColor3ubvEXT_f( const GLubyte
*v
)
1019 SECONDARYCOLORF(UBYTE_TO_FLOAT(v
[0]),
1020 UBYTE_TO_FLOAT(v
[1]),
1021 UBYTE_TO_FLOAT(v
[2]));
1026 * GL_NV_vertex_program
1029 static void GLAPIENTRY
1030 loopback_VertexAttrib1sNV(GLuint index
, GLshort x
)
1032 ATTRIB1(index
, (GLfloat
) x
);
1035 static void GLAPIENTRY
1036 loopback_VertexAttrib1fNV(GLuint index
, GLfloat x
)
1041 static void GLAPIENTRY
1042 loopback_VertexAttrib1dNV(GLuint index
, GLdouble x
)
1044 ATTRIB1(index
, (GLfloat
) x
);
1047 static void GLAPIENTRY
1048 loopback_VertexAttrib2sNV(GLuint index
, GLshort x
, GLshort y
)
1050 ATTRIB2(index
, (GLfloat
) x
, y
);
1053 static void GLAPIENTRY
1054 loopback_VertexAttrib2fNV(GLuint index
, GLfloat x
, GLfloat y
)
1056 ATTRIB2(index
, (GLfloat
) x
, y
);
1059 static void GLAPIENTRY
1060 loopback_VertexAttrib2dNV(GLuint index
, GLdouble x
, GLdouble y
)
1062 ATTRIB2(index
, (GLfloat
) x
, (GLfloat
) y
);
1065 static void GLAPIENTRY
1066 loopback_VertexAttrib3sNV(GLuint index
, GLshort x
, GLshort y
, GLshort z
)
1068 ATTRIB3(index
, (GLfloat
) x
, y
, z
);
1071 static void GLAPIENTRY
1072 loopback_VertexAttrib3fNV(GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
)
1074 ATTRIB3(index
, x
, y
, z
);
1077 static void GLAPIENTRY
1078 loopback_VertexAttrib3dNV(GLuint index
, GLdouble x
, GLdouble y
, GLdouble z
)
1080 ATTRIB4(index
, (GLfloat
) x
, (GLfloat
) y
, (GLfloat
) z
, 1.0F
);
1083 static void GLAPIENTRY
1084 loopback_VertexAttrib4sNV(GLuint index
, GLshort x
, GLshort y
, GLshort z
, GLshort w
)
1086 ATTRIB4(index
, (GLfloat
) x
, (GLfloat
) y
, (GLfloat
) z
, (GLfloat
) w
);
1089 static void GLAPIENTRY
1090 loopback_VertexAttrib4dNV(GLuint index
, GLdouble x
, GLdouble y
, GLdouble z
, GLdouble w
)
1092 ATTRIB4(index
, (GLfloat
) x
, (GLfloat
) y
, (GLfloat
) z
, (GLfloat
) w
);
1095 static void GLAPIENTRY
1096 loopback_VertexAttrib4ubNV(GLuint index
, GLubyte x
, GLubyte y
, GLubyte z
, GLubyte w
)
1098 ATTRIB4(index
, UBYTE_TO_FLOAT(x
), UBYTE_TO_FLOAT(y
),
1099 UBYTE_TO_FLOAT(z
), UBYTE_TO_FLOAT(w
));
1102 static void GLAPIENTRY
1103 loopback_VertexAttrib1svNV(GLuint index
, const GLshort
*v
)
1105 ATTRIB1(index
, (GLfloat
) v
[0]);
1108 static void GLAPIENTRY
1109 loopback_VertexAttrib1fvNV(GLuint index
, const GLfloat
*v
)
1111 ATTRIB1(index
, v
[0]);
1114 static void GLAPIENTRY
1115 loopback_VertexAttrib1dvNV(GLuint index
, const GLdouble
*v
)
1117 ATTRIB1(index
, (GLfloat
) v
[0]);
1120 static void GLAPIENTRY
1121 loopback_VertexAttrib2svNV(GLuint index
, const GLshort
*v
)
1123 ATTRIB2(index
, (GLfloat
) v
[0], (GLfloat
) v
[1]);
1126 static void GLAPIENTRY
1127 loopback_VertexAttrib2fvNV(GLuint index
, const GLfloat
*v
)
1129 ATTRIB2(index
, v
[0], v
[1]);
1132 static void GLAPIENTRY
1133 loopback_VertexAttrib2dvNV(GLuint index
, const GLdouble
*v
)
1135 ATTRIB2(index
, (GLfloat
) v
[0], (GLfloat
) v
[1]);
1138 static void GLAPIENTRY
1139 loopback_VertexAttrib3svNV(GLuint index
, const GLshort
*v
)
1141 ATTRIB2(index
, (GLfloat
) v
[0], (GLfloat
) v
[1]);
1144 static void GLAPIENTRY
1145 loopback_VertexAttrib3fvNV(GLuint index
, const GLfloat
*v
)
1147 ATTRIB3(index
, v
[0], v
[1], v
[2]);
1150 static void GLAPIENTRY
1151 loopback_VertexAttrib3dvNV(GLuint index
, const GLdouble
*v
)
1153 ATTRIB3(index
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2]);
1156 static void GLAPIENTRY
1157 loopback_VertexAttrib4svNV(GLuint index
, const GLshort
*v
)
1159 ATTRIB4(index
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2],
1163 static void GLAPIENTRY
1164 loopback_VertexAttrib4fvNV(GLuint index
, const GLfloat
*v
)
1166 ATTRIB4(index
, v
[0], v
[1], v
[2], v
[3]);
1169 static void GLAPIENTRY
1170 loopback_VertexAttrib4dvNV(GLuint index
, const GLdouble
*v
)
1172 ATTRIB4(index
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2], (GLfloat
) v
[3]);
1175 static void GLAPIENTRY
1176 loopback_VertexAttrib4ubvNV(GLuint index
, const GLubyte
*v
)
1178 ATTRIB4(index
, UBYTE_TO_FLOAT(v
[0]), UBYTE_TO_FLOAT(v
[1]),
1179 UBYTE_TO_FLOAT(v
[2]), UBYTE_TO_FLOAT(v
[3]));
1183 static void GLAPIENTRY
1184 loopback_VertexAttribs1svNV(GLuint index
, GLsizei n
, const GLshort
*v
)
1187 for (i
= n
- 1; i
>= 0; i
--)
1188 loopback_VertexAttrib1svNV(index
+ i
, v
+ i
);
1191 static void GLAPIENTRY
1192 loopback_VertexAttribs1fvNV(GLuint index
, GLsizei n
, const GLfloat
*v
)
1195 for (i
= n
- 1; i
>= 0; i
--)
1196 loopback_VertexAttrib1fvNV(index
+ i
, v
+ i
);
1199 static void GLAPIENTRY
1200 loopback_VertexAttribs1dvNV(GLuint index
, GLsizei n
, const GLdouble
*v
)
1203 for (i
= n
- 1; i
>= 0; i
--)
1204 loopback_VertexAttrib1dvNV(index
+ i
, v
+ i
);
1207 static void GLAPIENTRY
1208 loopback_VertexAttribs2svNV(GLuint index
, GLsizei n
, const GLshort
*v
)
1211 for (i
= n
- 1; i
>= 0; i
--)
1212 loopback_VertexAttrib2svNV(index
+ i
, v
+ 2 * i
);
1215 static void GLAPIENTRY
1216 loopback_VertexAttribs2fvNV(GLuint index
, GLsizei n
, const GLfloat
*v
)
1219 for (i
= n
- 1; i
>= 0; i
--)
1220 loopback_VertexAttrib2fvNV(index
+ i
, v
+ 2 * i
);
1223 static void GLAPIENTRY
1224 loopback_VertexAttribs2dvNV(GLuint index
, GLsizei n
, const GLdouble
*v
)
1227 for (i
= n
- 1; i
>= 0; i
--)
1228 loopback_VertexAttrib2dvNV(index
+ i
, v
+ 2 * i
);
1231 static void GLAPIENTRY
1232 loopback_VertexAttribs3svNV(GLuint index
, GLsizei n
, const GLshort
*v
)
1235 for (i
= n
- 1; i
>= 0; i
--)
1236 loopback_VertexAttrib3svNV(index
+ i
, v
+ 3 * i
);
1239 static void GLAPIENTRY
1240 loopback_VertexAttribs3fvNV(GLuint index
, GLsizei n
, const GLfloat
*v
)
1243 for (i
= n
- 1; i
>= 0; i
--)
1244 loopback_VertexAttrib3fvNV(index
+ i
, v
+ 3 * i
);
1247 static void GLAPIENTRY
1248 loopback_VertexAttribs3dvNV(GLuint index
, GLsizei n
, const GLdouble
*v
)
1251 for (i
= n
- 1; i
>= 0; i
--)
1252 loopback_VertexAttrib3dvNV(index
+ i
, v
+ 3 * i
);
1255 static void GLAPIENTRY
1256 loopback_VertexAttribs4svNV(GLuint index
, GLsizei n
, const GLshort
*v
)
1259 for (i
= n
- 1; i
>= 0; i
--)
1260 loopback_VertexAttrib4svNV(index
+ i
, v
+ 4 * i
);
1263 static void GLAPIENTRY
1264 loopback_VertexAttribs4fvNV(GLuint index
, GLsizei n
, const GLfloat
*v
)
1267 for (i
= n
- 1; i
>= 0; i
--)
1268 loopback_VertexAttrib4fvNV(index
+ i
, v
+ 4 * i
);
1271 static void GLAPIENTRY
1272 loopback_VertexAttribs4dvNV(GLuint index
, GLsizei n
, const GLdouble
*v
)
1275 for (i
= n
- 1; i
>= 0; i
--)
1276 loopback_VertexAttrib4dvNV(index
+ i
, v
+ 4 * i
);
1279 static void GLAPIENTRY
1280 loopback_VertexAttribs4ubvNV(GLuint index
, GLsizei n
, const GLubyte
*v
)
1283 for (i
= n
- 1; i
>= 0; i
--)
1284 loopback_VertexAttrib4ubvNV(index
+ i
, v
+ 4 * i
);
1289 * GL_ARB_vertex_program
1292 static void GLAPIENTRY
1293 loopback_VertexAttrib4bvARB(GLuint index
, const GLbyte
* v
)
1295 ATTRIB4(index
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2], (GLfloat
) v
[3]);
1298 static void GLAPIENTRY
1299 loopback_VertexAttrib4ivARB(GLuint index
, const GLint
* v
)
1301 ATTRIB4(index
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2], (GLfloat
) v
[3]);
1304 static void GLAPIENTRY
1305 loopback_VertexAttrib4ubvARB(GLuint index
, const GLubyte
* v
)
1307 ATTRIB4(index
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2], (GLfloat
) v
[3]);
1310 static void GLAPIENTRY
1311 loopback_VertexAttrib4usvARB(GLuint index
, const GLushort
* v
)
1313 ATTRIB4(index
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2], (GLfloat
) v
[3]);
1316 static void GLAPIENTRY
1317 loopback_VertexAttrib4uivARB(GLuint index
, const GLuint
* v
)
1319 ATTRIB4(index
, (GLfloat
) v
[0], (GLfloat
) v
[1], (GLfloat
) v
[2], (GLfloat
) v
[3]);
1322 static void GLAPIENTRY
1323 loopback_VertexAttrib4NbvARB(GLuint index
, const GLbyte
* v
)
1325 ATTRIB4(index
, BYTE_TO_FLOAT(v
[0]), BYTE_TO_FLOAT(v
[1]),
1326 BYTE_TO_FLOAT(v
[2]), BYTE_TO_FLOAT(v
[3]));
1329 static void GLAPIENTRY
1330 loopback_VertexAttrib4NsvARB(GLuint index
, const GLshort
* v
)
1332 ATTRIB4(index
, SHORT_TO_FLOAT(v
[0]), SHORT_TO_FLOAT(v
[1]),
1333 SHORT_TO_FLOAT(v
[2]), SHORT_TO_FLOAT(v
[3]));
1336 static void GLAPIENTRY
1337 loopback_VertexAttrib4NivARB(GLuint index
, const GLint
* v
)
1339 ATTRIB4(index
, INT_TO_FLOAT(v
[0]), INT_TO_FLOAT(v
[1]),
1340 INT_TO_FLOAT(v
[2]), INT_TO_FLOAT(v
[3]));
1343 static void GLAPIENTRY
1344 loopback_VertexAttrib4NusvARB(GLuint index
, const GLushort
* v
)
1346 ATTRIB4(index
, USHORT_TO_FLOAT(v
[0]), USHORT_TO_FLOAT(v
[1]),
1347 USHORT_TO_FLOAT(v
[2]), USHORT_TO_FLOAT(v
[3]));
1350 static void GLAPIENTRY
1351 loopback_VertexAttrib4NuivARB(GLuint index
, const GLuint
* v
)
1353 ATTRIB4(index
, UINT_TO_FLOAT(v
[0]), UINT_TO_FLOAT(v
[1]),
1354 UINT_TO_FLOAT(v
[2]), UINT_TO_FLOAT(v
[3]));
1361 * This code never registers handlers for any of the entry points
1362 * listed in vtxfmt.h.
1365 _mesa_loopback_init_api_table( struct _glapi_table
*dest
)
1367 dest
->Color3b
= loopback_Color3b_f
;
1368 dest
->Color3d
= loopback_Color3d_f
;
1369 dest
->Color3i
= loopback_Color3i_f
;
1370 dest
->Color3s
= loopback_Color3s_f
;
1371 dest
->Color3ui
= loopback_Color3ui_f
;
1372 dest
->Color3us
= loopback_Color3us_f
;
1373 dest
->Color3ub
= loopback_Color3ub_f
;
1374 dest
->Color4b
= loopback_Color4b_f
;
1375 dest
->Color4d
= loopback_Color4d_f
;
1376 dest
->Color4i
= loopback_Color4i_f
;
1377 dest
->Color4s
= loopback_Color4s_f
;
1378 dest
->Color4ui
= loopback_Color4ui_f
;
1379 dest
->Color4us
= loopback_Color4us_f
;
1380 dest
->Color4ub
= loopback_Color4ub_f
;
1381 dest
->Color3bv
= loopback_Color3bv_f
;
1382 dest
->Color3dv
= loopback_Color3dv_f
;
1383 dest
->Color3iv
= loopback_Color3iv_f
;
1384 dest
->Color3sv
= loopback_Color3sv_f
;
1385 dest
->Color3uiv
= loopback_Color3uiv_f
;
1386 dest
->Color3usv
= loopback_Color3usv_f
;
1387 dest
->Color3ubv
= loopback_Color3ubv_f
;
1388 dest
->Color4bv
= loopback_Color4bv_f
;
1389 dest
->Color4dv
= loopback_Color4dv_f
;
1390 dest
->Color4iv
= loopback_Color4iv_f
;
1391 dest
->Color4sv
= loopback_Color4sv_f
;
1392 dest
->Color4uiv
= loopback_Color4uiv_f
;
1393 dest
->Color4usv
= loopback_Color4usv_f
;
1394 dest
->Color4ubv
= loopback_Color4ubv_f
;
1396 dest
->SecondaryColor3bEXT
= loopback_SecondaryColor3bEXT_f
;
1397 dest
->SecondaryColor3dEXT
= loopback_SecondaryColor3dEXT_f
;
1398 dest
->SecondaryColor3iEXT
= loopback_SecondaryColor3iEXT_f
;
1399 dest
->SecondaryColor3sEXT
= loopback_SecondaryColor3sEXT_f
;
1400 dest
->SecondaryColor3uiEXT
= loopback_SecondaryColor3uiEXT_f
;
1401 dest
->SecondaryColor3usEXT
= loopback_SecondaryColor3usEXT_f
;
1402 dest
->SecondaryColor3ubEXT
= loopback_SecondaryColor3ubEXT_f
;
1403 dest
->SecondaryColor3bvEXT
= loopback_SecondaryColor3bvEXT_f
;
1404 dest
->SecondaryColor3dvEXT
= loopback_SecondaryColor3dvEXT_f
;
1405 dest
->SecondaryColor3ivEXT
= loopback_SecondaryColor3ivEXT_f
;
1406 dest
->SecondaryColor3svEXT
= loopback_SecondaryColor3svEXT_f
;
1407 dest
->SecondaryColor3uivEXT
= loopback_SecondaryColor3uivEXT_f
;
1408 dest
->SecondaryColor3usvEXT
= loopback_SecondaryColor3usvEXT_f
;
1409 dest
->SecondaryColor3ubvEXT
= loopback_SecondaryColor3ubvEXT_f
;
1411 dest
->Indexd
= loopback_Indexd
;
1412 dest
->Indexi
= loopback_Indexi
;
1413 dest
->Indexs
= loopback_Indexs
;
1414 dest
->Indexub
= loopback_Indexub
;
1415 dest
->Indexdv
= loopback_Indexdv
;
1416 dest
->Indexiv
= loopback_Indexiv
;
1417 dest
->Indexsv
= loopback_Indexsv
;
1418 dest
->Indexubv
= loopback_Indexubv
;
1419 dest
->Normal3b
= loopback_Normal3b
;
1420 dest
->Normal3d
= loopback_Normal3d
;
1421 dest
->Normal3i
= loopback_Normal3i
;
1422 dest
->Normal3s
= loopback_Normal3s
;
1423 dest
->Normal3bv
= loopback_Normal3bv
;
1424 dest
->Normal3dv
= loopback_Normal3dv
;
1425 dest
->Normal3iv
= loopback_Normal3iv
;
1426 dest
->Normal3sv
= loopback_Normal3sv
;
1427 dest
->TexCoord1d
= loopback_TexCoord1d
;
1428 dest
->TexCoord1i
= loopback_TexCoord1i
;
1429 dest
->TexCoord1s
= loopback_TexCoord1s
;
1430 dest
->TexCoord2d
= loopback_TexCoord2d
;
1431 dest
->TexCoord2s
= loopback_TexCoord2s
;
1432 dest
->TexCoord2i
= loopback_TexCoord2i
;
1433 dest
->TexCoord3d
= loopback_TexCoord3d
;
1434 dest
->TexCoord3i
= loopback_TexCoord3i
;
1435 dest
->TexCoord3s
= loopback_TexCoord3s
;
1436 dest
->TexCoord4d
= loopback_TexCoord4d
;
1437 dest
->TexCoord4i
= loopback_TexCoord4i
;
1438 dest
->TexCoord4s
= loopback_TexCoord4s
;
1439 dest
->TexCoord1dv
= loopback_TexCoord1dv
;
1440 dest
->TexCoord1iv
= loopback_TexCoord1iv
;
1441 dest
->TexCoord1sv
= loopback_TexCoord1sv
;
1442 dest
->TexCoord2dv
= loopback_TexCoord2dv
;
1443 dest
->TexCoord2iv
= loopback_TexCoord2iv
;
1444 dest
->TexCoord2sv
= loopback_TexCoord2sv
;
1445 dest
->TexCoord3dv
= loopback_TexCoord3dv
;
1446 dest
->TexCoord3iv
= loopback_TexCoord3iv
;
1447 dest
->TexCoord3sv
= loopback_TexCoord3sv
;
1448 dest
->TexCoord4dv
= loopback_TexCoord4dv
;
1449 dest
->TexCoord4iv
= loopback_TexCoord4iv
;
1450 dest
->TexCoord4sv
= loopback_TexCoord4sv
;
1451 dest
->Vertex2d
= loopback_Vertex2d
;
1452 dest
->Vertex2i
= loopback_Vertex2i
;
1453 dest
->Vertex2s
= loopback_Vertex2s
;
1454 dest
->Vertex3d
= loopback_Vertex3d
;
1455 dest
->Vertex3i
= loopback_Vertex3i
;
1456 dest
->Vertex3s
= loopback_Vertex3s
;
1457 dest
->Vertex4d
= loopback_Vertex4d
;
1458 dest
->Vertex4i
= loopback_Vertex4i
;
1459 dest
->Vertex4s
= loopback_Vertex4s
;
1460 dest
->Vertex2dv
= loopback_Vertex2dv
;
1461 dest
->Vertex2iv
= loopback_Vertex2iv
;
1462 dest
->Vertex2sv
= loopback_Vertex2sv
;
1463 dest
->Vertex3dv
= loopback_Vertex3dv
;
1464 dest
->Vertex3iv
= loopback_Vertex3iv
;
1465 dest
->Vertex3sv
= loopback_Vertex3sv
;
1466 dest
->Vertex4dv
= loopback_Vertex4dv
;
1467 dest
->Vertex4iv
= loopback_Vertex4iv
;
1468 dest
->Vertex4sv
= loopback_Vertex4sv
;
1469 dest
->MultiTexCoord1dARB
= loopback_MultiTexCoord1dARB
;
1470 dest
->MultiTexCoord1dvARB
= loopback_MultiTexCoord1dvARB
;
1471 dest
->MultiTexCoord1iARB
= loopback_MultiTexCoord1iARB
;
1472 dest
->MultiTexCoord1ivARB
= loopback_MultiTexCoord1ivARB
;
1473 dest
->MultiTexCoord1sARB
= loopback_MultiTexCoord1sARB
;
1474 dest
->MultiTexCoord1svARB
= loopback_MultiTexCoord1svARB
;
1475 dest
->MultiTexCoord2dARB
= loopback_MultiTexCoord2dARB
;
1476 dest
->MultiTexCoord2dvARB
= loopback_MultiTexCoord2dvARB
;
1477 dest
->MultiTexCoord2iARB
= loopback_MultiTexCoord2iARB
;
1478 dest
->MultiTexCoord2ivARB
= loopback_MultiTexCoord2ivARB
;
1479 dest
->MultiTexCoord2sARB
= loopback_MultiTexCoord2sARB
;
1480 dest
->MultiTexCoord2svARB
= loopback_MultiTexCoord2svARB
;
1481 dest
->MultiTexCoord3dARB
= loopback_MultiTexCoord3dARB
;
1482 dest
->MultiTexCoord3dvARB
= loopback_MultiTexCoord3dvARB
;
1483 dest
->MultiTexCoord3iARB
= loopback_MultiTexCoord3iARB
;
1484 dest
->MultiTexCoord3ivARB
= loopback_MultiTexCoord3ivARB
;
1485 dest
->MultiTexCoord3sARB
= loopback_MultiTexCoord3sARB
;
1486 dest
->MultiTexCoord3svARB
= loopback_MultiTexCoord3svARB
;
1487 dest
->MultiTexCoord4dARB
= loopback_MultiTexCoord4dARB
;
1488 dest
->MultiTexCoord4dvARB
= loopback_MultiTexCoord4dvARB
;
1489 dest
->MultiTexCoord4iARB
= loopback_MultiTexCoord4iARB
;
1490 dest
->MultiTexCoord4ivARB
= loopback_MultiTexCoord4ivARB
;
1491 dest
->MultiTexCoord4sARB
= loopback_MultiTexCoord4sARB
;
1492 dest
->MultiTexCoord4svARB
= loopback_MultiTexCoord4svARB
;
1493 dest
->EvalCoord2dv
= loopback_EvalCoord2dv
;
1494 dest
->EvalCoord2fv
= loopback_EvalCoord2fv
;
1495 dest
->EvalCoord2d
= loopback_EvalCoord2d
;
1496 dest
->EvalCoord1dv
= loopback_EvalCoord1dv
;
1497 dest
->EvalCoord1fv
= loopback_EvalCoord1fv
;
1498 dest
->EvalCoord1d
= loopback_EvalCoord1d
;
1499 dest
->Materialf
= loopback_Materialf
;
1500 dest
->Materiali
= loopback_Materiali
;
1501 dest
->Materialiv
= loopback_Materialiv
;
1502 dest
->Rectd
= loopback_Rectd
;
1503 dest
->Rectdv
= loopback_Rectdv
;
1504 dest
->Rectfv
= loopback_Rectfv
;
1505 dest
->Recti
= loopback_Recti
;
1506 dest
->Rectiv
= loopback_Rectiv
;
1507 dest
->Rects
= loopback_Rects
;
1508 dest
->Rectsv
= loopback_Rectsv
;
1509 dest
->FogCoorddEXT
= loopback_FogCoorddEXT
;
1510 dest
->FogCoorddvEXT
= loopback_FogCoorddvEXT
;
1512 dest
->VertexAttrib1sNV
= loopback_VertexAttrib1sNV
;
1513 dest
->VertexAttrib1fNV
= loopback_VertexAttrib1fNV
;
1514 dest
->VertexAttrib1dNV
= loopback_VertexAttrib1dNV
;
1515 dest
->VertexAttrib2sNV
= loopback_VertexAttrib2sNV
;
1516 dest
->VertexAttrib2fNV
= loopback_VertexAttrib2fNV
;
1517 dest
->VertexAttrib2dNV
= loopback_VertexAttrib2dNV
;
1518 dest
->VertexAttrib3sNV
= loopback_VertexAttrib3sNV
;
1519 dest
->VertexAttrib3fNV
= loopback_VertexAttrib3fNV
;
1520 dest
->VertexAttrib3dNV
= loopback_VertexAttrib3dNV
;
1521 dest
->VertexAttrib4sNV
= loopback_VertexAttrib4sNV
;
1522 dest
->VertexAttrib4dNV
= loopback_VertexAttrib4dNV
;
1523 dest
->VertexAttrib4ubNV
= loopback_VertexAttrib4ubNV
;
1525 dest
->VertexAttrib1svNV
= loopback_VertexAttrib1svNV
;
1526 dest
->VertexAttrib1fvNV
= loopback_VertexAttrib1fvNV
;
1527 dest
->VertexAttrib1dvNV
= loopback_VertexAttrib1dvNV
;
1528 dest
->VertexAttrib2svNV
= loopback_VertexAttrib2svNV
;
1529 dest
->VertexAttrib2fvNV
= loopback_VertexAttrib2fvNV
;
1530 dest
->VertexAttrib2dvNV
= loopback_VertexAttrib2dvNV
;
1531 dest
->VertexAttrib3svNV
= loopback_VertexAttrib3svNV
;
1532 dest
->VertexAttrib3fvNV
= loopback_VertexAttrib3fvNV
;
1533 dest
->VertexAttrib3dvNV
= loopback_VertexAttrib3dvNV
;
1534 dest
->VertexAttrib4svNV
= loopback_VertexAttrib4svNV
;
1535 dest
->VertexAttrib4fvNV
= loopback_VertexAttrib4fvNV
;
1536 dest
->VertexAttrib4dvNV
= loopback_VertexAttrib4dvNV
;
1537 dest
->VertexAttrib4ubvNV
= loopback_VertexAttrib4ubvNV
;
1539 dest
->VertexAttribs1svNV
= loopback_VertexAttribs1svNV
;
1540 dest
->VertexAttribs1fvNV
= loopback_VertexAttribs1fvNV
;
1541 dest
->VertexAttribs1dvNV
= loopback_VertexAttribs1dvNV
;
1542 dest
->VertexAttribs2svNV
= loopback_VertexAttribs2svNV
;
1543 dest
->VertexAttribs2fvNV
= loopback_VertexAttribs2fvNV
;
1544 dest
->VertexAttribs2dvNV
= loopback_VertexAttribs2dvNV
;
1545 dest
->VertexAttribs3svNV
= loopback_VertexAttribs3svNV
;
1546 dest
->VertexAttribs3fvNV
= loopback_VertexAttribs3fvNV
;
1547 dest
->VertexAttribs3dvNV
= loopback_VertexAttribs3dvNV
;
1548 dest
->VertexAttribs4svNV
= loopback_VertexAttribs4svNV
;
1549 dest
->VertexAttribs4fvNV
= loopback_VertexAttribs4fvNV
;
1550 dest
->VertexAttribs4dvNV
= loopback_VertexAttribs4dvNV
;
1551 dest
->VertexAttribs4ubvNV
= loopback_VertexAttribs4ubvNV
;
1553 dest
->VertexAttrib4bvARB
= loopback_VertexAttrib4bvARB
;
1554 dest
->VertexAttrib4ivARB
= loopback_VertexAttrib4ivARB
;
1555 dest
->VertexAttrib4ubvARB
= loopback_VertexAttrib4ubvARB
;
1556 dest
->VertexAttrib4usvARB
= loopback_VertexAttrib4usvARB
;
1557 dest
->VertexAttrib4uivARB
= loopback_VertexAttrib4uivARB
;
1558 dest
->VertexAttrib4NbvARB
= loopback_VertexAttrib4NbvARB
;
1559 dest
->VertexAttrib4NsvARB
= loopback_VertexAttrib4NsvARB
;
1560 dest
->VertexAttrib4NivARB
= loopback_VertexAttrib4NivARB
;
1561 dest
->VertexAttrib4NusvARB
= loopback_VertexAttrib4NusvARB
;
1562 dest
->VertexAttrib4NuivARB
= loopback_VertexAttrib4NuivARB
;