17117f1b4Smrg/**************************************************************************
27117f1b4Smrg
3af69d88dSmrgCopyright 2002 VMware, Inc.
4af69d88dSmrgCopyright 2011 Dave Airlie (ARB_vertex_type_2_10_10_10_rev support)
57117f1b4SmrgAll Rights Reserved.
67117f1b4Smrg
77117f1b4SmrgPermission is hereby granted, free of charge, to any person obtaining a
87117f1b4Smrgcopy of this software and associated documentation files (the "Software"),
97117f1b4Smrgto deal in the Software without restriction, including without limitation
107117f1b4Smrgon the rights to use, copy, modify, merge, publish, distribute, sub
117117f1b4Smrglicense, and/or sell copies of the Software, and to permit persons to whom
127117f1b4Smrgthe Software is furnished to do so, subject to the following conditions:
137117f1b4Smrg
147117f1b4SmrgThe above copyright notice and this permission notice (including the next
157117f1b4Smrgparagraph) shall be included in all copies or substantial portions of the
167117f1b4SmrgSoftware.
177117f1b4Smrg
187117f1b4SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
197117f1b4SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
207117f1b4SmrgFITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21af69d88dSmrgVMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
227117f1b4SmrgDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
237117f1b4SmrgOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
247117f1b4SmrgUSE OR OTHER DEALINGS IN THE SOFTWARE.
257117f1b4Smrg
267117f1b4Smrg**************************************************************************/
277117f1b4Smrg
2801e04c3fSmrg#include "util/format_r11g11b10f.h"
29af69d88dSmrg#include "main/varray.h"
307ec681f3Smrg#include "vbo_util.h"
317ec681f3Smrg#include "util/half_float.h"
32af69d88dSmrg
3301e04c3fSmrg
3401e04c3fSmrg/* ATTR */
3501e04c3fSmrg#define ATTRI( A, N, V0, V1, V2, V3 ) \
367ec681f3Smrg    ATTR_UNION(A, N, GL_INT, uint32_t, INT_AS_UINT(V0), INT_AS_UINT(V1), \
377ec681f3Smrg        INT_AS_UINT(V2), INT_AS_UINT(V3))
3801e04c3fSmrg#define ATTRUI( A, N, V0, V1, V2, V3 ) \
397ec681f3Smrg    ATTR_UNION(A, N, GL_UNSIGNED_INT, uint32_t, (uint32_t)(V0), (uint32_t)(V1), \
407ec681f3Smrg        (uint32_t)(V2), (uint32_t)(V3))
4101e04c3fSmrg#define ATTRF( A, N, V0, V1, V2, V3 ) \
427ec681f3Smrg    ATTR_UNION(A, N, GL_FLOAT, uint32_t, FLOAT_AS_UINT(V0), FLOAT_AS_UINT(V1),\
437ec681f3Smrg        FLOAT_AS_UINT(V2), FLOAT_AS_UINT(V3))
4401e04c3fSmrg#define ATTRD( A, N, V0, V1, V2, V3 ) \
457ec681f3Smrg    ATTR_UNION(A, N, GL_DOUBLE, uint64_t, DOUBLE_AS_UINT64(V0), \
467ec681f3Smrg        DOUBLE_AS_UINT64(V1), DOUBLE_AS_UINT64(V2), DOUBLE_AS_UINT64(V3))
4701e04c3fSmrg#define ATTRUI64( A, N, V0, V1, V2, V3 ) \
4801e04c3fSmrg    ATTR_UNION(A, N, GL_UNSIGNED_INT64_ARB, uint64_t, V0, V1, V2, V3)
4901e04c3fSmrg
5001e04c3fSmrg
513464ebd5Sriastradh/* float */
5201e04c3fSmrg#define ATTR1FV( A, V ) ATTRF( A, 1, (V)[0], 0, 0, 1 )
5301e04c3fSmrg#define ATTR2FV( A, V ) ATTRF( A, 2, (V)[0], (V)[1], 0, 1 )
5401e04c3fSmrg#define ATTR3FV( A, V ) ATTRF( A, 3, (V)[0], (V)[1], (V)[2], 1 )
5501e04c3fSmrg#define ATTR4FV( A, V ) ATTRF( A, 4, (V)[0], (V)[1], (V)[2], (V)[3] )
567117f1b4Smrg
5701e04c3fSmrg#define ATTR1F( A, X )          ATTRF( A, 1, X, 0, 0, 1 )
5801e04c3fSmrg#define ATTR2F( A, X, Y )       ATTRF( A, 2, X, Y, 0, 1 )
5901e04c3fSmrg#define ATTR3F( A, X, Y, Z )    ATTRF( A, 3, X, Y, Z, 1 )
6001e04c3fSmrg#define ATTR4F( A, X, Y, Z, W ) ATTRF( A, 4, X, Y, Z, W )
617117f1b4Smrg
623464ebd5Sriastradh
637ec681f3Smrg/* half */
647ec681f3Smrg#define ATTR1HV( A, V ) ATTRF( A, 1, _mesa_half_to_float((uint16_t)(V)[0]), \
657ec681f3Smrg                               0, 0, 1 )
667ec681f3Smrg#define ATTR2HV( A, V ) ATTRF( A, 2, _mesa_half_to_float((uint16_t)(V)[0]), \
677ec681f3Smrg                               _mesa_half_to_float((uint16_t)(V)[1]), 0, 1 )
687ec681f3Smrg#define ATTR3HV( A, V ) ATTRF( A, 3, _mesa_half_to_float((uint16_t)(V)[0]), \
697ec681f3Smrg                               _mesa_half_to_float((uint16_t)(V)[1]), \
707ec681f3Smrg                               _mesa_half_to_float((uint16_t)(V)[2]), 1 )
717ec681f3Smrg#define ATTR4HV( A, V ) ATTRF( A, 4, _mesa_half_to_float((uint16_t)(V)[0]), \
727ec681f3Smrg                               _mesa_half_to_float((uint16_t)(V)[1]), \
737ec681f3Smrg                               _mesa_half_to_float((uint16_t)(V)[2]), \
747ec681f3Smrg                               _mesa_half_to_float((uint16_t)(V)[3]) )
757ec681f3Smrg
767ec681f3Smrg#define ATTR1H( A, X )          ATTRF( A, 1, _mesa_half_to_float(X), 0, 0, 1 )
777ec681f3Smrg#define ATTR2H( A, X, Y )       ATTRF( A, 2, _mesa_half_to_float(X), \
787ec681f3Smrg                                       _mesa_half_to_float(Y), 0, 1 )
797ec681f3Smrg#define ATTR3H( A, X, Y, Z )    ATTRF( A, 3, _mesa_half_to_float(X), \
807ec681f3Smrg                                       _mesa_half_to_float(Y), \
817ec681f3Smrg                                       _mesa_half_to_float(Z), 1 )
827ec681f3Smrg#define ATTR4H( A, X, Y, Z, W ) ATTRF( A, 4, _mesa_half_to_float(X), \
837ec681f3Smrg                                       _mesa_half_to_float(Y), \
847ec681f3Smrg                                       _mesa_half_to_float(Z), \
857ec681f3Smrg                                       _mesa_half_to_float(W) )
867ec681f3Smrg
877ec681f3Smrg
8801e04c3fSmrg/* int */
89af69d88dSmrg#define ATTR2IV( A, V ) ATTRI( A, 2, (V)[0], (V)[1], 0, 1 )
90af69d88dSmrg#define ATTR3IV( A, V ) ATTRI( A, 3, (V)[0], (V)[1], (V)[2], 1 )
91af69d88dSmrg#define ATTR4IV( A, V ) ATTRI( A, 4, (V)[0], (V)[1], (V)[2], (V)[3] )
923464ebd5Sriastradh
93af69d88dSmrg#define ATTR1I( A, X )          ATTRI( A, 1, X, 0, 0, 1 )
94af69d88dSmrg#define ATTR2I( A, X, Y )       ATTRI( A, 2, X, Y, 0, 1 )
95af69d88dSmrg#define ATTR3I( A, X, Y, Z )    ATTRI( A, 3, X, Y, Z, 1 )
96af69d88dSmrg#define ATTR4I( A, X, Y, Z, W ) ATTRI( A, 4, X, Y, Z, W )
973464ebd5Sriastradh
983464ebd5Sriastradh
99af69d88dSmrg/* uint */
100af69d88dSmrg#define ATTR2UIV( A, V ) ATTRUI( A, 2, (V)[0], (V)[1], 0, 1 )
101af69d88dSmrg#define ATTR3UIV( A, V ) ATTRUI( A, 3, (V)[0], (V)[1], (V)[2], 1 )
102af69d88dSmrg#define ATTR4UIV( A, V ) ATTRUI( A, 4, (V)[0], (V)[1], (V)[2], (V)[3] )
103af69d88dSmrg
104af69d88dSmrg#define ATTR1UI( A, X )          ATTRUI( A, 1, X, 0, 0, 1 )
105af69d88dSmrg#define ATTR2UI( A, X, Y )       ATTRUI( A, 2, X, Y, 0, 1 )
106af69d88dSmrg#define ATTR3UI( A, X, Y, Z )    ATTRUI( A, 3, X, Y, Z, 1 )
107af69d88dSmrg#define ATTR4UI( A, X, Y, Z, W ) ATTRUI( A, 4, X, Y, Z, W )
108af69d88dSmrg
10901e04c3fSmrg#define MAT_ATTR( A, N, V ) ATTRF( A, N, (V)[0], (V)[1], (V)[2], (V)[3] )
110af69d88dSmrg
11101e04c3fSmrg#define ATTRUI10_1( A, UI ) ATTRF( A, 1, (UI) & 0x3ff, 0, 0, 1 )
11201e04c3fSmrg#define ATTRUI10_2( A, UI ) ATTRF( A, 2, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, 0, 1 )
11301e04c3fSmrg#define ATTRUI10_3( A, UI ) ATTRF( A, 3, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, ((UI) >> 20) & 0x3ff, 1 )
11401e04c3fSmrg#define ATTRUI10_4( A, UI ) ATTRF( A, 4, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, ((UI) >> 20) & 0x3ff, ((UI) >> 30) & 0x3 )
115af69d88dSmrg
11601e04c3fSmrg#define ATTRUI10N_1( A, UI ) ATTRF( A, 1, conv_ui10_to_norm_float((UI) & 0x3ff), 0, 0, 1 )
11701e04c3fSmrg#define ATTRUI10N_2( A, UI ) ATTRF( A, 2, \
118af69d88dSmrg				   conv_ui10_to_norm_float((UI) & 0x3ff), \
119af69d88dSmrg				   conv_ui10_to_norm_float(((UI) >> 10) & 0x3ff), 0, 1 )
12001e04c3fSmrg#define ATTRUI10N_3( A, UI ) ATTRF( A, 3, \
121af69d88dSmrg				   conv_ui10_to_norm_float((UI) & 0x3ff), \
122af69d88dSmrg				   conv_ui10_to_norm_float(((UI) >> 10) & 0x3ff), \
123af69d88dSmrg				   conv_ui10_to_norm_float(((UI) >> 20) & 0x3ff), 1 )
12401e04c3fSmrg#define ATTRUI10N_4( A, UI ) ATTRF( A, 4, \
125af69d88dSmrg				   conv_ui10_to_norm_float((UI) & 0x3ff), \
126af69d88dSmrg				   conv_ui10_to_norm_float(((UI) >> 10) & 0x3ff), \
127af69d88dSmrg				   conv_ui10_to_norm_float(((UI) >> 20) & 0x3ff), \
128af69d88dSmrg				   conv_ui2_to_norm_float(((UI) >> 30) & 0x3) )
129af69d88dSmrg
13001e04c3fSmrg#define ATTRI10_1( A, I10 ) ATTRF( A, 1, conv_i10_to_i((I10) & 0x3ff), 0, 0, 1 )
13101e04c3fSmrg#define ATTRI10_2( A, I10 ) ATTRF( A, 2, \
132af69d88dSmrg				conv_i10_to_i((I10) & 0x3ff),		\
133af69d88dSmrg				conv_i10_to_i(((I10) >> 10) & 0x3ff), 0, 1 )
13401e04c3fSmrg#define ATTRI10_3( A, I10 ) ATTRF( A, 3, \
135af69d88dSmrg				conv_i10_to_i((I10) & 0x3ff),	    \
136af69d88dSmrg				conv_i10_to_i(((I10) >> 10) & 0x3ff), \
137af69d88dSmrg				conv_i10_to_i(((I10) >> 20) & 0x3ff), 1 )
13801e04c3fSmrg#define ATTRI10_4( A, I10 ) ATTRF( A, 4, \
139af69d88dSmrg				conv_i10_to_i((I10) & 0x3ff),		\
140af69d88dSmrg				conv_i10_to_i(((I10) >> 10) & 0x3ff), \
141af69d88dSmrg				conv_i10_to_i(((I10) >> 20) & 0x3ff), \
142af69d88dSmrg				conv_i2_to_i(((I10) >> 30) & 0x3))
143af69d88dSmrg
144af69d88dSmrg
14501e04c3fSmrg#define ATTRI10N_1(ctx, A, I10) ATTRF(A, 1, conv_i10_to_norm_float(ctx, (I10) & 0x3ff), 0, 0, 1 )
14601e04c3fSmrg#define ATTRI10N_2(ctx, A, I10) ATTRF(A, 2, \
147af69d88dSmrg				conv_i10_to_norm_float(ctx, (I10) & 0x3ff),		\
148af69d88dSmrg				conv_i10_to_norm_float(ctx, ((I10) >> 10) & 0x3ff), 0, 1 )
14901e04c3fSmrg#define ATTRI10N_3(ctx, A, I10) ATTRF(A, 3, \
150af69d88dSmrg				conv_i10_to_norm_float(ctx, (I10) & 0x3ff),	    \
151af69d88dSmrg				conv_i10_to_norm_float(ctx, ((I10) >> 10) & 0x3ff), \
152af69d88dSmrg				conv_i10_to_norm_float(ctx, ((I10) >> 20) & 0x3ff), 1 )
15301e04c3fSmrg#define ATTRI10N_4(ctx, A, I10) ATTRF(A, 4, \
154af69d88dSmrg				conv_i10_to_norm_float(ctx, (I10) & 0x3ff),		\
155af69d88dSmrg				conv_i10_to_norm_float(ctx, ((I10) >> 10) & 0x3ff), \
156af69d88dSmrg				conv_i10_to_norm_float(ctx, ((I10) >> 20) & 0x3ff), \
157af69d88dSmrg				conv_i2_to_norm_float(ctx, ((I10) >> 30) & 0x3))
158af69d88dSmrg
159af69d88dSmrg#define ATTR_UI(ctx, val, type, normalized, attr, arg) do {	\
160af69d88dSmrg   if ((type) == GL_UNSIGNED_INT_2_10_10_10_REV) {		\
161af69d88dSmrg      if (normalized) {						\
162af69d88dSmrg	 ATTRUI10N_##val((attr), (arg));			\
163af69d88dSmrg      } else {							\
164af69d88dSmrg	 ATTRUI10_##val((attr), (arg));				\
165af69d88dSmrg      }								\
166af69d88dSmrg   } else if ((type) == GL_INT_2_10_10_10_REV) {		\
167af69d88dSmrg      if (normalized) {						\
168af69d88dSmrg	 ATTRI10N_##val(ctx, (attr), (arg));			\
169af69d88dSmrg      } else {							\
170af69d88dSmrg	 ATTRI10_##val((attr), (arg));				\
171af69d88dSmrg      }								\
172af69d88dSmrg   } else if ((type) == GL_UNSIGNED_INT_10F_11F_11F_REV) {	\
173af69d88dSmrg      float res[4];						\
17401e04c3fSmrg      res[3] = 1;                                               \
175af69d88dSmrg      r11g11b10f_to_float3((arg), res);				\
176af69d88dSmrg      ATTR##val##FV((attr), res);				\
177af69d88dSmrg   } else							\
178af69d88dSmrg      ERROR(GL_INVALID_VALUE);					\
179af69d88dSmrg   } while(0)
180af69d88dSmrg
181af69d88dSmrg#define ATTR_UI_INDEX(ctx, val, type, normalized, index, arg) do {	\
18201e04c3fSmrg      if ((index) == 0 && _mesa_attr_zero_aliases_vertex(ctx)) {	\
183af69d88dSmrg	 ATTR_UI(ctx, val, (type), normalized, 0, (arg));		\
184af69d88dSmrg      } else if ((index) < MAX_VERTEX_GENERIC_ATTRIBS) {		\
185af69d88dSmrg	 ATTR_UI(ctx, val, (type), normalized, VBO_ATTRIB_GENERIC0 + (index), (arg)); \
186af69d88dSmrg      } else								\
187af69d88dSmrg	 ERROR(GL_INVALID_VALUE);					\
188af69d88dSmrg   } while(0)
1893464ebd5Sriastradh
19001e04c3fSmrg
19101e04c3fSmrg/* Doubles */
19201e04c3fSmrg#define ATTR1DV( A, V ) ATTRD( A, 1, (V)[0], 0, 0, 1 )
19301e04c3fSmrg#define ATTR2DV( A, V ) ATTRD( A, 2, (V)[0], (V)[1], 0, 1 )
19401e04c3fSmrg#define ATTR3DV( A, V ) ATTRD( A, 3, (V)[0], (V)[1], (V)[2], 1 )
19501e04c3fSmrg#define ATTR4DV( A, V ) ATTRD( A, 4, (V)[0], (V)[1], (V)[2], (V)[3] )
19601e04c3fSmrg
19701e04c3fSmrg#define ATTR1D( A, X )          ATTRD( A, 1, X, 0, 0, 1 )
19801e04c3fSmrg#define ATTR2D( A, X, Y )       ATTRD( A, 2, X, Y, 0, 1 )
19901e04c3fSmrg#define ATTR3D( A, X, Y, Z )    ATTRD( A, 3, X, Y, Z, 1 )
20001e04c3fSmrg#define ATTR4D( A, X, Y, Z, W ) ATTRD( A, 4, X, Y, Z, W )
20101e04c3fSmrg
20201e04c3fSmrg#define ATTR1UIV64( A, V ) ATTRUI64( A, 1, (V)[0], 0, 0, 0 )
20301e04c3fSmrg#define ATTR1UI64( A, X )  ATTRUI64( A, 1, X, 0, 0, 0 )
20401e04c3fSmrg
20501e04c3fSmrg
2063464ebd5Sriastradhstatic void GLAPIENTRY
2073464ebd5SriastradhTAG(Vertex2f)(GLfloat x, GLfloat y)
2087117f1b4Smrg{
2093464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2103464ebd5Sriastradh   ATTR2F(VBO_ATTRIB_POS, x, y);
2117117f1b4Smrg}
2127117f1b4Smrg
2133464ebd5Sriastradhstatic void GLAPIENTRY
2143464ebd5SriastradhTAG(Vertex2fv)(const GLfloat * v)
2157117f1b4Smrg{
2163464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2173464ebd5Sriastradh   ATTR2FV(VBO_ATTRIB_POS, v);
2187117f1b4Smrg}
2197117f1b4Smrg
2203464ebd5Sriastradhstatic void GLAPIENTRY
2213464ebd5SriastradhTAG(Vertex3f)(GLfloat x, GLfloat y, GLfloat z)
2227117f1b4Smrg{
2233464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2243464ebd5Sriastradh   ATTR3F(VBO_ATTRIB_POS, x, y, z);
2257117f1b4Smrg}
2267117f1b4Smrg
2273464ebd5Sriastradhstatic void GLAPIENTRY
2283464ebd5SriastradhTAG(Vertex3fv)(const GLfloat * v)
2297117f1b4Smrg{
2303464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2313464ebd5Sriastradh   ATTR3FV(VBO_ATTRIB_POS, v);
2327117f1b4Smrg}
2337117f1b4Smrg
2343464ebd5Sriastradhstatic void GLAPIENTRY
2353464ebd5SriastradhTAG(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2367117f1b4Smrg{
2373464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2383464ebd5Sriastradh   ATTR4F(VBO_ATTRIB_POS, x, y, z, w);
2397117f1b4Smrg}
2407117f1b4Smrg
2413464ebd5Sriastradhstatic void GLAPIENTRY
2423464ebd5SriastradhTAG(Vertex4fv)(const GLfloat * v)
2437117f1b4Smrg{
2443464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2453464ebd5Sriastradh   ATTR4FV(VBO_ATTRIB_POS, v);
2467117f1b4Smrg}
2477117f1b4Smrg
2483464ebd5Sriastradh
2493464ebd5Sriastradh
2503464ebd5Sriastradhstatic void GLAPIENTRY
2513464ebd5SriastradhTAG(TexCoord1f)(GLfloat x)
2527117f1b4Smrg{
2533464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2543464ebd5Sriastradh   ATTR1F(VBO_ATTRIB_TEX0, x);
2557117f1b4Smrg}
2567117f1b4Smrg
2573464ebd5Sriastradhstatic void GLAPIENTRY
2583464ebd5SriastradhTAG(TexCoord1fv)(const GLfloat * v)
2597117f1b4Smrg{
2603464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2613464ebd5Sriastradh   ATTR1FV(VBO_ATTRIB_TEX0, v);
2627117f1b4Smrg}
2637117f1b4Smrg
2643464ebd5Sriastradhstatic void GLAPIENTRY
2653464ebd5SriastradhTAG(TexCoord2f)(GLfloat x, GLfloat y)
2667117f1b4Smrg{
2673464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2683464ebd5Sriastradh   ATTR2F(VBO_ATTRIB_TEX0, x, y);
2697117f1b4Smrg}
2707117f1b4Smrg
2713464ebd5Sriastradhstatic void GLAPIENTRY
2723464ebd5SriastradhTAG(TexCoord2fv)(const GLfloat * v)
2737117f1b4Smrg{
2743464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2753464ebd5Sriastradh   ATTR2FV(VBO_ATTRIB_TEX0, v);
2767117f1b4Smrg}
2777117f1b4Smrg
2783464ebd5Sriastradhstatic void GLAPIENTRY
2793464ebd5SriastradhTAG(TexCoord3f)(GLfloat x, GLfloat y, GLfloat z)
2807117f1b4Smrg{
2813464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2823464ebd5Sriastradh   ATTR3F(VBO_ATTRIB_TEX0, x, y, z);
2837117f1b4Smrg}
2847117f1b4Smrg
2853464ebd5Sriastradhstatic void GLAPIENTRY
2863464ebd5SriastradhTAG(TexCoord3fv)(const GLfloat * v)
2877117f1b4Smrg{
2883464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2893464ebd5Sriastradh   ATTR3FV(VBO_ATTRIB_TEX0, v);
2907117f1b4Smrg}
2917117f1b4Smrg
2923464ebd5Sriastradhstatic void GLAPIENTRY
2933464ebd5SriastradhTAG(TexCoord4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2947117f1b4Smrg{
2953464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
2963464ebd5Sriastradh   ATTR4F(VBO_ATTRIB_TEX0, x, y, z, w);
2977117f1b4Smrg}
2987117f1b4Smrg
2993464ebd5Sriastradhstatic void GLAPIENTRY
3003464ebd5SriastradhTAG(TexCoord4fv)(const GLfloat * v)
3017117f1b4Smrg{
3023464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3033464ebd5Sriastradh   ATTR4FV(VBO_ATTRIB_TEX0, v);
3047117f1b4Smrg}
3057117f1b4Smrg
3063464ebd5Sriastradh
3073464ebd5Sriastradh
3083464ebd5Sriastradhstatic void GLAPIENTRY
3093464ebd5SriastradhTAG(Normal3f)(GLfloat x, GLfloat y, GLfloat z)
3107117f1b4Smrg{
3113464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3123464ebd5Sriastradh   ATTR3F(VBO_ATTRIB_NORMAL, x, y, z);
3137117f1b4Smrg}
3147117f1b4Smrg
3153464ebd5Sriastradhstatic void GLAPIENTRY
3163464ebd5SriastradhTAG(Normal3fv)(const GLfloat * v)
3177117f1b4Smrg{
3183464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3193464ebd5Sriastradh   ATTR3FV(VBO_ATTRIB_NORMAL, v);
3207117f1b4Smrg}
3217117f1b4Smrg
3223464ebd5Sriastradh
3233464ebd5Sriastradh
3243464ebd5Sriastradhstatic void GLAPIENTRY
3253464ebd5SriastradhTAG(FogCoordfEXT)(GLfloat x)
3267117f1b4Smrg{
3273464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3283464ebd5Sriastradh   ATTR1F(VBO_ATTRIB_FOG, x);
3297117f1b4Smrg}
3307117f1b4Smrg
3313464ebd5Sriastradh
3323464ebd5Sriastradh
3333464ebd5Sriastradhstatic void GLAPIENTRY
3343464ebd5SriastradhTAG(FogCoordfvEXT)(const GLfloat * v)
3357117f1b4Smrg{
3363464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3373464ebd5Sriastradh   ATTR1FV(VBO_ATTRIB_FOG, v);
3387117f1b4Smrg}
3397117f1b4Smrg
3403464ebd5Sriastradhstatic void GLAPIENTRY
3413464ebd5SriastradhTAG(Color3f)(GLfloat x, GLfloat y, GLfloat z)
3427117f1b4Smrg{
3433464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3443464ebd5Sriastradh   ATTR3F(VBO_ATTRIB_COLOR0, x, y, z);
3457117f1b4Smrg}
3467117f1b4Smrg
3473464ebd5Sriastradhstatic void GLAPIENTRY
3483464ebd5SriastradhTAG(Color3fv)(const GLfloat * v)
3497117f1b4Smrg{
3503464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3513464ebd5Sriastradh   ATTR3FV(VBO_ATTRIB_COLOR0, v);
3527117f1b4Smrg}
3537117f1b4Smrg
3543464ebd5Sriastradhstatic void GLAPIENTRY
3553464ebd5SriastradhTAG(Color4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
3567117f1b4Smrg{
3573464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3583464ebd5Sriastradh   ATTR4F(VBO_ATTRIB_COLOR0, x, y, z, w);
3597117f1b4Smrg}
3607117f1b4Smrg
3613464ebd5Sriastradhstatic void GLAPIENTRY
3623464ebd5SriastradhTAG(Color4fv)(const GLfloat * v)
3637117f1b4Smrg{
3643464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3653464ebd5Sriastradh   ATTR4FV(VBO_ATTRIB_COLOR0, v);
3667117f1b4Smrg}
3677117f1b4Smrg
3683464ebd5Sriastradh
3693464ebd5Sriastradh
3703464ebd5Sriastradhstatic void GLAPIENTRY
3713464ebd5SriastradhTAG(SecondaryColor3fEXT)(GLfloat x, GLfloat y, GLfloat z)
3727117f1b4Smrg{
3733464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3743464ebd5Sriastradh   ATTR3F(VBO_ATTRIB_COLOR1, x, y, z);
3757117f1b4Smrg}
3767117f1b4Smrg
3773464ebd5Sriastradhstatic void GLAPIENTRY
3783464ebd5SriastradhTAG(SecondaryColor3fvEXT)(const GLfloat * v)
3797117f1b4Smrg{
3803464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3813464ebd5Sriastradh   ATTR3FV(VBO_ATTRIB_COLOR1, v);
3827117f1b4Smrg}
3837117f1b4Smrg
3847117f1b4Smrg
3853464ebd5Sriastradh
3863464ebd5Sriastradhstatic void GLAPIENTRY
3873464ebd5SriastradhTAG(EdgeFlag)(GLboolean b)
3887117f1b4Smrg{
3893464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
3903464ebd5Sriastradh   ATTR1F(VBO_ATTRIB_EDGEFLAG, (GLfloat) b);
3917117f1b4Smrg}
3927117f1b4Smrg
3933464ebd5Sriastradh
3943464ebd5Sriastradh
3953464ebd5Sriastradhstatic void GLAPIENTRY
3963464ebd5SriastradhTAG(Indexf)(GLfloat f)
3977117f1b4Smrg{
3983464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
39901e04c3fSmrg   ATTR1F(VBO_ATTRIB_COLOR_INDEX, f);
4007117f1b4Smrg}
4017117f1b4Smrg
4023464ebd5Sriastradhstatic void GLAPIENTRY
4033464ebd5SriastradhTAG(Indexfv)(const GLfloat * f)
4047117f1b4Smrg{
4053464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
40601e04c3fSmrg   ATTR1FV(VBO_ATTRIB_COLOR_INDEX, f);
4077117f1b4Smrg}
4087117f1b4Smrg
4097117f1b4Smrg
4103464ebd5Sriastradh
4113464ebd5Sriastradhstatic void GLAPIENTRY
4123464ebd5SriastradhTAG(MultiTexCoord1f)(GLenum target, GLfloat x)
4137117f1b4Smrg{
4143464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
4157117f1b4Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
4163464ebd5Sriastradh   ATTR1F(attr, x);
4177117f1b4Smrg}
4187117f1b4Smrg
4193464ebd5Sriastradhstatic void GLAPIENTRY
4203464ebd5SriastradhTAG(MultiTexCoord1fv)(GLenum target, const GLfloat * v)
4217117f1b4Smrg{
4223464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
4237117f1b4Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
4243464ebd5Sriastradh   ATTR1FV(attr, v);
4257117f1b4Smrg}
4267117f1b4Smrg
4273464ebd5Sriastradhstatic void GLAPIENTRY
4283464ebd5SriastradhTAG(MultiTexCoord2f)(GLenum target, GLfloat x, GLfloat y)
4297117f1b4Smrg{
4303464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
4317117f1b4Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
4323464ebd5Sriastradh   ATTR2F(attr, x, y);
4337117f1b4Smrg}
4347117f1b4Smrg
4353464ebd5Sriastradhstatic void GLAPIENTRY
4363464ebd5SriastradhTAG(MultiTexCoord2fv)(GLenum target, const GLfloat * v)
4377117f1b4Smrg{
4383464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
4397117f1b4Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
4403464ebd5Sriastradh   ATTR2FV(attr, v);
4417117f1b4Smrg}
4427117f1b4Smrg
4433464ebd5Sriastradhstatic void GLAPIENTRY
4443464ebd5SriastradhTAG(MultiTexCoord3f)(GLenum target, GLfloat x, GLfloat y, GLfloat z)
4457117f1b4Smrg{
4463464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
4477117f1b4Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
4483464ebd5Sriastradh   ATTR3F(attr, x, y, z);
4497117f1b4Smrg}
4507117f1b4Smrg
4513464ebd5Sriastradhstatic void GLAPIENTRY
4523464ebd5SriastradhTAG(MultiTexCoord3fv)(GLenum target, const GLfloat * v)
4537117f1b4Smrg{
4543464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
4557117f1b4Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
4563464ebd5Sriastradh   ATTR3FV(attr, v);
4577117f1b4Smrg}
4587117f1b4Smrg
4593464ebd5Sriastradhstatic void GLAPIENTRY
4603464ebd5SriastradhTAG(MultiTexCoord4f)(GLenum target, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
4617117f1b4Smrg{
4623464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
4637117f1b4Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
4643464ebd5Sriastradh   ATTR4F(attr, x, y, z, w);
4657117f1b4Smrg}
4667117f1b4Smrg
4673464ebd5Sriastradhstatic void GLAPIENTRY
4683464ebd5SriastradhTAG(MultiTexCoord4fv)(GLenum target, const GLfloat * v)
4697117f1b4Smrg{
4703464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
4717117f1b4Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
4723464ebd5Sriastradh   ATTR4FV(attr, v);
4737117f1b4Smrg}
4747117f1b4Smrg
4757117f1b4Smrg
4763464ebd5Sriastradhstatic void GLAPIENTRY
4773464ebd5SriastradhTAG(VertexAttrib1fARB)(GLuint index, GLfloat x)
4787117f1b4Smrg{
4793464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
48001e04c3fSmrg   if (is_vertex_position(ctx, index))
4817117f1b4Smrg      ATTR1F(0, x);
4824a49301eSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
4837117f1b4Smrg      ATTR1F(VBO_ATTRIB_GENERIC0 + index, x);
4847117f1b4Smrg   else
4853464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
4867117f1b4Smrg}
4877117f1b4Smrg
4883464ebd5Sriastradhstatic void GLAPIENTRY
4893464ebd5SriastradhTAG(VertexAttrib1fvARB)(GLuint index, const GLfloat * v)
4907117f1b4Smrg{
4913464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
49201e04c3fSmrg   if (is_vertex_position(ctx, index))
4937117f1b4Smrg      ATTR1FV(0, v);
4944a49301eSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
4957117f1b4Smrg      ATTR1FV(VBO_ATTRIB_GENERIC0 + index, v);
4967117f1b4Smrg   else
4973464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
4987117f1b4Smrg}
4997117f1b4Smrg
5003464ebd5Sriastradhstatic void GLAPIENTRY
5013464ebd5SriastradhTAG(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y)
5027117f1b4Smrg{
5033464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
50401e04c3fSmrg   if (is_vertex_position(ctx, index))
5057117f1b4Smrg      ATTR2F(0, x, y);
5064a49301eSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
5077117f1b4Smrg      ATTR2F(VBO_ATTRIB_GENERIC0 + index, x, y);
5087117f1b4Smrg   else
5093464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
5107117f1b4Smrg}
5117117f1b4Smrg
5123464ebd5Sriastradhstatic void GLAPIENTRY
5133464ebd5SriastradhTAG(VertexAttrib2fvARB)(GLuint index, const GLfloat * v)
5147117f1b4Smrg{
5153464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
51601e04c3fSmrg   if (is_vertex_position(ctx, index))
5177117f1b4Smrg      ATTR2FV(0, v);
5184a49301eSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
5197117f1b4Smrg      ATTR2FV(VBO_ATTRIB_GENERIC0 + index, v);
5207117f1b4Smrg   else
5213464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
5227117f1b4Smrg}
5237117f1b4Smrg
5243464ebd5Sriastradhstatic void GLAPIENTRY
5253464ebd5SriastradhTAG(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
5267117f1b4Smrg{
5273464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
52801e04c3fSmrg   if (is_vertex_position(ctx, index))
5297117f1b4Smrg      ATTR3F(0, x, y, z);
5304a49301eSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
5317117f1b4Smrg      ATTR3F(VBO_ATTRIB_GENERIC0 + index, x, y, z);
5327117f1b4Smrg   else
5333464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
5347117f1b4Smrg}
5357117f1b4Smrg
5363464ebd5Sriastradhstatic void GLAPIENTRY
5373464ebd5SriastradhTAG(VertexAttrib3fvARB)(GLuint index, const GLfloat * v)
5387117f1b4Smrg{
5393464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
54001e04c3fSmrg   if (is_vertex_position(ctx, index))
5417117f1b4Smrg      ATTR3FV(0, v);
5424a49301eSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
5437117f1b4Smrg      ATTR3FV(VBO_ATTRIB_GENERIC0 + index, v);
5447117f1b4Smrg   else
5453464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
5467117f1b4Smrg}
5477117f1b4Smrg
5483464ebd5Sriastradhstatic void GLAPIENTRY
5493464ebd5SriastradhTAG(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
5507117f1b4Smrg{
5513464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
55201e04c3fSmrg   if (is_vertex_position(ctx, index))
5537117f1b4Smrg      ATTR4F(0, x, y, z, w);
5544a49301eSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
5557117f1b4Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
5567117f1b4Smrg   else
5573464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
5587117f1b4Smrg}
5597117f1b4Smrg
5603464ebd5Sriastradhstatic void GLAPIENTRY
5613464ebd5SriastradhTAG(VertexAttrib4fvARB)(GLuint index, const GLfloat * v)
5627117f1b4Smrg{
5633464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
56401e04c3fSmrg   if (is_vertex_position(ctx, index))
5657117f1b4Smrg      ATTR4FV(0, v);
5664a49301eSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
5677117f1b4Smrg      ATTR4FV(VBO_ATTRIB_GENERIC0 + index, v);
5687117f1b4Smrg   else
5693464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
5703464ebd5Sriastradh}
5713464ebd5Sriastradh
5723464ebd5Sriastradh
5733464ebd5Sriastradh
5743464ebd5Sriastradh/* Integer-valued generic attributes.
5753464ebd5Sriastradh * XXX: the integers just get converted to floats at this time
5763464ebd5Sriastradh */
5773464ebd5Sriastradhstatic void GLAPIENTRY
5783464ebd5SriastradhTAG(VertexAttribI1i)(GLuint index, GLint x)
5793464ebd5Sriastradh{
5803464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
58101e04c3fSmrg   if (is_vertex_position(ctx, index))
5823464ebd5Sriastradh      ATTR1I(0, x);
5833464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
5843464ebd5Sriastradh      ATTR1I(VBO_ATTRIB_GENERIC0 + index, x);
5853464ebd5Sriastradh   else
5863464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
5873464ebd5Sriastradh}
5883464ebd5Sriastradh
5893464ebd5Sriastradhstatic void GLAPIENTRY
5903464ebd5SriastradhTAG(VertexAttribI2i)(GLuint index, GLint x, GLint y)
5913464ebd5Sriastradh{
5923464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
59301e04c3fSmrg   if (is_vertex_position(ctx, index))
5943464ebd5Sriastradh      ATTR2I(0, x, y);
5953464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
5963464ebd5Sriastradh      ATTR2I(VBO_ATTRIB_GENERIC0 + index, x, y);
5973464ebd5Sriastradh   else
5983464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
5993464ebd5Sriastradh}
6003464ebd5Sriastradh
6013464ebd5Sriastradhstatic void GLAPIENTRY
6023464ebd5SriastradhTAG(VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z)
6033464ebd5Sriastradh{
6043464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
60501e04c3fSmrg   if (is_vertex_position(ctx, index))
6063464ebd5Sriastradh      ATTR3I(0, x, y, z);
6073464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
6083464ebd5Sriastradh      ATTR3I(VBO_ATTRIB_GENERIC0 + index, x, y, z);
6093464ebd5Sriastradh   else
6103464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
6113464ebd5Sriastradh}
6123464ebd5Sriastradh
6133464ebd5Sriastradhstatic void GLAPIENTRY
6143464ebd5SriastradhTAG(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w)
6153464ebd5Sriastradh{
6163464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
61701e04c3fSmrg   if (is_vertex_position(ctx, index))
6183464ebd5Sriastradh      ATTR4I(0, x, y, z, w);
6193464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
6203464ebd5Sriastradh      ATTR4I(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
6213464ebd5Sriastradh   else
6223464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
6233464ebd5Sriastradh}
6243464ebd5Sriastradh
6253464ebd5Sriastradhstatic void GLAPIENTRY
6263464ebd5SriastradhTAG(VertexAttribI2iv)(GLuint index, const GLint *v)
6273464ebd5Sriastradh{
6283464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
62901e04c3fSmrg   if (is_vertex_position(ctx, index))
6303464ebd5Sriastradh      ATTR2IV(0, v);
6313464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
6323464ebd5Sriastradh      ATTR2IV(VBO_ATTRIB_GENERIC0 + index, v);
6333464ebd5Sriastradh   else
6343464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
6357117f1b4Smrg}
6367117f1b4Smrg
6373464ebd5Sriastradhstatic void GLAPIENTRY
6383464ebd5SriastradhTAG(VertexAttribI3iv)(GLuint index, const GLint *v)
6393464ebd5Sriastradh{
6403464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
64101e04c3fSmrg   if (is_vertex_position(ctx, index))
6423464ebd5Sriastradh      ATTR3IV(0, v);
6433464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
6443464ebd5Sriastradh      ATTR3IV(VBO_ATTRIB_GENERIC0 + index, v);
6453464ebd5Sriastradh   else
6463464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
6473464ebd5Sriastradh}
6483464ebd5Sriastradh
6493464ebd5Sriastradhstatic void GLAPIENTRY
6503464ebd5SriastradhTAG(VertexAttribI4iv)(GLuint index, const GLint *v)
6513464ebd5Sriastradh{
6523464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
65301e04c3fSmrg   if (is_vertex_position(ctx, index))
6543464ebd5Sriastradh      ATTR4IV(0, v);
6553464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
6563464ebd5Sriastradh      ATTR4IV(VBO_ATTRIB_GENERIC0 + index, v);
6573464ebd5Sriastradh   else
6583464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
6593464ebd5Sriastradh}
6603464ebd5Sriastradh
6613464ebd5Sriastradh
6623464ebd5Sriastradh
6633464ebd5Sriastradh/* Unsigned integer-valued generic attributes.
6643464ebd5Sriastradh * XXX: the integers just get converted to floats at this time
6653464ebd5Sriastradh */
6663464ebd5Sriastradhstatic void GLAPIENTRY
6673464ebd5SriastradhTAG(VertexAttribI1ui)(GLuint index, GLuint x)
6683464ebd5Sriastradh{
6693464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
67001e04c3fSmrg   if (is_vertex_position(ctx, index))
6713464ebd5Sriastradh      ATTR1UI(0, x);
6723464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
6733464ebd5Sriastradh      ATTR1UI(VBO_ATTRIB_GENERIC0 + index, x);
6743464ebd5Sriastradh   else
6753464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
6763464ebd5Sriastradh}
6773464ebd5Sriastradh
6783464ebd5Sriastradhstatic void GLAPIENTRY
6793464ebd5SriastradhTAG(VertexAttribI2ui)(GLuint index, GLuint x, GLuint y)
6803464ebd5Sriastradh{
6813464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
68201e04c3fSmrg   if (is_vertex_position(ctx, index))
6833464ebd5Sriastradh      ATTR2UI(0, x, y);
6843464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
6853464ebd5Sriastradh      ATTR2UI(VBO_ATTRIB_GENERIC0 + index, x, y);
6863464ebd5Sriastradh   else
6873464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
6883464ebd5Sriastradh}
6893464ebd5Sriastradh
6903464ebd5Sriastradhstatic void GLAPIENTRY
6913464ebd5SriastradhTAG(VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z)
6923464ebd5Sriastradh{
6933464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
69401e04c3fSmrg   if (is_vertex_position(ctx, index))
6953464ebd5Sriastradh      ATTR3UI(0, x, y, z);
6963464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
6973464ebd5Sriastradh      ATTR3UI(VBO_ATTRIB_GENERIC0 + index, x, y, z);
6983464ebd5Sriastradh   else
6993464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
7003464ebd5Sriastradh}
7013464ebd5Sriastradh
7023464ebd5Sriastradhstatic void GLAPIENTRY
7033464ebd5SriastradhTAG(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
7043464ebd5Sriastradh{
7053464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
70601e04c3fSmrg   if (is_vertex_position(ctx, index))
7073464ebd5Sriastradh      ATTR4UI(0, x, y, z, w);
7083464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
7093464ebd5Sriastradh      ATTR4UI(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
7103464ebd5Sriastradh   else
7113464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
7123464ebd5Sriastradh}
7133464ebd5Sriastradh
7143464ebd5Sriastradhstatic void GLAPIENTRY
7153464ebd5SriastradhTAG(VertexAttribI2uiv)(GLuint index, const GLuint *v)
7163464ebd5Sriastradh{
7173464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
71801e04c3fSmrg   if (is_vertex_position(ctx, index))
7193464ebd5Sriastradh      ATTR2UIV(0, v);
7203464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
7213464ebd5Sriastradh      ATTR2UIV(VBO_ATTRIB_GENERIC0 + index, v);
7223464ebd5Sriastradh   else
7233464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
7243464ebd5Sriastradh}
7253464ebd5Sriastradh
7263464ebd5Sriastradhstatic void GLAPIENTRY
7273464ebd5SriastradhTAG(VertexAttribI3uiv)(GLuint index, const GLuint *v)
7283464ebd5Sriastradh{
7293464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
73001e04c3fSmrg   if (is_vertex_position(ctx, index))
7313464ebd5Sriastradh      ATTR3UIV(0, v);
7323464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
7333464ebd5Sriastradh      ATTR3UIV(VBO_ATTRIB_GENERIC0 + index, v);
7343464ebd5Sriastradh   else
7353464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
7363464ebd5Sriastradh}
7373464ebd5Sriastradh
7383464ebd5Sriastradhstatic void GLAPIENTRY
7393464ebd5SriastradhTAG(VertexAttribI4uiv)(GLuint index, const GLuint *v)
7403464ebd5Sriastradh{
7413464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
74201e04c3fSmrg   if (is_vertex_position(ctx, index))
7433464ebd5Sriastradh      ATTR4UIV(0, v);
7443464ebd5Sriastradh   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
7453464ebd5Sriastradh      ATTR4UIV(VBO_ATTRIB_GENERIC0 + index, v);
7463464ebd5Sriastradh   else
7473464ebd5Sriastradh      ERROR(GL_INVALID_VALUE);
7483464ebd5Sriastradh}
7493464ebd5Sriastradh
7503464ebd5Sriastradh
7517117f1b4Smrg
75201e04c3fSmrg/* These entrypoints are no longer used for NV_vertex_program but they are
75301e04c3fSmrg * used by the display list and other code specifically because of their
75401e04c3fSmrg * property of aliasing with the legacy Vertex, TexCoord, Normal, etc
75501e04c3fSmrg * attributes.  (See vbo_save_loopback.c)
7567117f1b4Smrg */
7573464ebd5Sriastradhstatic void GLAPIENTRY
7583464ebd5SriastradhTAG(VertexAttrib1fNV)(GLuint index, GLfloat x)
7597117f1b4Smrg{
7603464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
7617117f1b4Smrg   if (index < VBO_ATTRIB_MAX)
7627117f1b4Smrg      ATTR1F(index, x);
7637117f1b4Smrg}
7647117f1b4Smrg
7653464ebd5Sriastradhstatic void GLAPIENTRY
7663464ebd5SriastradhTAG(VertexAttrib1fvNV)(GLuint index, const GLfloat * v)
7677117f1b4Smrg{
7683464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
7693464ebd5Sriastradh   if (index < VBO_ATTRIB_MAX)
7707117f1b4Smrg      ATTR1FV(index, v);
7717117f1b4Smrg}
7727117f1b4Smrg
7733464ebd5Sriastradhstatic void GLAPIENTRY
7743464ebd5SriastradhTAG(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y)
7757117f1b4Smrg{
7763464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
7773464ebd5Sriastradh   if (index < VBO_ATTRIB_MAX)
7787117f1b4Smrg      ATTR2F(index, x, y);
7797117f1b4Smrg}
7807117f1b4Smrg
7813464ebd5Sriastradhstatic void GLAPIENTRY
7823464ebd5SriastradhTAG(VertexAttrib2fvNV)(GLuint index, const GLfloat * v)
7837117f1b4Smrg{
7843464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
7853464ebd5Sriastradh   if (index < VBO_ATTRIB_MAX)
7867117f1b4Smrg      ATTR2FV(index, v);
7877117f1b4Smrg}
7887117f1b4Smrg
7893464ebd5Sriastradhstatic void GLAPIENTRY
7903464ebd5SriastradhTAG(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
7917117f1b4Smrg{
7923464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
7933464ebd5Sriastradh   if (index < VBO_ATTRIB_MAX)
7947117f1b4Smrg      ATTR3F(index, x, y, z);
7957117f1b4Smrg}
7967117f1b4Smrg
7973464ebd5Sriastradhstatic void GLAPIENTRY
7983464ebd5SriastradhTAG(VertexAttrib3fvNV)(GLuint index,
7993464ebd5Sriastradh const GLfloat * v)
8007117f1b4Smrg{
8013464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
8023464ebd5Sriastradh   if (index < VBO_ATTRIB_MAX)
8037117f1b4Smrg      ATTR3FV(index, v);
8047117f1b4Smrg}
8057117f1b4Smrg
8063464ebd5Sriastradhstatic void GLAPIENTRY
8073464ebd5SriastradhTAG(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
8087117f1b4Smrg{
8093464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
8103464ebd5Sriastradh   if (index < VBO_ATTRIB_MAX)
8117117f1b4Smrg      ATTR4F(index, x, y, z, w);
8127117f1b4Smrg}
8137117f1b4Smrg
8143464ebd5Sriastradhstatic void GLAPIENTRY
8153464ebd5SriastradhTAG(VertexAttrib4fvNV)(GLuint index, const GLfloat * v)
8167117f1b4Smrg{
8173464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
8183464ebd5Sriastradh   if (index < VBO_ATTRIB_MAX)
8197117f1b4Smrg      ATTR4FV(index, v);
8207117f1b4Smrg}
8217117f1b4Smrg
822af69d88dSmrgstatic void GLAPIENTRY
823af69d88dSmrgTAG(VertexP2ui)(GLenum type, GLuint value)
824af69d88dSmrg{
825af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
826af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glVertexP2ui");
827af69d88dSmrg   ATTR_UI(ctx, 2, type, 0, VBO_ATTRIB_POS, value);
828af69d88dSmrg}
8297117f1b4Smrg
8303464ebd5Sriastradhstatic void GLAPIENTRY
831af69d88dSmrgTAG(VertexP2uiv)(GLenum type, const GLuint *value)
8327117f1b4Smrg{
8333464ebd5Sriastradh   GET_CURRENT_CONTEXT(ctx);
834af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glVertexP2uiv");
835af69d88dSmrg   ATTR_UI(ctx, 2, type, 0, VBO_ATTRIB_POS, value[0]);
836af69d88dSmrg}
8373464ebd5Sriastradh
838af69d88dSmrgstatic void GLAPIENTRY
839af69d88dSmrgTAG(VertexP3ui)(GLenum type, GLuint value)
840af69d88dSmrg{
841af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
842af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glVertexP3ui");
843af69d88dSmrg   ATTR_UI(ctx, 3, type, 0, VBO_ATTRIB_POS, value);
844af69d88dSmrg}
8453464ebd5Sriastradh
846af69d88dSmrgstatic void GLAPIENTRY
847af69d88dSmrgTAG(VertexP3uiv)(GLenum type, const GLuint *value)
848af69d88dSmrg{
849af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
850af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glVertexP3uiv");
851af69d88dSmrg   ATTR_UI(ctx, 3, type, 0, VBO_ATTRIB_POS, value[0]);
852af69d88dSmrg}
853af69d88dSmrg
854af69d88dSmrgstatic void GLAPIENTRY
855af69d88dSmrgTAG(VertexP4ui)(GLenum type, GLuint value)
856af69d88dSmrg{
857af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
858af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glVertexP4ui");
859af69d88dSmrg   ATTR_UI(ctx, 4, type, 0, VBO_ATTRIB_POS, value);
860af69d88dSmrg}
861af69d88dSmrg
862af69d88dSmrgstatic void GLAPIENTRY
863af69d88dSmrgTAG(VertexP4uiv)(GLenum type, const GLuint *value)
864af69d88dSmrg{
865af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
866af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glVertexP4uiv");
867af69d88dSmrg   ATTR_UI(ctx, 4, type, 0, VBO_ATTRIB_POS, value[0]);
868af69d88dSmrg}
869af69d88dSmrg
870af69d88dSmrgstatic void GLAPIENTRY
871af69d88dSmrgTAG(TexCoordP1ui)(GLenum type, GLuint coords)
872af69d88dSmrg{
873af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
874af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glTexCoordP1ui");
875af69d88dSmrg   ATTR_UI(ctx, 1, type, 0, VBO_ATTRIB_TEX0, coords);
876af69d88dSmrg}
877af69d88dSmrg
878af69d88dSmrgstatic void GLAPIENTRY
879af69d88dSmrgTAG(TexCoordP1uiv)(GLenum type, const GLuint *coords)
880af69d88dSmrg{
881af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
882af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glTexCoordP1uiv");
883af69d88dSmrg   ATTR_UI(ctx, 1, type, 0, VBO_ATTRIB_TEX0, coords[0]);
884af69d88dSmrg}
885af69d88dSmrg
886af69d88dSmrgstatic void GLAPIENTRY
887af69d88dSmrgTAG(TexCoordP2ui)(GLenum type, GLuint coords)
888af69d88dSmrg{
889af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
890af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glTexCoordP2ui");
891af69d88dSmrg   ATTR_UI(ctx, 2, type, 0, VBO_ATTRIB_TEX0, coords);
892af69d88dSmrg}
893af69d88dSmrg
894af69d88dSmrgstatic void GLAPIENTRY
895af69d88dSmrgTAG(TexCoordP2uiv)(GLenum type, const GLuint *coords)
896af69d88dSmrg{
897af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
898af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glTexCoordP2uiv");
899af69d88dSmrg   ATTR_UI(ctx, 2, type, 0, VBO_ATTRIB_TEX0, coords[0]);
900af69d88dSmrg}
901af69d88dSmrg
902af69d88dSmrgstatic void GLAPIENTRY
903af69d88dSmrgTAG(TexCoordP3ui)(GLenum type, GLuint coords)
904af69d88dSmrg{
905af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
906af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glTexCoordP3ui");
907af69d88dSmrg   ATTR_UI(ctx, 3, type, 0, VBO_ATTRIB_TEX0, coords);
908af69d88dSmrg}
909af69d88dSmrg
910af69d88dSmrgstatic void GLAPIENTRY
911af69d88dSmrgTAG(TexCoordP3uiv)(GLenum type, const GLuint *coords)
912af69d88dSmrg{
913af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
914af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glTexCoordP3uiv");
915af69d88dSmrg   ATTR_UI(ctx, 3, type, 0, VBO_ATTRIB_TEX0, coords[0]);
916af69d88dSmrg}
917af69d88dSmrg
918af69d88dSmrgstatic void GLAPIENTRY
919af69d88dSmrgTAG(TexCoordP4ui)(GLenum type, GLuint coords)
920af69d88dSmrg{
921af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
922af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glTexCoordP4ui");
923af69d88dSmrg   ATTR_UI(ctx, 4, type, 0, VBO_ATTRIB_TEX0, coords);
924af69d88dSmrg}
925af69d88dSmrg
926af69d88dSmrgstatic void GLAPIENTRY
927af69d88dSmrgTAG(TexCoordP4uiv)(GLenum type, const GLuint *coords)
928af69d88dSmrg{
929af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
930af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glTexCoordP4uiv");
931af69d88dSmrg   ATTR_UI(ctx, 4, type, 0, VBO_ATTRIB_TEX0, coords[0]);
932af69d88dSmrg}
933af69d88dSmrg
934af69d88dSmrgstatic void GLAPIENTRY
935af69d88dSmrgTAG(MultiTexCoordP1ui)(GLenum target, GLenum type, GLuint coords)
936af69d88dSmrg{
937af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
938af69d88dSmrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
939af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP1ui");
940af69d88dSmrg   ATTR_UI(ctx, 1, type, 0, attr, coords);
941af69d88dSmrg}
942af69d88dSmrg
943af69d88dSmrgstatic void GLAPIENTRY
944af69d88dSmrgTAG(MultiTexCoordP1uiv)(GLenum target, GLenum type, const GLuint *coords)
945af69d88dSmrg{
946af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
947af69d88dSmrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
948af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP1uiv");
949af69d88dSmrg   ATTR_UI(ctx, 1, type, 0, attr, coords[0]);
950af69d88dSmrg}
951af69d88dSmrg
952af69d88dSmrgstatic void GLAPIENTRY
953af69d88dSmrgTAG(MultiTexCoordP2ui)(GLenum target, GLenum type, GLuint coords)
954af69d88dSmrg{
955af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
956af69d88dSmrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
957af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP2ui");
958af69d88dSmrg   ATTR_UI(ctx, 2, type, 0, attr, coords);
959af69d88dSmrg}
960af69d88dSmrg
961af69d88dSmrgstatic void GLAPIENTRY
962af69d88dSmrgTAG(MultiTexCoordP2uiv)(GLenum target, GLenum type, const GLuint *coords)
963af69d88dSmrg{
964af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
965af69d88dSmrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
966af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP2uiv");
967af69d88dSmrg   ATTR_UI(ctx, 2, type, 0, attr, coords[0]);
968af69d88dSmrg}
969af69d88dSmrg
970af69d88dSmrgstatic void GLAPIENTRY
971af69d88dSmrgTAG(MultiTexCoordP3ui)(GLenum target, GLenum type, GLuint coords)
972af69d88dSmrg{
973af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
974af69d88dSmrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
975af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP3ui");
976af69d88dSmrg   ATTR_UI(ctx, 3, type, 0, attr, coords);
977af69d88dSmrg}
978af69d88dSmrg
979af69d88dSmrgstatic void GLAPIENTRY
980af69d88dSmrgTAG(MultiTexCoordP3uiv)(GLenum target, GLenum type, const GLuint *coords)
981af69d88dSmrg{
982af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
983af69d88dSmrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
984af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP3uiv");
985af69d88dSmrg   ATTR_UI(ctx, 3, type, 0, attr, coords[0]);
986af69d88dSmrg}
987af69d88dSmrg
988af69d88dSmrgstatic void GLAPIENTRY
989af69d88dSmrgTAG(MultiTexCoordP4ui)(GLenum target, GLenum type, GLuint coords)
990af69d88dSmrg{
991af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
992af69d88dSmrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
993af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP4ui");
994af69d88dSmrg   ATTR_UI(ctx, 4, type, 0, attr, coords);
995af69d88dSmrg}
996af69d88dSmrg
997af69d88dSmrgstatic void GLAPIENTRY
998af69d88dSmrgTAG(MultiTexCoordP4uiv)(GLenum target, GLenum type, const GLuint *coords)
999af69d88dSmrg{
1000af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1001af69d88dSmrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
1002af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP4uiv");
1003af69d88dSmrg   ATTR_UI(ctx, 4, type, 0, attr, coords[0]);
1004af69d88dSmrg}
1005af69d88dSmrg
1006af69d88dSmrgstatic void GLAPIENTRY
1007af69d88dSmrgTAG(NormalP3ui)(GLenum type, GLuint coords)
1008af69d88dSmrg{
1009af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1010af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glNormalP3ui");
1011af69d88dSmrg   ATTR_UI(ctx, 3, type, 1, VBO_ATTRIB_NORMAL, coords);
1012af69d88dSmrg}
1013af69d88dSmrg
1014af69d88dSmrgstatic void GLAPIENTRY
1015af69d88dSmrgTAG(NormalP3uiv)(GLenum type, const GLuint *coords)
1016af69d88dSmrg{
1017af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1018af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glNormalP3uiv");
1019af69d88dSmrg   ATTR_UI(ctx, 3, type, 1, VBO_ATTRIB_NORMAL, coords[0]);
1020af69d88dSmrg}
1021af69d88dSmrg
1022af69d88dSmrgstatic void GLAPIENTRY
1023af69d88dSmrgTAG(ColorP3ui)(GLenum type, GLuint color)
1024af69d88dSmrg{
1025af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1026af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glColorP3ui");
1027af69d88dSmrg   ATTR_UI(ctx, 3, type, 1, VBO_ATTRIB_COLOR0, color);
1028af69d88dSmrg}
1029af69d88dSmrg
1030af69d88dSmrgstatic void GLAPIENTRY
1031af69d88dSmrgTAG(ColorP3uiv)(GLenum type, const GLuint *color)
1032af69d88dSmrg{
1033af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1034af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glColorP3uiv");
1035af69d88dSmrg   ATTR_UI(ctx, 3, type, 1, VBO_ATTRIB_COLOR0, color[0]);
1036af69d88dSmrg}
1037af69d88dSmrg
1038af69d88dSmrgstatic void GLAPIENTRY
1039af69d88dSmrgTAG(ColorP4ui)(GLenum type, GLuint color)
1040af69d88dSmrg{
1041af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1042af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glColorP4ui");
1043af69d88dSmrg   ATTR_UI(ctx, 4, type, 1, VBO_ATTRIB_COLOR0, color);
1044af69d88dSmrg}
1045af69d88dSmrg
1046af69d88dSmrgstatic void GLAPIENTRY
1047af69d88dSmrgTAG(ColorP4uiv)(GLenum type, const GLuint *color)
1048af69d88dSmrg{
1049af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1050af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glColorP4uiv");
1051af69d88dSmrg   ATTR_UI(ctx, 4, type, 1, VBO_ATTRIB_COLOR0, color[0]);
1052af69d88dSmrg}
1053af69d88dSmrg
1054af69d88dSmrgstatic void GLAPIENTRY
1055af69d88dSmrgTAG(SecondaryColorP3ui)(GLenum type, GLuint color)
1056af69d88dSmrg{
1057af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1058af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glSecondaryColorP3ui");
1059af69d88dSmrg   ATTR_UI(ctx, 3, type, 1, VBO_ATTRIB_COLOR1, color);
1060af69d88dSmrg}
1061af69d88dSmrg
1062af69d88dSmrgstatic void GLAPIENTRY
1063af69d88dSmrgTAG(SecondaryColorP3uiv)(GLenum type, const GLuint *color)
1064af69d88dSmrg{
1065af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1066af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glSecondaryColorP3uiv");
1067af69d88dSmrg   ATTR_UI(ctx, 3, type, 1, VBO_ATTRIB_COLOR1, color[0]);
1068af69d88dSmrg}
1069af69d88dSmrg
1070af69d88dSmrgstatic void GLAPIENTRY
1071af69d88dSmrgTAG(VertexAttribP1ui)(GLuint index, GLenum type, GLboolean normalized,
1072af69d88dSmrg		      GLuint value)
1073af69d88dSmrg{
1074af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1075af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE_EXT(ctx, type, "glVertexAttribP1ui");
1076af69d88dSmrg   ATTR_UI_INDEX(ctx, 1, type, normalized, index, value);
1077af69d88dSmrg}
1078af69d88dSmrg
1079af69d88dSmrgstatic void GLAPIENTRY
1080af69d88dSmrgTAG(VertexAttribP2ui)(GLuint index, GLenum type, GLboolean normalized,
1081af69d88dSmrg		      GLuint value)
1082af69d88dSmrg{
1083af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1084af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE_EXT(ctx, type, "glVertexAttribP2ui");
1085af69d88dSmrg   ATTR_UI_INDEX(ctx, 2, type, normalized, index, value);
1086af69d88dSmrg}
1087af69d88dSmrg
1088af69d88dSmrgstatic void GLAPIENTRY
1089af69d88dSmrgTAG(VertexAttribP3ui)(GLuint index, GLenum type, GLboolean normalized,
1090af69d88dSmrg		      GLuint value)
1091af69d88dSmrg{
1092af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1093af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE_EXT(ctx, type, "glVertexAttribP3ui");
1094af69d88dSmrg   ATTR_UI_INDEX(ctx, 3, type, normalized, index, value);
1095af69d88dSmrg}
1096af69d88dSmrg
1097af69d88dSmrgstatic void GLAPIENTRY
1098af69d88dSmrgTAG(VertexAttribP4ui)(GLuint index, GLenum type, GLboolean normalized,
1099af69d88dSmrg		      GLuint value)
1100af69d88dSmrg{
1101af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1102af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glVertexAttribP4ui");
1103af69d88dSmrg   ATTR_UI_INDEX(ctx, 4, type, normalized, index, value);
1104af69d88dSmrg}
1105af69d88dSmrg
1106af69d88dSmrgstatic void GLAPIENTRY
1107af69d88dSmrgTAG(VertexAttribP1uiv)(GLuint index, GLenum type, GLboolean normalized,
1108af69d88dSmrg		       const GLuint *value)
1109af69d88dSmrg{
1110af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1111af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE_EXT(ctx, type, "glVertexAttribP1uiv");
1112af69d88dSmrg   ATTR_UI_INDEX(ctx, 1, type, normalized, index, *value);
1113af69d88dSmrg}
1114af69d88dSmrg
1115af69d88dSmrgstatic void GLAPIENTRY
1116af69d88dSmrgTAG(VertexAttribP2uiv)(GLuint index, GLenum type, GLboolean normalized,
1117af69d88dSmrg		       const GLuint *value)
1118af69d88dSmrg{
1119af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1120af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE_EXT(ctx, type, "glVertexAttribP2uiv");
1121af69d88dSmrg   ATTR_UI_INDEX(ctx, 2, type, normalized, index, *value);
1122af69d88dSmrg}
1123af69d88dSmrg
1124af69d88dSmrgstatic void GLAPIENTRY
1125af69d88dSmrgTAG(VertexAttribP3uiv)(GLuint index, GLenum type, GLboolean normalized,
1126af69d88dSmrg		       const GLuint *value)
1127af69d88dSmrg{
1128af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1129af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE_EXT(ctx, type, "glVertexAttribP3uiv");
1130af69d88dSmrg   ATTR_UI_INDEX(ctx, 3, type, normalized, index, *value);
1131af69d88dSmrg}
1132af69d88dSmrg
1133af69d88dSmrgstatic void GLAPIENTRY
1134af69d88dSmrgTAG(VertexAttribP4uiv)(GLuint index, GLenum type, GLboolean normalized,
1135af69d88dSmrg		      const GLuint *value)
1136af69d88dSmrg{
1137af69d88dSmrg   GET_CURRENT_CONTEXT(ctx);
1138af69d88dSmrg   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glVertexAttribP4uiv");
1139af69d88dSmrg   ATTR_UI_INDEX(ctx, 4, type, normalized, index, *value);
11407117f1b4Smrg}
11417117f1b4Smrg
11427117f1b4Smrg
114301e04c3fSmrg
114401e04c3fSmrgstatic void GLAPIENTRY
114501e04c3fSmrgTAG(VertexAttribL1d)(GLuint index, GLdouble x)
114601e04c3fSmrg{
114701e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
114801e04c3fSmrg   if (is_vertex_position(ctx, index))
114901e04c3fSmrg      ATTR1D(0, x);
115001e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
115101e04c3fSmrg      ATTR1D(VBO_ATTRIB_GENERIC0 + index, x);
115201e04c3fSmrg   else
115301e04c3fSmrg      ERROR(GL_INVALID_VALUE);
115401e04c3fSmrg}
115501e04c3fSmrg
115601e04c3fSmrgstatic void GLAPIENTRY
115701e04c3fSmrgTAG(VertexAttribL1dv)(GLuint index, const GLdouble * v)
115801e04c3fSmrg{
115901e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
116001e04c3fSmrg   if (is_vertex_position(ctx, index))
116101e04c3fSmrg      ATTR1DV(0, v);
116201e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
116301e04c3fSmrg      ATTR1DV(VBO_ATTRIB_GENERIC0 + index, v);
116401e04c3fSmrg   else
116501e04c3fSmrg      ERROR(GL_INVALID_VALUE);
116601e04c3fSmrg}
116701e04c3fSmrg
116801e04c3fSmrgstatic void GLAPIENTRY
116901e04c3fSmrgTAG(VertexAttribL2d)(GLuint index, GLdouble x, GLdouble y)
117001e04c3fSmrg{
117101e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
117201e04c3fSmrg   if (is_vertex_position(ctx, index))
117301e04c3fSmrg      ATTR2D(0, x, y);
117401e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
117501e04c3fSmrg      ATTR2D(VBO_ATTRIB_GENERIC0 + index, x, y);
117601e04c3fSmrg   else
117701e04c3fSmrg      ERROR(GL_INVALID_VALUE);
117801e04c3fSmrg}
117901e04c3fSmrg
118001e04c3fSmrgstatic void GLAPIENTRY
118101e04c3fSmrgTAG(VertexAttribL2dv)(GLuint index, const GLdouble * v)
118201e04c3fSmrg{
118301e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
118401e04c3fSmrg   if (is_vertex_position(ctx, index))
118501e04c3fSmrg      ATTR2DV(0, v);
118601e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
118701e04c3fSmrg      ATTR2DV(VBO_ATTRIB_GENERIC0 + index, v);
118801e04c3fSmrg   else
118901e04c3fSmrg      ERROR(GL_INVALID_VALUE);
119001e04c3fSmrg}
119101e04c3fSmrg
119201e04c3fSmrgstatic void GLAPIENTRY
119301e04c3fSmrgTAG(VertexAttribL3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z)
119401e04c3fSmrg{
119501e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
119601e04c3fSmrg   if (is_vertex_position(ctx, index))
119701e04c3fSmrg      ATTR3D(0, x, y, z);
119801e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
119901e04c3fSmrg      ATTR3D(VBO_ATTRIB_GENERIC0 + index, x, y, z);
120001e04c3fSmrg   else
120101e04c3fSmrg      ERROR(GL_INVALID_VALUE);
120201e04c3fSmrg}
120301e04c3fSmrg
120401e04c3fSmrgstatic void GLAPIENTRY
120501e04c3fSmrgTAG(VertexAttribL3dv)(GLuint index, const GLdouble * v)
120601e04c3fSmrg{
120701e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
120801e04c3fSmrg   if (is_vertex_position(ctx, index))
120901e04c3fSmrg      ATTR3DV(0, v);
121001e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
121101e04c3fSmrg      ATTR3DV(VBO_ATTRIB_GENERIC0 + index, v);
121201e04c3fSmrg   else
121301e04c3fSmrg      ERROR(GL_INVALID_VALUE);
121401e04c3fSmrg}
121501e04c3fSmrg
121601e04c3fSmrgstatic void GLAPIENTRY
121701e04c3fSmrgTAG(VertexAttribL4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
121801e04c3fSmrg{
121901e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
122001e04c3fSmrg   if (is_vertex_position(ctx, index))
122101e04c3fSmrg      ATTR4D(0, x, y, z, w);
122201e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
122301e04c3fSmrg      ATTR4D(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
122401e04c3fSmrg   else
122501e04c3fSmrg      ERROR(GL_INVALID_VALUE);
122601e04c3fSmrg}
122701e04c3fSmrg
122801e04c3fSmrgstatic void GLAPIENTRY
122901e04c3fSmrgTAG(VertexAttribL4dv)(GLuint index, const GLdouble * v)
123001e04c3fSmrg{
123101e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
123201e04c3fSmrg   if (is_vertex_position(ctx, index))
123301e04c3fSmrg      ATTR4DV(0, v);
123401e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
123501e04c3fSmrg      ATTR4DV(VBO_ATTRIB_GENERIC0 + index, v);
123601e04c3fSmrg   else
123701e04c3fSmrg      ERROR(GL_INVALID_VALUE);
123801e04c3fSmrg}
123901e04c3fSmrg
124001e04c3fSmrgstatic void GLAPIENTRY
124101e04c3fSmrgTAG(VertexAttribL1ui64ARB)(GLuint index, GLuint64EXT x)
124201e04c3fSmrg{
124301e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
124401e04c3fSmrg   if (is_vertex_position(ctx, index))
124501e04c3fSmrg      ATTR1UI64(0, x);
124601e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
124701e04c3fSmrg      ATTR1UI64(VBO_ATTRIB_GENERIC0 + index, x);
124801e04c3fSmrg   else
124901e04c3fSmrg      ERROR(GL_INVALID_VALUE);
125001e04c3fSmrg}
125101e04c3fSmrg
125201e04c3fSmrgstatic void GLAPIENTRY
125301e04c3fSmrgTAG(VertexAttribL1ui64vARB)(GLuint index, const GLuint64EXT *v)
125401e04c3fSmrg{
125501e04c3fSmrg   GET_CURRENT_CONTEXT(ctx);
125601e04c3fSmrg   if (is_vertex_position(ctx, index))
125701e04c3fSmrg      ATTR1UIV64(0, v);
125801e04c3fSmrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
125901e04c3fSmrg      ATTR1UIV64(VBO_ATTRIB_GENERIC0 + index, v);
126001e04c3fSmrg   else
126101e04c3fSmrg      ERROR(GL_INVALID_VALUE);
126201e04c3fSmrg}
126301e04c3fSmrg
12647ec681f3Smrg/* GL_NV_half_float */
12657ec681f3Smrgstatic void GLAPIENTRY
12667ec681f3SmrgTAG(Vertex2hNV)(GLhalfNV x, GLhalfNV y)
12677ec681f3Smrg{
12687ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
12697ec681f3Smrg   ATTR2H(VBO_ATTRIB_POS, x, y);
12707ec681f3Smrg}
12717ec681f3Smrg
12727ec681f3Smrgstatic void GLAPIENTRY
12737ec681f3SmrgTAG(Vertex2hvNV)(const GLhalfNV * v)
12747ec681f3Smrg{
12757ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
12767ec681f3Smrg   ATTR2HV(VBO_ATTRIB_POS, v);
12777ec681f3Smrg}
12787ec681f3Smrg
12797ec681f3Smrgstatic void GLAPIENTRY
12807ec681f3SmrgTAG(Vertex3hNV)(GLhalfNV x, GLhalfNV y, GLhalfNV z)
12817ec681f3Smrg{
12827ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
12837ec681f3Smrg   ATTR3H(VBO_ATTRIB_POS, x, y, z);
12847ec681f3Smrg}
12857ec681f3Smrg
12867ec681f3Smrgstatic void GLAPIENTRY
12877ec681f3SmrgTAG(Vertex3hvNV)(const GLhalfNV * v)
12887ec681f3Smrg{
12897ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
12907ec681f3Smrg   ATTR3HV(VBO_ATTRIB_POS, v);
12917ec681f3Smrg}
12927ec681f3Smrg
12937ec681f3Smrgstatic void GLAPIENTRY
12947ec681f3SmrgTAG(Vertex4hNV)(GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w)
12957ec681f3Smrg{
12967ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
12977ec681f3Smrg   ATTR4H(VBO_ATTRIB_POS, x, y, z, w);
12987ec681f3Smrg}
12997ec681f3Smrg
13007ec681f3Smrgstatic void GLAPIENTRY
13017ec681f3SmrgTAG(Vertex4hvNV)(const GLhalfNV * v)
13027ec681f3Smrg{
13037ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13047ec681f3Smrg   ATTR4HV(VBO_ATTRIB_POS, v);
13057ec681f3Smrg}
13067ec681f3Smrg
13077ec681f3Smrg
13087ec681f3Smrg
13097ec681f3Smrgstatic void GLAPIENTRY
13107ec681f3SmrgTAG(Normal3hNV)(GLhalfNV x, GLhalfNV y, GLhalfNV z)
13117ec681f3Smrg{
13127ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13137ec681f3Smrg   ATTR3H(VBO_ATTRIB_NORMAL, x, y, z);
13147ec681f3Smrg}
13157ec681f3Smrg
13167ec681f3Smrgstatic void GLAPIENTRY
13177ec681f3SmrgTAG(Normal3hvNV)(const GLhalfNV * v)
13187ec681f3Smrg{
13197ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13207ec681f3Smrg   ATTR3HV(VBO_ATTRIB_NORMAL, v);
13217ec681f3Smrg}
13227ec681f3Smrg
13237ec681f3Smrg
13247ec681f3Smrg
13257ec681f3Smrgstatic void GLAPIENTRY
13267ec681f3SmrgTAG(Color3hNV)(GLhalfNV x, GLhalfNV y, GLhalfNV z)
13277ec681f3Smrg{
13287ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13297ec681f3Smrg   ATTR3H(VBO_ATTRIB_COLOR0, x, y, z);
13307ec681f3Smrg}
13317ec681f3Smrg
13327ec681f3Smrgstatic void GLAPIENTRY
13337ec681f3SmrgTAG(Color3hvNV)(const GLhalfNV * v)
13347ec681f3Smrg{
13357ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13367ec681f3Smrg   ATTR3HV(VBO_ATTRIB_COLOR0, v);
13377ec681f3Smrg}
13387ec681f3Smrg
13397ec681f3Smrgstatic void GLAPIENTRY
13407ec681f3SmrgTAG(Color4hNV)(GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w)
13417ec681f3Smrg{
13427ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13437ec681f3Smrg   ATTR4H(VBO_ATTRIB_COLOR0, x, y, z, w);
13447ec681f3Smrg}
13457ec681f3Smrg
13467ec681f3Smrgstatic void GLAPIENTRY
13477ec681f3SmrgTAG(Color4hvNV)(const GLhalfNV * v)
13487ec681f3Smrg{
13497ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13507ec681f3Smrg   ATTR4HV(VBO_ATTRIB_COLOR0, v);
13517ec681f3Smrg}
13527ec681f3Smrg
13537ec681f3Smrg
13547ec681f3Smrg
13557ec681f3Smrgstatic void GLAPIENTRY
13567ec681f3SmrgTAG(TexCoord1hNV)(GLhalfNV x)
13577ec681f3Smrg{
13587ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13597ec681f3Smrg   ATTR1H(VBO_ATTRIB_TEX0, x);
13607ec681f3Smrg}
13617ec681f3Smrg
13627ec681f3Smrgstatic void GLAPIENTRY
13637ec681f3SmrgTAG(TexCoord1hvNV)(const GLhalfNV * v)
13647ec681f3Smrg{
13657ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13667ec681f3Smrg   ATTR1HV(VBO_ATTRIB_TEX0, v);
13677ec681f3Smrg}
13687ec681f3Smrg
13697ec681f3Smrgstatic void GLAPIENTRY
13707ec681f3SmrgTAG(TexCoord2hNV)(GLhalfNV x, GLhalfNV y)
13717ec681f3Smrg{
13727ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13737ec681f3Smrg   ATTR2H(VBO_ATTRIB_TEX0, x, y);
13747ec681f3Smrg}
13757ec681f3Smrg
13767ec681f3Smrgstatic void GLAPIENTRY
13777ec681f3SmrgTAG(TexCoord2hvNV)(const GLhalfNV * v)
13787ec681f3Smrg{
13797ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13807ec681f3Smrg   ATTR2HV(VBO_ATTRIB_TEX0, v);
13817ec681f3Smrg}
13827ec681f3Smrg
13837ec681f3Smrgstatic void GLAPIENTRY
13847ec681f3SmrgTAG(TexCoord3hNV)(GLhalfNV x, GLhalfNV y, GLhalfNV z)
13857ec681f3Smrg{
13867ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13877ec681f3Smrg   ATTR3H(VBO_ATTRIB_TEX0, x, y, z);
13887ec681f3Smrg}
13897ec681f3Smrg
13907ec681f3Smrgstatic void GLAPIENTRY
13917ec681f3SmrgTAG(TexCoord3hvNV)(const GLhalfNV * v)
13927ec681f3Smrg{
13937ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
13947ec681f3Smrg   ATTR3HV(VBO_ATTRIB_TEX0, v);
13957ec681f3Smrg}
13967ec681f3Smrg
13977ec681f3Smrgstatic void GLAPIENTRY
13987ec681f3SmrgTAG(TexCoord4hNV)(GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w)
13997ec681f3Smrg{
14007ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14017ec681f3Smrg   ATTR4H(VBO_ATTRIB_TEX0, x, y, z, w);
14027ec681f3Smrg}
14037ec681f3Smrg
14047ec681f3Smrgstatic void GLAPIENTRY
14057ec681f3SmrgTAG(TexCoord4hvNV)(const GLhalfNV * v)
14067ec681f3Smrg{
14077ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14087ec681f3Smrg   ATTR4HV(VBO_ATTRIB_TEX0, v);
14097ec681f3Smrg}
14107ec681f3Smrg
14117ec681f3Smrg
14127ec681f3Smrg
14137ec681f3Smrgstatic void GLAPIENTRY
14147ec681f3SmrgTAG(MultiTexCoord1hNV)(GLenum target, GLhalfNV x)
14157ec681f3Smrg{
14167ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14177ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
14187ec681f3Smrg   ATTR1H(attr, x);
14197ec681f3Smrg}
14207ec681f3Smrg
14217ec681f3Smrgstatic void GLAPIENTRY
14227ec681f3SmrgTAG(MultiTexCoord1hvNV)(GLenum target, const GLhalfNV * v)
14237ec681f3Smrg{
14247ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14257ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
14267ec681f3Smrg   ATTR1HV(attr, v);
14277ec681f3Smrg}
14287ec681f3Smrg
14297ec681f3Smrgstatic void GLAPIENTRY
14307ec681f3SmrgTAG(MultiTexCoord2hNV)(GLenum target, GLhalfNV x, GLhalfNV y)
14317ec681f3Smrg{
14327ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14337ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
14347ec681f3Smrg   ATTR2H(attr, x, y);
14357ec681f3Smrg}
14367ec681f3Smrg
14377ec681f3Smrgstatic void GLAPIENTRY
14387ec681f3SmrgTAG(MultiTexCoord2hvNV)(GLenum target, const GLhalfNV * v)
14397ec681f3Smrg{
14407ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14417ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
14427ec681f3Smrg   ATTR2HV(attr, v);
14437ec681f3Smrg}
14447ec681f3Smrg
14457ec681f3Smrgstatic void GLAPIENTRY
14467ec681f3SmrgTAG(MultiTexCoord3hNV)(GLenum target, GLhalfNV x, GLhalfNV y, GLhalfNV z)
14477ec681f3Smrg{
14487ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14497ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
14507ec681f3Smrg   ATTR3H(attr, x, y, z);
14517ec681f3Smrg}
14527ec681f3Smrg
14537ec681f3Smrgstatic void GLAPIENTRY
14547ec681f3SmrgTAG(MultiTexCoord3hvNV)(GLenum target, const GLhalfNV * v)
14557ec681f3Smrg{
14567ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14577ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
14587ec681f3Smrg   ATTR3HV(attr, v);
14597ec681f3Smrg}
14607ec681f3Smrg
14617ec681f3Smrgstatic void GLAPIENTRY
14627ec681f3SmrgTAG(MultiTexCoord4hNV)(GLenum target, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w)
14637ec681f3Smrg{
14647ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14657ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
14667ec681f3Smrg   ATTR4H(attr, x, y, z, w);
14677ec681f3Smrg}
14687ec681f3Smrg
14697ec681f3Smrgstatic void GLAPIENTRY
14707ec681f3SmrgTAG(MultiTexCoord4hvNV)(GLenum target, const GLhalfNV * v)
14717ec681f3Smrg{
14727ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14737ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
14747ec681f3Smrg   ATTR4HV(attr, v);
14757ec681f3Smrg}
14767ec681f3Smrg
14777ec681f3Smrg
14787ec681f3Smrg
14797ec681f3Smrgstatic void GLAPIENTRY
14807ec681f3SmrgTAG(VertexAttrib1hNV)(GLuint index, GLhalfNV x)
14817ec681f3Smrg{
14827ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14837ec681f3Smrg   if (is_vertex_position(ctx, index))
14847ec681f3Smrg      ATTR1H(0, x);
14857ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
14867ec681f3Smrg      ATTR1H(VBO_ATTRIB_GENERIC0 + index, x);
14877ec681f3Smrg   else
14887ec681f3Smrg      ERROR(GL_INVALID_VALUE);
14897ec681f3Smrg}
14907ec681f3Smrg
14917ec681f3Smrgstatic void GLAPIENTRY
14927ec681f3SmrgTAG(VertexAttrib2hNV)(GLuint index, GLhalfNV x, GLhalfNV y)
14937ec681f3Smrg{
14947ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
14957ec681f3Smrg   if (is_vertex_position(ctx, index))
14967ec681f3Smrg      ATTR2H(0, x, y);
14977ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
14987ec681f3Smrg      ATTR2H(VBO_ATTRIB_GENERIC0 + index, x, y);
14997ec681f3Smrg   else
15007ec681f3Smrg      ERROR(GL_INVALID_VALUE);
15017ec681f3Smrg}
15027ec681f3Smrg
15037ec681f3Smrgstatic void GLAPIENTRY
15047ec681f3SmrgTAG(VertexAttrib3hNV)(GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z)
15057ec681f3Smrg{
15067ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
15077ec681f3Smrg   if (is_vertex_position(ctx, index))
15087ec681f3Smrg      ATTR3H(0, x, y, z);
15097ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
15107ec681f3Smrg      ATTR3H(VBO_ATTRIB_GENERIC0 + index, x, y, z);
15117ec681f3Smrg   else
15127ec681f3Smrg      ERROR(GL_INVALID_VALUE);
15137ec681f3Smrg}
15147ec681f3Smrg
15157ec681f3Smrgstatic void GLAPIENTRY
15167ec681f3SmrgTAG(VertexAttrib4hNV)(GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w)
15177ec681f3Smrg{
15187ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
15197ec681f3Smrg   if (is_vertex_position(ctx, index))
15207ec681f3Smrg      ATTR4H(0, x, y, z, w);
15217ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
15227ec681f3Smrg      ATTR4H(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
15237ec681f3Smrg   else
15247ec681f3Smrg      ERROR(GL_INVALID_VALUE);
15257ec681f3Smrg}
15267ec681f3Smrg
15277ec681f3Smrgstatic void GLAPIENTRY
15287ec681f3SmrgTAG(VertexAttrib1hvNV)(GLuint index, const GLhalfNV * v)
15297ec681f3Smrg{
15307ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
15317ec681f3Smrg   if (is_vertex_position(ctx, index))
15327ec681f3Smrg      ATTR1HV(0, v);
15337ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
15347ec681f3Smrg      ATTR1HV(VBO_ATTRIB_GENERIC0 + index, v);
15357ec681f3Smrg   else
15367ec681f3Smrg      ERROR(GL_INVALID_VALUE);
15377ec681f3Smrg}
15387ec681f3Smrg
15397ec681f3Smrgstatic void GLAPIENTRY
15407ec681f3SmrgTAG(VertexAttrib2hvNV)(GLuint index, const GLhalfNV * v)
15417ec681f3Smrg{
15427ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
15437ec681f3Smrg   if (is_vertex_position(ctx, index))
15447ec681f3Smrg      ATTR2HV(0, v);
15457ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
15467ec681f3Smrg      ATTR2HV(VBO_ATTRIB_GENERIC0 + index, v);
15477ec681f3Smrg   else
15487ec681f3Smrg      ERROR(GL_INVALID_VALUE);
15497ec681f3Smrg}
15507ec681f3Smrg
15517ec681f3Smrgstatic void GLAPIENTRY
15527ec681f3SmrgTAG(VertexAttrib3hvNV)(GLuint index, const GLhalfNV * v)
15537ec681f3Smrg{
15547ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
15557ec681f3Smrg   if (is_vertex_position(ctx, index))
15567ec681f3Smrg      ATTR3HV(0, v);
15577ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
15587ec681f3Smrg      ATTR3HV(VBO_ATTRIB_GENERIC0 + index, v);
15597ec681f3Smrg   else
15607ec681f3Smrg      ERROR(GL_INVALID_VALUE);
15617ec681f3Smrg}
15627ec681f3Smrg
15637ec681f3Smrgstatic void GLAPIENTRY
15647ec681f3SmrgTAG(VertexAttrib4hvNV)(GLuint index, const GLhalfNV * v)
15657ec681f3Smrg{
15667ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
15677ec681f3Smrg   if (is_vertex_position(ctx, index))
15687ec681f3Smrg      ATTR4HV(0, v);
15697ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
15707ec681f3Smrg      ATTR4HV(VBO_ATTRIB_GENERIC0 + index, v);
15717ec681f3Smrg   else
15727ec681f3Smrg      ERROR(GL_INVALID_VALUE);
15737ec681f3Smrg}
15747ec681f3Smrg
15757ec681f3Smrgstatic void GLAPIENTRY
15767ec681f3SmrgTAG(VertexAttribs1hvNV)(GLuint index, GLsizei n, const GLhalfNV *v)
15777ec681f3Smrg{
15787ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
15797ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
15807ec681f3Smrg   for (GLint i = n - 1; i >= 0; i--)
15817ec681f3Smrg      ATTR1H(index + i, v[i]);
15827ec681f3Smrg}
15837ec681f3Smrg
15847ec681f3Smrgstatic void GLAPIENTRY
15857ec681f3SmrgTAG(VertexAttribs2hvNV)(GLuint index, GLsizei n, const GLhalfNV *v)
15867ec681f3Smrg{
15877ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
15887ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
15897ec681f3Smrg   for (GLint i = n - 1; i >= 0; i--)
15907ec681f3Smrg      ATTR2H(index + i, v[2 * i], v[2 * i + 1]);
15917ec681f3Smrg}
15927ec681f3Smrg
15937ec681f3Smrgstatic void GLAPIENTRY
15947ec681f3SmrgTAG(VertexAttribs3hvNV)(GLuint index, GLsizei n, const GLhalfNV *v)
15957ec681f3Smrg{
15967ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
15977ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
15987ec681f3Smrg   for (GLint i = n - 1; i >= 0; i--)
15997ec681f3Smrg      ATTR3H(index + i, v[3 * i], v[3 * i + 1], v[3 * i + 2]);
16007ec681f3Smrg}
16017ec681f3Smrg
16027ec681f3Smrg
16037ec681f3Smrgstatic void GLAPIENTRY
16047ec681f3SmrgTAG(VertexAttribs4hvNV)(GLuint index, GLsizei n, const GLhalfNV *v)
16057ec681f3Smrg{
16067ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16077ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
16087ec681f3Smrg   for (GLint i = n - 1; i >= 0; i--)
16097ec681f3Smrg      ATTR4H(index + i, v[4 * i], v[4 * i + 1], v[4 * i + 2], v[4 * i + 3]);
16107ec681f3Smrg}
16117ec681f3Smrg
16127ec681f3Smrg
16137ec681f3Smrg
16147ec681f3Smrgstatic void GLAPIENTRY
16157ec681f3SmrgTAG(FogCoordhNV)(GLhalf x)
16167ec681f3Smrg{
16177ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16187ec681f3Smrg   ATTR1H(VBO_ATTRIB_FOG, x);
16197ec681f3Smrg}
16207ec681f3Smrg
16217ec681f3Smrgstatic void GLAPIENTRY
16227ec681f3SmrgTAG(FogCoordhvNV)(const GLhalf * v)
16237ec681f3Smrg{
16247ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16257ec681f3Smrg   ATTR1HV(VBO_ATTRIB_FOG, v);
16267ec681f3Smrg}
16277ec681f3Smrg
16287ec681f3Smrg
16297ec681f3Smrg
16307ec681f3Smrgstatic void GLAPIENTRY
16317ec681f3SmrgTAG(SecondaryColor3hNV)(GLhalfNV x, GLhalfNV y, GLhalfNV z)
16327ec681f3Smrg{
16337ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16347ec681f3Smrg   ATTR3H(VBO_ATTRIB_COLOR1, x, y, z);
16357ec681f3Smrg}
16367ec681f3Smrg
16377ec681f3Smrgstatic void GLAPIENTRY
16387ec681f3SmrgTAG(SecondaryColor3hvNV)(const GLhalfNV * v)
16397ec681f3Smrg{
16407ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16417ec681f3Smrg   ATTR3HV(VBO_ATTRIB_COLOR1, v);
16427ec681f3Smrg}
16437ec681f3Smrg
16447ec681f3Smrg
16457ec681f3Smrgstatic void GLAPIENTRY
16467ec681f3SmrgTAG(Color3b)(GLbyte red, GLbyte green, GLbyte blue)
16477ec681f3Smrg{
16487ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16497ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, BYTE_TO_FLOAT(red),
16507ec681f3Smrg          BYTE_TO_FLOAT(green),
16517ec681f3Smrg          BYTE_TO_FLOAT(blue),
16527ec681f3Smrg          1.0);
16537ec681f3Smrg}
16547ec681f3Smrg
16557ec681f3Smrgstatic void GLAPIENTRY
16567ec681f3SmrgTAG(Color3d)(GLdouble red, GLdouble green, GLdouble blue)
16577ec681f3Smrg{
16587ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16597ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, (GLfloat) red, (GLfloat) green, (GLfloat) blue, 1.0);
16607ec681f3Smrg}
16617ec681f3Smrg
16627ec681f3Smrgstatic void GLAPIENTRY
16637ec681f3SmrgTAG(Color3i)(GLint red, GLint green, GLint blue)
16647ec681f3Smrg{
16657ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16667ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, INT_TO_FLOAT(red), INT_TO_FLOAT(green),
16677ec681f3Smrg          INT_TO_FLOAT(blue), 1.0);
16687ec681f3Smrg}
16697ec681f3Smrg
16707ec681f3Smrgstatic void GLAPIENTRY
16717ec681f3SmrgTAG(Color3s)(GLshort red, GLshort green, GLshort blue)
16727ec681f3Smrg{
16737ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16747ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
16757ec681f3Smrg          SHORT_TO_FLOAT(blue), 1.0);
16767ec681f3Smrg}
16777ec681f3Smrg
16787ec681f3Smrgstatic void GLAPIENTRY
16797ec681f3SmrgTAG(Color3ui)(GLuint red, GLuint green, GLuint blue)
16807ec681f3Smrg{
16817ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16827ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
16837ec681f3Smrg          UINT_TO_FLOAT(blue), 1.0);
16847ec681f3Smrg}
16857ec681f3Smrg
16867ec681f3Smrgstatic void GLAPIENTRY
16877ec681f3SmrgTAG(Color3us)(GLushort red, GLushort green, GLushort blue)
16887ec681f3Smrg{
16897ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16907ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
16917ec681f3Smrg          USHORT_TO_FLOAT(blue), 1.0);
16927ec681f3Smrg}
16937ec681f3Smrg
16947ec681f3Smrgstatic void GLAPIENTRY
16957ec681f3SmrgTAG(Color3ub)(GLubyte red, GLubyte green, GLubyte blue)
16967ec681f3Smrg{
16977ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
16987ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
16997ec681f3Smrg          UBYTE_TO_FLOAT(blue), 1.0);
17007ec681f3Smrg}
17017ec681f3Smrg
17027ec681f3Smrg
17037ec681f3Smrgstatic void GLAPIENTRY
17047ec681f3SmrgTAG(Color3bv)(const GLbyte *v)
17057ec681f3Smrg{
17067ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17077ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
17087ec681f3Smrg         BYTE_TO_FLOAT(v[2]), 1.0);
17097ec681f3Smrg}
17107ec681f3Smrg
17117ec681f3Smrgstatic void GLAPIENTRY
17127ec681f3SmrgTAG(Color3dv)(const GLdouble *v)
17137ec681f3Smrg{
17147ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17157ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0);
17167ec681f3Smrg}
17177ec681f3Smrg
17187ec681f3Smrgstatic void GLAPIENTRY
17197ec681f3SmrgTAG(Color3iv)(const GLint *v)
17207ec681f3Smrg{
17217ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17227ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
17237ec681f3Smrg         INT_TO_FLOAT(v[2]), 1.0);
17247ec681f3Smrg}
17257ec681f3Smrg
17267ec681f3Smrgstatic void GLAPIENTRY
17277ec681f3SmrgTAG(Color3sv)(const GLshort *v)
17287ec681f3Smrg{
17297ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17307ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
17317ec681f3Smrg         SHORT_TO_FLOAT(v[2]), 1.0);
17327ec681f3Smrg}
17337ec681f3Smrg
17347ec681f3Smrgstatic void GLAPIENTRY
17357ec681f3SmrgTAG(Color3uiv)(const GLuint *v)
17367ec681f3Smrg{
17377ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17387ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
17397ec681f3Smrg         UINT_TO_FLOAT(v[2]), 1.0);
17407ec681f3Smrg}
17417ec681f3Smrg
17427ec681f3Smrgstatic void GLAPIENTRY
17437ec681f3SmrgTAG(Color3usv)(const GLushort *v)
17447ec681f3Smrg{
17457ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17467ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
17477ec681f3Smrg         USHORT_TO_FLOAT(v[2]), 1.0);
17487ec681f3Smrg}
17497ec681f3Smrg
17507ec681f3Smrgstatic void GLAPIENTRY
17517ec681f3SmrgTAG(Color3ubv)(const GLubyte *v)
17527ec681f3Smrg{
17537ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17547ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
17557ec681f3Smrg         UBYTE_TO_FLOAT(v[2]), 1.0);
17567ec681f3Smrg}
17577ec681f3Smrg
17587ec681f3Smrg
17597ec681f3Smrgstatic void GLAPIENTRY
17607ec681f3SmrgTAG(Color4b)(GLbyte red, GLbyte green, GLbyte blue,
17617ec681f3Smrg              GLbyte alpha)
17627ec681f3Smrg{
17637ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17647ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, BYTE_TO_FLOAT(red), BYTE_TO_FLOAT(green),
17657ec681f3Smrg          BYTE_TO_FLOAT(blue), BYTE_TO_FLOAT(alpha));
17667ec681f3Smrg}
17677ec681f3Smrg
17687ec681f3Smrgstatic void GLAPIENTRY
17697ec681f3SmrgTAG(Color4d)(GLdouble red, GLdouble green, GLdouble blue,
17707ec681f3Smrg              GLdouble alpha)
17717ec681f3Smrg{
17727ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17737ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, (GLfloat) red, (GLfloat) green, (GLfloat) blue, (GLfloat) alpha);
17747ec681f3Smrg}
17757ec681f3Smrg
17767ec681f3Smrgstatic void GLAPIENTRY
17777ec681f3SmrgTAG(Color4i)(GLint red, GLint green, GLint blue, GLint alpha)
17787ec681f3Smrg{
17797ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17807ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, INT_TO_FLOAT(red), INT_TO_FLOAT(green),
17817ec681f3Smrg          INT_TO_FLOAT(blue), INT_TO_FLOAT(alpha));
17827ec681f3Smrg}
17837ec681f3Smrg
17847ec681f3Smrgstatic void GLAPIENTRY
17857ec681f3SmrgTAG(Color4s)(GLshort red, GLshort green, GLshort blue,
17867ec681f3Smrg              GLshort alpha)
17877ec681f3Smrg{
17887ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17897ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
17907ec681f3Smrg          SHORT_TO_FLOAT(blue), SHORT_TO_FLOAT(alpha));
17917ec681f3Smrg}
17927ec681f3Smrg
17937ec681f3Smrgstatic void GLAPIENTRY
17947ec681f3SmrgTAG(Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha)
17957ec681f3Smrg{
17967ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
17977ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, UINT_TO_FLOAT(red), UINT_TO_FLOAT(green),
17987ec681f3Smrg          UINT_TO_FLOAT(blue), UINT_TO_FLOAT(alpha));
17997ec681f3Smrg}
18007ec681f3Smrg
18017ec681f3Smrgstatic void GLAPIENTRY
18027ec681f3SmrgTAG(Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha)
18037ec681f3Smrg{
18047ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18057ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green),
18067ec681f3Smrg          USHORT_TO_FLOAT(blue), USHORT_TO_FLOAT(alpha));
18077ec681f3Smrg}
18087ec681f3Smrg
18097ec681f3Smrgstatic void GLAPIENTRY
18107ec681f3SmrgTAG(Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
18117ec681f3Smrg{
18127ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18137ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, UBYTE_TO_FLOAT(red), UBYTE_TO_FLOAT(green),
18147ec681f3Smrg          UBYTE_TO_FLOAT(blue), UBYTE_TO_FLOAT(alpha));
18157ec681f3Smrg}
18167ec681f3Smrg
18177ec681f3Smrg
18187ec681f3Smrgstatic void GLAPIENTRY
18197ec681f3SmrgTAG(Color4iv)(const GLint *v)
18207ec681f3Smrg{
18217ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18227ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]),
18237ec681f3Smrg         INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]));
18247ec681f3Smrg}
18257ec681f3Smrg
18267ec681f3Smrg
18277ec681f3Smrgstatic void GLAPIENTRY
18287ec681f3SmrgTAG(Color4bv)(const GLbyte *v)
18297ec681f3Smrg{
18307ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18317ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]),
18327ec681f3Smrg         BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]));
18337ec681f3Smrg}
18347ec681f3Smrg
18357ec681f3Smrgstatic void GLAPIENTRY
18367ec681f3SmrgTAG(Color4dv)(const GLdouble *v)
18377ec681f3Smrg{
18387ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18397ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
18407ec681f3Smrg}
18417ec681f3Smrg
18427ec681f3Smrg
18437ec681f3Smrgstatic void GLAPIENTRY
18447ec681f3SmrgTAG(Color4sv)(const GLshort *v)
18457ec681f3Smrg{
18467ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18477ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]),
18487ec681f3Smrg         SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]));
18497ec681f3Smrg}
18507ec681f3Smrg
18517ec681f3Smrg
18527ec681f3Smrgstatic void GLAPIENTRY
18537ec681f3SmrgTAG(Color4uiv)(const GLuint *v)
18547ec681f3Smrg{
18557ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18567ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]),
18577ec681f3Smrg         UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]));
18587ec681f3Smrg}
18597ec681f3Smrg
18607ec681f3Smrgstatic void GLAPIENTRY
18617ec681f3SmrgTAG(Color4usv)(const GLushort *v)
18627ec681f3Smrg{
18637ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18647ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]),
18657ec681f3Smrg         USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]));
18667ec681f3Smrg}
18677ec681f3Smrg
18687ec681f3Smrgstatic void GLAPIENTRY
18697ec681f3SmrgTAG(Color4ubv)(const GLubyte *v)
18707ec681f3Smrg{
18717ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18727ec681f3Smrg   ATTR4F(VBO_ATTRIB_COLOR0, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
18737ec681f3Smrg         UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
18747ec681f3Smrg}
18757ec681f3Smrg
18767ec681f3Smrg
18777ec681f3Smrgstatic void GLAPIENTRY
18787ec681f3SmrgTAG(FogCoordd)(GLdouble d)
18797ec681f3Smrg{
18807ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18817ec681f3Smrg   ATTR1F(VBO_ATTRIB_FOG, (GLfloat) d);
18827ec681f3Smrg}
18837ec681f3Smrg
18847ec681f3Smrgstatic void GLAPIENTRY
18857ec681f3SmrgTAG(FogCoorddv)(const GLdouble *v)
18867ec681f3Smrg{
18877ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18887ec681f3Smrg   ATTR1F(VBO_ATTRIB_FOG, (GLfloat) *v);
18897ec681f3Smrg}
18907ec681f3Smrg
18917ec681f3Smrg
18927ec681f3Smrgstatic void GLAPIENTRY
18937ec681f3SmrgTAG(Indexd)(GLdouble c)
18947ec681f3Smrg{
18957ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
18967ec681f3Smrg   ATTR1F(VBO_ATTRIB_COLOR_INDEX, (GLfloat) c);
18977ec681f3Smrg}
18987ec681f3Smrg
18997ec681f3Smrgstatic void GLAPIENTRY
19007ec681f3SmrgTAG(Indexi)(GLint c)
19017ec681f3Smrg{
19027ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19037ec681f3Smrg   ATTR1F(VBO_ATTRIB_COLOR_INDEX, (GLfloat) c);
19047ec681f3Smrg}
19057ec681f3Smrg
19067ec681f3Smrgstatic void GLAPIENTRY
19077ec681f3SmrgTAG(Indexs)(GLshort c)
19087ec681f3Smrg{
19097ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19107ec681f3Smrg   ATTR1F(VBO_ATTRIB_COLOR_INDEX, (GLfloat) c);
19117ec681f3Smrg}
19127ec681f3Smrg
19137ec681f3Smrgstatic void GLAPIENTRY
19147ec681f3SmrgTAG(Indexub)(GLubyte c)
19157ec681f3Smrg{
19167ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19177ec681f3Smrg   ATTR1F(VBO_ATTRIB_COLOR_INDEX, (GLfloat) c);
19187ec681f3Smrg}
19197ec681f3Smrg
19207ec681f3Smrgstatic void GLAPIENTRY
19217ec681f3SmrgTAG(Indexdv)(const GLdouble *c)
19227ec681f3Smrg{
19237ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19247ec681f3Smrg   ATTR1F(VBO_ATTRIB_COLOR_INDEX, (GLfloat) *c);
19257ec681f3Smrg}
19267ec681f3Smrg
19277ec681f3Smrgstatic void GLAPIENTRY
19287ec681f3SmrgTAG(Indexiv)(const GLint *c)
19297ec681f3Smrg{
19307ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19317ec681f3Smrg   ATTR1F(VBO_ATTRIB_COLOR_INDEX, (GLfloat) *c);
19327ec681f3Smrg}
19337ec681f3Smrg
19347ec681f3Smrgstatic void GLAPIENTRY
19357ec681f3SmrgTAG(Indexsv)(const GLshort *c)
19367ec681f3Smrg{
19377ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19387ec681f3Smrg   ATTR1F(VBO_ATTRIB_COLOR_INDEX, (GLfloat) *c);
19397ec681f3Smrg}
19407ec681f3Smrg
19417ec681f3Smrgstatic void GLAPIENTRY
19427ec681f3SmrgTAG(Indexubv)(const GLubyte *c)
19437ec681f3Smrg{
19447ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19457ec681f3Smrg   ATTR1F(VBO_ATTRIB_COLOR_INDEX, (GLfloat) *c);
19467ec681f3Smrg}
19477ec681f3Smrg
19487ec681f3Smrg
19497ec681f3Smrgstatic void GLAPIENTRY
19507ec681f3SmrgTAG(EdgeFlagv)(const GLboolean *flag)
19517ec681f3Smrg{
19527ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19537ec681f3Smrg   ATTR1F(VBO_ATTRIB_EDGEFLAG, (GLfloat)*flag);
19547ec681f3Smrg}
19557ec681f3Smrg
19567ec681f3Smrg
19577ec681f3Smrgstatic void GLAPIENTRY
19587ec681f3SmrgTAG(Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz)
19597ec681f3Smrg{
19607ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19617ec681f3Smrg   ATTR3F(VBO_ATTRIB_NORMAL, BYTE_TO_FLOAT(nx), BYTE_TO_FLOAT(ny), BYTE_TO_FLOAT(nz));
19627ec681f3Smrg}
19637ec681f3Smrg
19647ec681f3Smrgstatic void GLAPIENTRY
19657ec681f3SmrgTAG(Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz)
19667ec681f3Smrg{
19677ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19687ec681f3Smrg   ATTR3F(VBO_ATTRIB_NORMAL, (GLfloat) nx, (GLfloat) ny, (GLfloat) nz);
19697ec681f3Smrg}
19707ec681f3Smrg
19717ec681f3Smrgstatic void GLAPIENTRY
19727ec681f3SmrgTAG(Normal3i)(GLint nx, GLint ny, GLint nz)
19737ec681f3Smrg{
19747ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19757ec681f3Smrg   ATTR3F(VBO_ATTRIB_NORMAL, INT_TO_FLOAT(nx), INT_TO_FLOAT(ny), INT_TO_FLOAT(nz));
19767ec681f3Smrg}
19777ec681f3Smrg
19787ec681f3Smrgstatic void GLAPIENTRY
19797ec681f3SmrgTAG(Normal3s)(GLshort nx, GLshort ny, GLshort nz)
19807ec681f3Smrg{
19817ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19827ec681f3Smrg   ATTR3F(VBO_ATTRIB_NORMAL, SHORT_TO_FLOAT(nx), SHORT_TO_FLOAT(ny), SHORT_TO_FLOAT(nz));
19837ec681f3Smrg}
19847ec681f3Smrg
19857ec681f3Smrgstatic void GLAPIENTRY
19867ec681f3SmrgTAG(Normal3bv)(const GLbyte *v)
19877ec681f3Smrg{
19887ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19897ec681f3Smrg   ATTR3F(VBO_ATTRIB_NORMAL, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]));
19907ec681f3Smrg}
19917ec681f3Smrg
19927ec681f3Smrgstatic void GLAPIENTRY
19937ec681f3SmrgTAG(Normal3dv)(const GLdouble *v)
19947ec681f3Smrg{
19957ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
19967ec681f3Smrg   ATTR3F(VBO_ATTRIB_NORMAL, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
19977ec681f3Smrg}
19987ec681f3Smrg
19997ec681f3Smrgstatic void GLAPIENTRY
20007ec681f3SmrgTAG(Normal3iv)(const GLint *v)
20017ec681f3Smrg{
20027ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20037ec681f3Smrg   ATTR3F(VBO_ATTRIB_NORMAL, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]));
20047ec681f3Smrg}
20057ec681f3Smrg
20067ec681f3Smrgstatic void GLAPIENTRY
20077ec681f3SmrgTAG(Normal3sv)(const GLshort *v)
20087ec681f3Smrg{
20097ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20107ec681f3Smrg   ATTR3F(VBO_ATTRIB_NORMAL, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]));
20117ec681f3Smrg}
20127ec681f3Smrg
20137ec681f3Smrgstatic void GLAPIENTRY
20147ec681f3SmrgTAG(TexCoord1d)(GLdouble s)
20157ec681f3Smrg{
20167ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20177ec681f3Smrg   ATTR1F(VBO_ATTRIB_TEX0, (GLfloat) s);
20187ec681f3Smrg}
20197ec681f3Smrg
20207ec681f3Smrgstatic void GLAPIENTRY
20217ec681f3SmrgTAG(TexCoord1i)(GLint s)
20227ec681f3Smrg{
20237ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20247ec681f3Smrg   ATTR1F(VBO_ATTRIB_TEX0, (GLfloat) s);
20257ec681f3Smrg}
20267ec681f3Smrg
20277ec681f3Smrgstatic void GLAPIENTRY
20287ec681f3SmrgTAG(TexCoord1s)(GLshort s)
20297ec681f3Smrg{
20307ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20317ec681f3Smrg   ATTR1F(VBO_ATTRIB_TEX0, (GLfloat) s);
20327ec681f3Smrg}
20337ec681f3Smrg
20347ec681f3Smrgstatic void GLAPIENTRY
20357ec681f3SmrgTAG(TexCoord2d)(GLdouble s, GLdouble t)
20367ec681f3Smrg{
20377ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20387ec681f3Smrg   ATTR2F(VBO_ATTRIB_TEX0, (GLfloat) s,(GLfloat) t);
20397ec681f3Smrg}
20407ec681f3Smrg
20417ec681f3Smrgstatic void GLAPIENTRY
20427ec681f3SmrgTAG(TexCoord2s)(GLshort s, GLshort t)
20437ec681f3Smrg{
20447ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20457ec681f3Smrg   ATTR2F(VBO_ATTRIB_TEX0, (GLfloat) s,(GLfloat) t);
20467ec681f3Smrg}
20477ec681f3Smrg
20487ec681f3Smrgstatic void GLAPIENTRY
20497ec681f3SmrgTAG(TexCoord2i)(GLint s, GLint t)
20507ec681f3Smrg{
20517ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20527ec681f3Smrg   ATTR2F(VBO_ATTRIB_TEX0, (GLfloat) s,(GLfloat) t);
20537ec681f3Smrg}
20547ec681f3Smrg
20557ec681f3Smrgstatic void GLAPIENTRY
20567ec681f3SmrgTAG(TexCoord3d)(GLdouble s, GLdouble t, GLdouble r)
20577ec681f3Smrg{
20587ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20597ec681f3Smrg   ATTR3F(VBO_ATTRIB_TEX0, (GLfloat) s,(GLfloat) t,(GLfloat) r);
20607ec681f3Smrg}
20617ec681f3Smrg
20627ec681f3Smrgstatic void GLAPIENTRY
20637ec681f3SmrgTAG(TexCoord3i)(GLint s, GLint t, GLint r)
20647ec681f3Smrg{
20657ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20667ec681f3Smrg   ATTR3F(VBO_ATTRIB_TEX0, (GLfloat) s,(GLfloat) t,(GLfloat) r);
20677ec681f3Smrg}
20687ec681f3Smrg
20697ec681f3Smrgstatic void GLAPIENTRY
20707ec681f3SmrgTAG(TexCoord3s)(GLshort s, GLshort t, GLshort r)
20717ec681f3Smrg{
20727ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20737ec681f3Smrg   ATTR3F(VBO_ATTRIB_TEX0, (GLfloat) s,(GLfloat) t,(GLfloat) r);
20747ec681f3Smrg}
20757ec681f3Smrg
20767ec681f3Smrgstatic void GLAPIENTRY
20777ec681f3SmrgTAG(TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
20787ec681f3Smrg{
20797ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20807ec681f3Smrg   ATTR4F(VBO_ATTRIB_TEX0, (GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
20817ec681f3Smrg}
20827ec681f3Smrg
20837ec681f3Smrgstatic void GLAPIENTRY
20847ec681f3SmrgTAG(TexCoord4i)(GLint s, GLint t, GLint r, GLint q)
20857ec681f3Smrg{
20867ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20877ec681f3Smrg   ATTR4F(VBO_ATTRIB_TEX0, (GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
20887ec681f3Smrg}
20897ec681f3Smrg
20907ec681f3Smrgstatic void GLAPIENTRY
20917ec681f3SmrgTAG(TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q)
20927ec681f3Smrg{
20937ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
20947ec681f3Smrg   ATTR4F(VBO_ATTRIB_TEX0, (GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q);
20957ec681f3Smrg}
20967ec681f3Smrg
20977ec681f3Smrgstatic void GLAPIENTRY
20987ec681f3SmrgTAG(TexCoord1dv)(const GLdouble *v)
20997ec681f3Smrg{
21007ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21017ec681f3Smrg   ATTR1F(VBO_ATTRIB_TEX0, (GLfloat) v[0]);
21027ec681f3Smrg}
21037ec681f3Smrg
21047ec681f3Smrgstatic void GLAPIENTRY
21057ec681f3SmrgTAG(TexCoord1iv)(const GLint *v)
21067ec681f3Smrg{
21077ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21087ec681f3Smrg   ATTR1F(VBO_ATTRIB_TEX0, (GLfloat) v[0]);
21097ec681f3Smrg}
21107ec681f3Smrg
21117ec681f3Smrgstatic void GLAPIENTRY
21127ec681f3SmrgTAG(TexCoord1sv)(const GLshort *v)
21137ec681f3Smrg{
21147ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21157ec681f3Smrg   ATTR1F(VBO_ATTRIB_TEX0, (GLfloat) v[0]);
21167ec681f3Smrg}
21177ec681f3Smrg
21187ec681f3Smrgstatic void GLAPIENTRY
21197ec681f3SmrgTAG(TexCoord2dv)(const GLdouble *v)
21207ec681f3Smrg{
21217ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21227ec681f3Smrg   ATTR2F(VBO_ATTRIB_TEX0, (GLfloat) v[0],(GLfloat) v[1]);
21237ec681f3Smrg}
21247ec681f3Smrg
21257ec681f3Smrgstatic void GLAPIENTRY
21267ec681f3SmrgTAG(TexCoord2iv)(const GLint *v)
21277ec681f3Smrg{
21287ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21297ec681f3Smrg   ATTR2F(VBO_ATTRIB_TEX0, (GLfloat) v[0],(GLfloat) v[1]);
21307ec681f3Smrg}
21317ec681f3Smrg
21327ec681f3Smrgstatic void GLAPIENTRY
21337ec681f3SmrgTAG(TexCoord2sv)(const GLshort *v)
21347ec681f3Smrg{
21357ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21367ec681f3Smrg   ATTR2F(VBO_ATTRIB_TEX0, (GLfloat) v[0],(GLfloat) v[1]);
21377ec681f3Smrg}
21387ec681f3Smrg
21397ec681f3Smrgstatic void GLAPIENTRY
21407ec681f3SmrgTAG(TexCoord3dv)(const GLdouble *v)
21417ec681f3Smrg{
21427ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21437ec681f3Smrg   ATTR3F(VBO_ATTRIB_TEX0, (GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
21447ec681f3Smrg}
21457ec681f3Smrg
21467ec681f3Smrgstatic void GLAPIENTRY
21477ec681f3SmrgTAG(TexCoord3iv)(const GLint *v)
21487ec681f3Smrg{
21497ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21507ec681f3Smrg   ATTR3F(VBO_ATTRIB_TEX0, (GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
21517ec681f3Smrg}
21527ec681f3Smrg
21537ec681f3Smrgstatic void GLAPIENTRY
21547ec681f3SmrgTAG(TexCoord3sv)(const GLshort *v)
21557ec681f3Smrg{
21567ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21577ec681f3Smrg   ATTR3F(VBO_ATTRIB_TEX0, (GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]);
21587ec681f3Smrg}
21597ec681f3Smrg
21607ec681f3Smrgstatic void GLAPIENTRY
21617ec681f3SmrgTAG(TexCoord4dv)(const GLdouble *v)
21627ec681f3Smrg{
21637ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21647ec681f3Smrg   ATTR4F(VBO_ATTRIB_TEX0, (GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
21657ec681f3Smrg}
21667ec681f3Smrg
21677ec681f3Smrgstatic void GLAPIENTRY
21687ec681f3SmrgTAG(TexCoord4iv)(const GLint *v)
21697ec681f3Smrg{
21707ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21717ec681f3Smrg   ATTR4F(VBO_ATTRIB_TEX0, (GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
21727ec681f3Smrg}
21737ec681f3Smrg
21747ec681f3Smrgstatic void GLAPIENTRY
21757ec681f3SmrgTAG(TexCoord4sv)(const GLshort *v)
21767ec681f3Smrg{
21777ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21787ec681f3Smrg   ATTR4F(VBO_ATTRIB_TEX0, (GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]);
21797ec681f3Smrg}
21807ec681f3Smrg
21817ec681f3Smrgstatic void GLAPIENTRY
21827ec681f3SmrgTAG(Vertex2d)(GLdouble x, GLdouble y)
21837ec681f3Smrg{
21847ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21857ec681f3Smrg   ATTR2F(VBO_ATTRIB_POS, (GLfloat) x, (GLfloat) y);
21867ec681f3Smrg}
21877ec681f3Smrg
21887ec681f3Smrgstatic void GLAPIENTRY
21897ec681f3SmrgTAG(Vertex2i)(GLint x, GLint y)
21907ec681f3Smrg{
21917ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21927ec681f3Smrg   ATTR2F(VBO_ATTRIB_POS, (GLfloat) x, (GLfloat) y);
21937ec681f3Smrg}
21947ec681f3Smrg
21957ec681f3Smrgstatic void GLAPIENTRY
21967ec681f3SmrgTAG(Vertex2s)(GLshort x, GLshort y)
21977ec681f3Smrg{
21987ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
21997ec681f3Smrg   ATTR2F(VBO_ATTRIB_POS, (GLfloat) x, (GLfloat) y);
22007ec681f3Smrg}
22017ec681f3Smrg
22027ec681f3Smrgstatic void GLAPIENTRY
22037ec681f3SmrgTAG(Vertex3d)(GLdouble x, GLdouble y, GLdouble z)
22047ec681f3Smrg{
22057ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22067ec681f3Smrg   ATTR3F(VBO_ATTRIB_POS, (GLfloat) x, (GLfloat) y, (GLfloat) z);
22077ec681f3Smrg}
22087ec681f3Smrg
22097ec681f3Smrgstatic void GLAPIENTRY
22107ec681f3SmrgTAG(Vertex3i)(GLint x, GLint y, GLint z)
22117ec681f3Smrg{
22127ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22137ec681f3Smrg   ATTR3F(VBO_ATTRIB_POS, (GLfloat) x, (GLfloat) y, (GLfloat) z);
22147ec681f3Smrg}
22157ec681f3Smrg
22167ec681f3Smrgstatic void GLAPIENTRY
22177ec681f3SmrgTAG(Vertex3s)(GLshort x, GLshort y, GLshort z)
22187ec681f3Smrg{
22197ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22207ec681f3Smrg   ATTR3F(VBO_ATTRIB_POS, (GLfloat) x, (GLfloat) y, (GLfloat) z);
22217ec681f3Smrg}
22227ec681f3Smrg
22237ec681f3Smrgstatic void GLAPIENTRY
22247ec681f3SmrgTAG(Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
22257ec681f3Smrg{
22267ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22277ec681f3Smrg   ATTR4F(VBO_ATTRIB_POS, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
22287ec681f3Smrg}
22297ec681f3Smrg
22307ec681f3Smrgstatic void GLAPIENTRY
22317ec681f3SmrgTAG(Vertex4i)(GLint x, GLint y, GLint z, GLint w)
22327ec681f3Smrg{
22337ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22347ec681f3Smrg   ATTR4F(VBO_ATTRIB_POS, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
22357ec681f3Smrg}
22367ec681f3Smrg
22377ec681f3Smrgstatic void GLAPIENTRY
22387ec681f3SmrgTAG(Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w)
22397ec681f3Smrg{
22407ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22417ec681f3Smrg   ATTR4F(VBO_ATTRIB_POS, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
22427ec681f3Smrg}
22437ec681f3Smrg
22447ec681f3Smrgstatic void GLAPIENTRY
22457ec681f3SmrgTAG(Vertex2dv)(const GLdouble *v)
22467ec681f3Smrg{
22477ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22487ec681f3Smrg   ATTR2F(VBO_ATTRIB_POS, (GLfloat) v[0], (GLfloat) v[1]);
22497ec681f3Smrg}
22507ec681f3Smrg
22517ec681f3Smrgstatic void GLAPIENTRY
22527ec681f3SmrgTAG(Vertex2iv)(const GLint *v)
22537ec681f3Smrg{
22547ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22557ec681f3Smrg   ATTR2F(VBO_ATTRIB_POS, (GLfloat) v[0], (GLfloat) v[1]);
22567ec681f3Smrg}
22577ec681f3Smrg
22587ec681f3Smrgstatic void GLAPIENTRY
22597ec681f3SmrgTAG(Vertex2sv)(const GLshort *v)
22607ec681f3Smrg{
22617ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22627ec681f3Smrg   ATTR2F(VBO_ATTRIB_POS, (GLfloat) v[0], (GLfloat) v[1]);
22637ec681f3Smrg}
22647ec681f3Smrg
22657ec681f3Smrgstatic void GLAPIENTRY
22667ec681f3SmrgTAG(Vertex3dv)(const GLdouble *v)
22677ec681f3Smrg{
22687ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22697ec681f3Smrg   ATTR3F(VBO_ATTRIB_POS, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
22707ec681f3Smrg}
22717ec681f3Smrg
22727ec681f3Smrgstatic void GLAPIENTRY
22737ec681f3SmrgTAG(Vertex3iv)(const GLint *v)
22747ec681f3Smrg{
22757ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22767ec681f3Smrg   ATTR3F(VBO_ATTRIB_POS, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
22777ec681f3Smrg}
22787ec681f3Smrg
22797ec681f3Smrgstatic void GLAPIENTRY
22807ec681f3SmrgTAG(Vertex3sv)(const GLshort *v)
22817ec681f3Smrg{
22827ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22837ec681f3Smrg   ATTR3F(VBO_ATTRIB_POS, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
22847ec681f3Smrg}
22857ec681f3Smrg
22867ec681f3Smrgstatic void GLAPIENTRY
22877ec681f3SmrgTAG(Vertex4dv)(const GLdouble *v)
22887ec681f3Smrg{
22897ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22907ec681f3Smrg   ATTR4F(VBO_ATTRIB_POS, (GLfloat) v[0], (GLfloat) v[1],
22917ec681f3Smrg         (GLfloat) v[2], (GLfloat) v[3]);
22927ec681f3Smrg}
22937ec681f3Smrg
22947ec681f3Smrgstatic void GLAPIENTRY
22957ec681f3SmrgTAG(Vertex4iv)(const GLint *v)
22967ec681f3Smrg{
22977ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
22987ec681f3Smrg   ATTR4F(VBO_ATTRIB_POS, (GLfloat) v[0], (GLfloat) v[1],
22997ec681f3Smrg         (GLfloat) v[2], (GLfloat) v[3]);
23007ec681f3Smrg}
23017ec681f3Smrg
23027ec681f3Smrgstatic void GLAPIENTRY
23037ec681f3SmrgTAG(Vertex4sv)(const GLshort *v)
23047ec681f3Smrg{
23057ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23067ec681f3Smrg   ATTR4F(VBO_ATTRIB_POS, (GLfloat) v[0], (GLfloat) v[1],
23077ec681f3Smrg         (GLfloat) v[2], (GLfloat) v[3]);
23087ec681f3Smrg}
23097ec681f3Smrg
23107ec681f3Smrgstatic void GLAPIENTRY
23117ec681f3SmrgTAG(MultiTexCoord1d)(GLenum target, GLdouble s)
23127ec681f3Smrg{
23137ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23147ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23157ec681f3Smrg   ATTR1F(attr, (GLfloat) s);
23167ec681f3Smrg}
23177ec681f3Smrg
23187ec681f3Smrgstatic void GLAPIENTRY
23197ec681f3SmrgTAG(MultiTexCoord1dv)(GLenum target, const GLdouble *v)
23207ec681f3Smrg{
23217ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23227ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23237ec681f3Smrg   ATTR1F(attr, (GLfloat) v[0]);
23247ec681f3Smrg}
23257ec681f3Smrg
23267ec681f3Smrgstatic void GLAPIENTRY
23277ec681f3SmrgTAG(MultiTexCoord1i)(GLenum target, GLint s)
23287ec681f3Smrg{
23297ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23307ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23317ec681f3Smrg   ATTR1F(attr, (GLfloat) s);
23327ec681f3Smrg}
23337ec681f3Smrg
23347ec681f3Smrgstatic void GLAPIENTRY
23357ec681f3SmrgTAG(MultiTexCoord1iv)(GLenum target, const GLint *v)
23367ec681f3Smrg{
23377ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23387ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23397ec681f3Smrg   ATTR1F(attr, (GLfloat) v[0]);
23407ec681f3Smrg}
23417ec681f3Smrg
23427ec681f3Smrgstatic void GLAPIENTRY
23437ec681f3SmrgTAG(MultiTexCoord1s)(GLenum target, GLshort s)
23447ec681f3Smrg{
23457ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23467ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23477ec681f3Smrg   ATTR1F(attr, (GLfloat) s);
23487ec681f3Smrg}
23497ec681f3Smrg
23507ec681f3Smrgstatic void GLAPIENTRY
23517ec681f3SmrgTAG(MultiTexCoord1sv)(GLenum target, const GLshort *v)
23527ec681f3Smrg{
23537ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23547ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23557ec681f3Smrg   ATTR1F(attr, (GLfloat) v[0]);
23567ec681f3Smrg}
23577ec681f3Smrg
23587ec681f3Smrgstatic void GLAPIENTRY
23597ec681f3SmrgTAG(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t)
23607ec681f3Smrg{
23617ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23627ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23637ec681f3Smrg   ATTR2F(attr, (GLfloat) s, (GLfloat) t);
23647ec681f3Smrg}
23657ec681f3Smrg
23667ec681f3Smrgstatic void GLAPIENTRY
23677ec681f3SmrgTAG(MultiTexCoord2dv)(GLenum target, const GLdouble *v)
23687ec681f3Smrg{
23697ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23707ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23717ec681f3Smrg   ATTR2F(attr, (GLfloat) v[0], (GLfloat) v[1]);
23727ec681f3Smrg}
23737ec681f3Smrg
23747ec681f3Smrgstatic void GLAPIENTRY
23757ec681f3SmrgTAG(MultiTexCoord2i)(GLenum target, GLint s, GLint t)
23767ec681f3Smrg{
23777ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23787ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23797ec681f3Smrg   ATTR2F(attr, (GLfloat) s, (GLfloat) t);
23807ec681f3Smrg}
23817ec681f3Smrg
23827ec681f3Smrgstatic void GLAPIENTRY
23837ec681f3SmrgTAG(MultiTexCoord2iv)(GLenum target, const GLint *v)
23847ec681f3Smrg{
23857ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23867ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23877ec681f3Smrg   ATTR2F(attr, (GLfloat) v[0], (GLfloat) v[1]);
23887ec681f3Smrg}
23897ec681f3Smrg
23907ec681f3Smrgstatic void GLAPIENTRY
23917ec681f3SmrgTAG(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t)
23927ec681f3Smrg{
23937ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
23947ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
23957ec681f3Smrg   ATTR2F(attr, (GLfloat) s, (GLfloat) t);
23967ec681f3Smrg}
23977ec681f3Smrg
23987ec681f3Smrgstatic void GLAPIENTRY
23997ec681f3SmrgTAG(MultiTexCoord2sv)(GLenum target, const GLshort *v)
24007ec681f3Smrg{
24017ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24027ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24037ec681f3Smrg   ATTR2F(attr, (GLfloat) v[0], (GLfloat) v[1]);
24047ec681f3Smrg}
24057ec681f3Smrg
24067ec681f3Smrgstatic void GLAPIENTRY
24077ec681f3SmrgTAG(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r)
24087ec681f3Smrg{
24097ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24107ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24117ec681f3Smrg   ATTR3F(attr, (GLfloat) s, (GLfloat) t, (GLfloat) r);
24127ec681f3Smrg}
24137ec681f3Smrg
24147ec681f3Smrgstatic void GLAPIENTRY
24157ec681f3SmrgTAG(MultiTexCoord3dv)(GLenum target, const GLdouble *v)
24167ec681f3Smrg{
24177ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24187ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24197ec681f3Smrg   ATTR3F(attr, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
24207ec681f3Smrg}
24217ec681f3Smrg
24227ec681f3Smrgstatic void GLAPIENTRY
24237ec681f3SmrgTAG(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r)
24247ec681f3Smrg{
24257ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24267ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24277ec681f3Smrg   ATTR3F(attr, (GLfloat) s, (GLfloat) t, (GLfloat) r);
24287ec681f3Smrg}
24297ec681f3Smrg
24307ec681f3Smrgstatic void GLAPIENTRY
24317ec681f3SmrgTAG(MultiTexCoord3iv)(GLenum target, const GLint *v)
24327ec681f3Smrg{
24337ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24347ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24357ec681f3Smrg   ATTR3F(attr, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
24367ec681f3Smrg}
24377ec681f3Smrg
24387ec681f3Smrgstatic void GLAPIENTRY
24397ec681f3SmrgTAG(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r)
24407ec681f3Smrg{
24417ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24427ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24437ec681f3Smrg   ATTR3F(attr, (GLfloat) s, (GLfloat) t, (GLfloat) r);
24447ec681f3Smrg}
24457ec681f3Smrg
24467ec681f3Smrgstatic void GLAPIENTRY
24477ec681f3SmrgTAG(MultiTexCoord3sv)(GLenum target, const GLshort *v)
24487ec681f3Smrg{
24497ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24507ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24517ec681f3Smrg   ATTR3F(attr, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
24527ec681f3Smrg}
24537ec681f3Smrg
24547ec681f3Smrgstatic void GLAPIENTRY
24557ec681f3SmrgTAG(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
24567ec681f3Smrg{
24577ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24587ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24597ec681f3Smrg   ATTR4F(attr, (GLfloat) s, (GLfloat) t, (GLfloat) r, (GLfloat) q);
24607ec681f3Smrg}
24617ec681f3Smrg
24627ec681f3Smrgstatic void GLAPIENTRY
24637ec681f3SmrgTAG(MultiTexCoord4dv)(GLenum target, const GLdouble *v)
24647ec681f3Smrg{
24657ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24667ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24677ec681f3Smrg   ATTR4F(attr, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
24687ec681f3Smrg}
24697ec681f3Smrg
24707ec681f3Smrgstatic void GLAPIENTRY
24717ec681f3SmrgTAG(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q)
24727ec681f3Smrg{
24737ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24747ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24757ec681f3Smrg   ATTR4F(attr, (GLfloat) s, (GLfloat) t, (GLfloat) r, (GLfloat) q);
24767ec681f3Smrg}
24777ec681f3Smrg
24787ec681f3Smrgstatic void GLAPIENTRY
24797ec681f3SmrgTAG(MultiTexCoord4iv)(GLenum target, const GLint *v)
24807ec681f3Smrg{
24817ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24827ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24837ec681f3Smrg   ATTR4F(attr, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
24847ec681f3Smrg}
24857ec681f3Smrg
24867ec681f3Smrgstatic void GLAPIENTRY
24877ec681f3SmrgTAG(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
24887ec681f3Smrg{
24897ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24907ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24917ec681f3Smrg   ATTR4F(attr, (GLfloat) s, (GLfloat) t, (GLfloat) r, (GLfloat) q);
24927ec681f3Smrg}
24937ec681f3Smrg
24947ec681f3Smrgstatic void GLAPIENTRY
24957ec681f3SmrgTAG(MultiTexCoord4sv)(GLenum target, const GLshort *v)
24967ec681f3Smrg{
24977ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
24987ec681f3Smrg   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
24997ec681f3Smrg   ATTR4F(attr, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
25007ec681f3Smrg}
25017ec681f3Smrg
25027ec681f3Smrg
25037ec681f3Smrgstatic void GLAPIENTRY
25047ec681f3SmrgTAG(EvalCoord2dv)(const GLdouble *u)
25057ec681f3Smrg{
25067ec681f3Smrg   TAG(EvalCoord2f)((GLfloat) u[0], (GLfloat) u[1]);
25077ec681f3Smrg}
25087ec681f3Smrg
25097ec681f3Smrgstatic void GLAPIENTRY
25107ec681f3SmrgTAG(EvalCoord2d)(GLdouble u, GLdouble v)
25117ec681f3Smrg{
25127ec681f3Smrg   TAG(EvalCoord2f)((GLfloat) u, (GLfloat) v);
25137ec681f3Smrg}
25147ec681f3Smrg
25157ec681f3Smrgstatic void GLAPIENTRY
25167ec681f3SmrgTAG(EvalCoord1dv)(const GLdouble *u)
25177ec681f3Smrg{
25187ec681f3Smrg   TAG(EvalCoord1f)((GLfloat) *u);
25197ec681f3Smrg}
25207ec681f3Smrg
25217ec681f3Smrgstatic void GLAPIENTRY
25227ec681f3SmrgTAG(EvalCoord1d)(GLdouble u)
25237ec681f3Smrg{
25247ec681f3Smrg   TAG(EvalCoord1f)((GLfloat) u);
25257ec681f3Smrg}
25267ec681f3Smrg
25277ec681f3Smrg
25287ec681f3Smrgstatic void GLAPIENTRY
25297ec681f3SmrgTAG(Materialf)(GLenum face, GLenum pname, GLfloat param)
25307ec681f3Smrg{
25317ec681f3Smrg   GLfloat fparam[4];
25327ec681f3Smrg   fparam[0] = param;
25337ec681f3Smrg   TAG(Materialfv)(face, pname, fparam);
25347ec681f3Smrg}
25357ec681f3Smrg
25367ec681f3Smrgstatic void GLAPIENTRY
25377ec681f3SmrgTAG(Materiali)(GLenum face, GLenum pname, GLint param)
25387ec681f3Smrg{
25397ec681f3Smrg   GLfloat p[4];
25407ec681f3Smrg   p[0] = (GLfloat) param;
25417ec681f3Smrg   TAG(Materialfv)(face, pname, p);
25427ec681f3Smrg}
25437ec681f3Smrg
25447ec681f3Smrgstatic void GLAPIENTRY
25457ec681f3SmrgTAG(Materialiv)(GLenum face, GLenum pname, const GLint *params)
25467ec681f3Smrg{
25477ec681f3Smrg   GLfloat fparam[4];
25487ec681f3Smrg   switch (pname) {
25497ec681f3Smrg   case GL_AMBIENT:
25507ec681f3Smrg   case GL_DIFFUSE:
25517ec681f3Smrg   case GL_SPECULAR:
25527ec681f3Smrg   case GL_EMISSION:
25537ec681f3Smrg   case GL_AMBIENT_AND_DIFFUSE:
25547ec681f3Smrg      fparam[0] = INT_TO_FLOAT(params[0]);
25557ec681f3Smrg      fparam[1] = INT_TO_FLOAT(params[1]);
25567ec681f3Smrg      fparam[2] = INT_TO_FLOAT(params[2]);
25577ec681f3Smrg      fparam[3] = INT_TO_FLOAT(params[3]);
25587ec681f3Smrg      break;
25597ec681f3Smrg   case GL_SHININESS:
25607ec681f3Smrg      fparam[0] = (GLfloat) params[0];
25617ec681f3Smrg      break;
25627ec681f3Smrg   case GL_COLOR_INDEXES:
25637ec681f3Smrg      fparam[0] = (GLfloat) params[0];
25647ec681f3Smrg      fparam[1] = (GLfloat) params[1];
25657ec681f3Smrg      fparam[2] = (GLfloat) params[2];
25667ec681f3Smrg      break;
25677ec681f3Smrg   default:
25687ec681f3Smrg      ;
25697ec681f3Smrg   }
25707ec681f3Smrg   TAG(Materialfv)(face, pname, fparam);
25717ec681f3Smrg}
25727ec681f3Smrg
25737ec681f3Smrg
25747ec681f3Smrgstatic void GLAPIENTRY
25757ec681f3SmrgTAG(SecondaryColor3b)(GLbyte red, GLbyte green, GLbyte blue)
25767ec681f3Smrg{
25777ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
25787ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, BYTE_TO_FLOAT(red),
25797ec681f3Smrg          BYTE_TO_FLOAT(green),
25807ec681f3Smrg          BYTE_TO_FLOAT(blue));
25817ec681f3Smrg}
25827ec681f3Smrg
25837ec681f3Smrgstatic void GLAPIENTRY
25847ec681f3SmrgTAG(SecondaryColor3d)(GLdouble red, GLdouble green, GLdouble blue)
25857ec681f3Smrg{
25867ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
25877ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, (GLfloat) red, (GLfloat) green, (GLfloat) blue);
25887ec681f3Smrg}
25897ec681f3Smrg
25907ec681f3Smrgstatic void GLAPIENTRY
25917ec681f3SmrgTAG(SecondaryColor3i)(GLint red, GLint green, GLint blue)
25927ec681f3Smrg{
25937ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
25947ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, INT_TO_FLOAT(red),
25957ec681f3Smrg          INT_TO_FLOAT(green),
25967ec681f3Smrg          INT_TO_FLOAT(blue));
25977ec681f3Smrg}
25987ec681f3Smrg
25997ec681f3Smrgstatic void GLAPIENTRY
26007ec681f3SmrgTAG(SecondaryColor3s)(GLshort red, GLshort green, GLshort blue)
26017ec681f3Smrg{
26027ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26037ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, SHORT_TO_FLOAT(red),
26047ec681f3Smrg          SHORT_TO_FLOAT(green),
26057ec681f3Smrg          SHORT_TO_FLOAT(blue));
26067ec681f3Smrg}
26077ec681f3Smrg
26087ec681f3Smrgstatic void GLAPIENTRY
26097ec681f3SmrgTAG(SecondaryColor3ui)(GLuint red, GLuint green, GLuint blue)
26107ec681f3Smrg{
26117ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26127ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, UINT_TO_FLOAT(red),
26137ec681f3Smrg          UINT_TO_FLOAT(green),
26147ec681f3Smrg          UINT_TO_FLOAT(blue));
26157ec681f3Smrg}
26167ec681f3Smrg
26177ec681f3Smrgstatic void GLAPIENTRY
26187ec681f3SmrgTAG(SecondaryColor3us)(GLushort red, GLushort green, GLushort blue)
26197ec681f3Smrg{
26207ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26217ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, USHORT_TO_FLOAT(red),
26227ec681f3Smrg          USHORT_TO_FLOAT(green),
26237ec681f3Smrg          USHORT_TO_FLOAT(blue));
26247ec681f3Smrg}
26257ec681f3Smrg
26267ec681f3Smrgstatic void GLAPIENTRY
26277ec681f3SmrgTAG(SecondaryColor3ub)(GLubyte red, GLubyte green, GLubyte blue)
26287ec681f3Smrg{
26297ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26307ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, UBYTE_TO_FLOAT(red),
26317ec681f3Smrg          UBYTE_TO_FLOAT(green),
26327ec681f3Smrg          UBYTE_TO_FLOAT(blue));
26337ec681f3Smrg}
26347ec681f3Smrg
26357ec681f3Smrgstatic void GLAPIENTRY
26367ec681f3SmrgTAG(SecondaryColor3bv)(const GLbyte *v)
26377ec681f3Smrg{
26387ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26397ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, BYTE_TO_FLOAT(v[0]),
26407ec681f3Smrg         BYTE_TO_FLOAT(v[1]),
26417ec681f3Smrg         BYTE_TO_FLOAT(v[2]));
26427ec681f3Smrg}
26437ec681f3Smrg
26447ec681f3Smrgstatic void GLAPIENTRY
26457ec681f3SmrgTAG(SecondaryColor3dv)(const GLdouble *v)
26467ec681f3Smrg{
26477ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26487ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
26497ec681f3Smrg}
26507ec681f3Smrg
26517ec681f3Smrgstatic void GLAPIENTRY
26527ec681f3SmrgTAG(SecondaryColor3iv)(const GLint *v)
26537ec681f3Smrg{
26547ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26557ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, INT_TO_FLOAT(v[0]),
26567ec681f3Smrg         INT_TO_FLOAT(v[1]),
26577ec681f3Smrg         INT_TO_FLOAT(v[2]));
26587ec681f3Smrg}
26597ec681f3Smrg
26607ec681f3Smrgstatic void GLAPIENTRY
26617ec681f3SmrgTAG(SecondaryColor3sv)(const GLshort *v)
26627ec681f3Smrg{
26637ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26647ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, SHORT_TO_FLOAT(v[0]),
26657ec681f3Smrg         SHORT_TO_FLOAT(v[1]),
26667ec681f3Smrg         SHORT_TO_FLOAT(v[2]));
26677ec681f3Smrg}
26687ec681f3Smrg
26697ec681f3Smrgstatic void GLAPIENTRY
26707ec681f3SmrgTAG(SecondaryColor3uiv)(const GLuint *v)
26717ec681f3Smrg{
26727ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26737ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, UINT_TO_FLOAT(v[0]),
26747ec681f3Smrg         UINT_TO_FLOAT(v[1]),
26757ec681f3Smrg         UINT_TO_FLOAT(v[2]));
26767ec681f3Smrg}
26777ec681f3Smrg
26787ec681f3Smrgstatic void GLAPIENTRY
26797ec681f3SmrgTAG(SecondaryColor3usv)(const GLushort *v)
26807ec681f3Smrg{
26817ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26827ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, USHORT_TO_FLOAT(v[0]),
26837ec681f3Smrg         USHORT_TO_FLOAT(v[1]),
26847ec681f3Smrg         USHORT_TO_FLOAT(v[2]));
26857ec681f3Smrg}
26867ec681f3Smrg
26877ec681f3Smrgstatic void GLAPIENTRY
26887ec681f3SmrgTAG(SecondaryColor3ubv)(const GLubyte *v)
26897ec681f3Smrg{
26907ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
26917ec681f3Smrg   ATTR3F(VBO_ATTRIB_COLOR1, UBYTE_TO_FLOAT(v[0]),
26927ec681f3Smrg         UBYTE_TO_FLOAT(v[1]),
26937ec681f3Smrg         UBYTE_TO_FLOAT(v[2]));
26947ec681f3Smrg}
26957ec681f3Smrg
26967ec681f3Smrg
26977ec681f3Smrg/*
26987ec681f3Smrg * GL_NV_vertex_program:
26997ec681f3Smrg * Note that attribute indexes DO alias conventional vertex attributes.
27007ec681f3Smrg */
27017ec681f3Smrg
27027ec681f3Smrgstatic void GLAPIENTRY
27037ec681f3SmrgTAG(VertexAttrib1sNV)(GLuint index, GLshort x)
27047ec681f3Smrg{
27057ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27067ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR1F(index, (GLfloat) x);
27077ec681f3Smrg}
27087ec681f3Smrg
27097ec681f3Smrgstatic void GLAPIENTRY
27107ec681f3SmrgTAG(VertexAttrib1dNV)(GLuint index, GLdouble x)
27117ec681f3Smrg{
27127ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27137ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR1F(index, (GLfloat) x);
27147ec681f3Smrg}
27157ec681f3Smrg
27167ec681f3Smrgstatic void GLAPIENTRY
27177ec681f3SmrgTAG(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y)
27187ec681f3Smrg{
27197ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27207ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR2F(index, (GLfloat) x, y);
27217ec681f3Smrg}
27227ec681f3Smrg
27237ec681f3Smrgstatic void GLAPIENTRY
27247ec681f3SmrgTAG(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y)
27257ec681f3Smrg{
27267ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27277ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR2F(index, (GLfloat) x, (GLfloat) y);
27287ec681f3Smrg}
27297ec681f3Smrg
27307ec681f3Smrgstatic void GLAPIENTRY
27317ec681f3SmrgTAG(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z)
27327ec681f3Smrg{
27337ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27347ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR3F(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
27357ec681f3Smrg}
27367ec681f3Smrg
27377ec681f3Smrgstatic void GLAPIENTRY
27387ec681f3SmrgTAG(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z)
27397ec681f3Smrg{
27407ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27417ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR4F(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
27427ec681f3Smrg}
27437ec681f3Smrg
27447ec681f3Smrgstatic void GLAPIENTRY
27457ec681f3SmrgTAG(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
27467ec681f3Smrg{
27477ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27487ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR4F(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
27497ec681f3Smrg}
27507ec681f3Smrg
27517ec681f3Smrgstatic void GLAPIENTRY
27527ec681f3SmrgTAG(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
27537ec681f3Smrg{
27547ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27557ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR4F(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
27567ec681f3Smrg}
27577ec681f3Smrg
27587ec681f3Smrgstatic void GLAPIENTRY
27597ec681f3SmrgTAG(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
27607ec681f3Smrg{
27617ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27627ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR4F(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y),
27637ec681f3Smrg                                      UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
27647ec681f3Smrg}
27657ec681f3Smrg
27667ec681f3Smrgstatic void GLAPIENTRY
27677ec681f3SmrgTAG(VertexAttrib1svNV)(GLuint index, const GLshort *v)
27687ec681f3Smrg{
27697ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27707ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR1F(index, (GLfloat) v[0]);
27717ec681f3Smrg}
27727ec681f3Smrg
27737ec681f3Smrgstatic void GLAPIENTRY
27747ec681f3SmrgTAG(VertexAttrib1dvNV)(GLuint index, const GLdouble *v)
27757ec681f3Smrg{
27767ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27777ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR1F(index, (GLfloat) v[0]);
27787ec681f3Smrg}
27797ec681f3Smrg
27807ec681f3Smrgstatic void GLAPIENTRY
27817ec681f3SmrgTAG(VertexAttrib2svNV)(GLuint index, const GLshort *v)
27827ec681f3Smrg{
27837ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27847ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR2F(index, (GLfloat) v[0], (GLfloat) v[1]);
27857ec681f3Smrg}
27867ec681f3Smrg
27877ec681f3Smrgstatic void GLAPIENTRY
27887ec681f3SmrgTAG(VertexAttrib2dvNV)(GLuint index, const GLdouble *v)
27897ec681f3Smrg{
27907ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27917ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR2F(index, (GLfloat) v[0], (GLfloat) v[1]);
27927ec681f3Smrg}
27937ec681f3Smrg
27947ec681f3Smrgstatic void GLAPIENTRY
27957ec681f3SmrgTAG(VertexAttrib3svNV)(GLuint index, const GLshort *v)
27967ec681f3Smrg{
27977ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
27987ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR3F(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
27997ec681f3Smrg}
28007ec681f3Smrg
28017ec681f3Smrgstatic void GLAPIENTRY
28027ec681f3SmrgTAG(VertexAttrib3dvNV)(GLuint index, const GLdouble *v)
28037ec681f3Smrg{
28047ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28057ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR3F(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
28067ec681f3Smrg}
28077ec681f3Smrg
28087ec681f3Smrgstatic void GLAPIENTRY
28097ec681f3SmrgTAG(VertexAttrib4svNV)(GLuint index, const GLshort *v)
28107ec681f3Smrg{
28117ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28127ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR4F(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2],
28137ec681f3Smrg         (GLfloat)v[3]);
28147ec681f3Smrg}
28157ec681f3Smrg
28167ec681f3Smrgstatic void GLAPIENTRY
28177ec681f3SmrgTAG(VertexAttrib4dvNV)(GLuint index, const GLdouble *v)
28187ec681f3Smrg{
28197ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28207ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR4F(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]);
28217ec681f3Smrg}
28227ec681f3Smrg
28237ec681f3Smrgstatic void GLAPIENTRY
28247ec681f3SmrgTAG(VertexAttrib4ubvNV)(GLuint index, const GLubyte *v)
28257ec681f3Smrg{
28267ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28277ec681f3Smrg   if (index < VBO_ATTRIB_MAX) ATTR4F(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]),
28287ec681f3Smrg         UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
28297ec681f3Smrg}
28307ec681f3Smrg
28317ec681f3Smrg
28327ec681f3Smrgstatic void GLAPIENTRY
28337ec681f3SmrgTAG(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort *v)
28347ec681f3Smrg{
28357ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28367ec681f3Smrg   GLint i;
28377ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
28387ec681f3Smrg   for (i = n - 1; i >= 0; i--)
28397ec681f3Smrg      ATTR1F(index + i, (GLfloat) v[i]);
28407ec681f3Smrg}
28417ec681f3Smrg
28427ec681f3Smrgstatic void GLAPIENTRY
28437ec681f3SmrgTAG(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat *v)
28447ec681f3Smrg{
28457ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28467ec681f3Smrg   GLint i;
28477ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
28487ec681f3Smrg   for (i = n - 1; i >= 0; i--)
28497ec681f3Smrg      ATTR1F(index + i, v[i]);
28507ec681f3Smrg}
28517ec681f3Smrg
28527ec681f3Smrgstatic void GLAPIENTRY
28537ec681f3SmrgTAG(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble *v)
28547ec681f3Smrg{
28557ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28567ec681f3Smrg   GLint i;
28577ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
28587ec681f3Smrg   for (i = n - 1; i >= 0; i--)
28597ec681f3Smrg      ATTR1F(index + i, (GLfloat) v[i]);
28607ec681f3Smrg}
28617ec681f3Smrg
28627ec681f3Smrgstatic void GLAPIENTRY
28637ec681f3SmrgTAG(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort *v)
28647ec681f3Smrg{
28657ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28667ec681f3Smrg   GLint i;
28677ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
28687ec681f3Smrg   for (i = n - 1; i >= 0; i--)
28697ec681f3Smrg      ATTR2F(index + i, (GLfloat) v[2 * i], (GLfloat) v[2 * i + 1]);
28707ec681f3Smrg}
28717ec681f3Smrg
28727ec681f3Smrgstatic void GLAPIENTRY
28737ec681f3SmrgTAG(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat *v)
28747ec681f3Smrg{
28757ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28767ec681f3Smrg   GLint i;
28777ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
28787ec681f3Smrg   for (i = n - 1; i >= 0; i--)
28797ec681f3Smrg      ATTR2F(index + i, v[2 * i], v[2 * i + 1]);
28807ec681f3Smrg}
28817ec681f3Smrg
28827ec681f3Smrgstatic void GLAPIENTRY
28837ec681f3SmrgTAG(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble *v)
28847ec681f3Smrg{
28857ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28867ec681f3Smrg   GLint i;
28877ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
28887ec681f3Smrg   for (i = n - 1; i >= 0; i--)
28897ec681f3Smrg      ATTR2F(index + i, (GLfloat) v[2 * i], (GLfloat) v[2 * i + 1]);
28907ec681f3Smrg}
28917ec681f3Smrg
28927ec681f3Smrgstatic void GLAPIENTRY
28937ec681f3SmrgTAG(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort *v)
28947ec681f3Smrg{
28957ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
28967ec681f3Smrg   GLint i;
28977ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
28987ec681f3Smrg   for (i = n - 1; i >= 0; i--)
28997ec681f3Smrg      ATTR3F(index + i, (GLfloat) v[3 * i], (GLfloat) v[3 * i + 1], (GLfloat) v[3 * i + 2]);
29007ec681f3Smrg}
29017ec681f3Smrg
29027ec681f3Smrgstatic void GLAPIENTRY
29037ec681f3SmrgTAG(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat *v)
29047ec681f3Smrg{
29057ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
29067ec681f3Smrg   GLint i;
29077ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
29087ec681f3Smrg   for (i = n - 1; i >= 0; i--)
29097ec681f3Smrg      ATTR3F(index + i, v[3 * i], v[3 * i + 1], v[3 * i + 2]);
29107ec681f3Smrg}
29117ec681f3Smrg
29127ec681f3Smrgstatic void GLAPIENTRY
29137ec681f3SmrgTAG(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble *v)
29147ec681f3Smrg{
29157ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
29167ec681f3Smrg   GLint i;
29177ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
29187ec681f3Smrg   for (i = n - 1; i >= 0; i--)
29197ec681f3Smrg      ATTR3F(index + i, (GLfloat) v[3 * i], (GLfloat) v[3 * i + 1], (GLfloat) v[3 * i + 2]);
29207ec681f3Smrg}
29217ec681f3Smrg
29227ec681f3Smrgstatic void GLAPIENTRY
29237ec681f3SmrgTAG(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort *v)
29247ec681f3Smrg{
29257ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
29267ec681f3Smrg   GLint i;
29277ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
29287ec681f3Smrg   for (i = n - 1; i >= 0; i--)
29297ec681f3Smrg      ATTR4F(index + i, (GLfloat) v[4 * i], (GLfloat) v[4 * i + 1], (GLfloat) v[4 * i + 2], (GLfloat) v[4 * i + 3]);
29307ec681f3Smrg}
29317ec681f3Smrg
29327ec681f3Smrgstatic void GLAPIENTRY
29337ec681f3SmrgTAG(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat *v)
29347ec681f3Smrg{
29357ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
29367ec681f3Smrg   GLint i;
29377ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
29387ec681f3Smrg   for (i = n - 1; i >= 0; i--)
29397ec681f3Smrg      ATTR4F(index + i, v[4 * i], v[4 * i + 1], v[4 * i + 2], v[4 * i + 3]);
29407ec681f3Smrg}
29417ec681f3Smrg
29427ec681f3Smrgstatic void GLAPIENTRY
29437ec681f3SmrgTAG(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble *v)
29447ec681f3Smrg{
29457ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
29467ec681f3Smrg   GLint i;
29477ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
29487ec681f3Smrg   for (i = n - 1; i >= 0; i--)
29497ec681f3Smrg      ATTR4F(index + i, (GLfloat) v[4 * i], (GLfloat) v[4 * i + 1], (GLfloat) v[4 * i + 2], (GLfloat) v[4 * i + 3]);
29507ec681f3Smrg}
29517ec681f3Smrg
29527ec681f3Smrgstatic void GLAPIENTRY
29537ec681f3SmrgTAG(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte *v)
29547ec681f3Smrg{
29557ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
29567ec681f3Smrg   GLint i;
29577ec681f3Smrg   n = MIN2(n, VBO_ATTRIB_MAX - index);
29587ec681f3Smrg   for (i = n - 1; i >= 0; i--)
29597ec681f3Smrg      ATTR4F(index + i, UBYTE_TO_FLOAT(v[4 * i]), UBYTE_TO_FLOAT(v[4 * i + 1]),
29607ec681f3Smrg             UBYTE_TO_FLOAT(v[4 * i + 2]), UBYTE_TO_FLOAT(v[4 * i + 3]));
29617ec681f3Smrg}
29627ec681f3Smrg
29637ec681f3Smrg
29647ec681f3Smrg/*
29657ec681f3Smrg * GL_ARB_vertex_program
29667ec681f3Smrg * Note that attribute indexes do NOT alias conventional attributes.
29677ec681f3Smrg */
29687ec681f3Smrg
29697ec681f3Smrgstatic void GLAPIENTRY
29707ec681f3SmrgTAG(VertexAttrib1s)(GLuint index, GLshort x)
29717ec681f3Smrg{
29727ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
29737ec681f3Smrg   if (is_vertex_position(ctx, index))
29747ec681f3Smrg      ATTR1F(0, (GLfloat) x);
29757ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
29767ec681f3Smrg      ATTR1F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) x);
29777ec681f3Smrg   else
29787ec681f3Smrg      ERROR(GL_INVALID_VALUE);
29797ec681f3Smrg}
29807ec681f3Smrg
29817ec681f3Smrgstatic void GLAPIENTRY
29827ec681f3SmrgTAG(VertexAttrib1d)(GLuint index, GLdouble x)
29837ec681f3Smrg{
29847ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
29857ec681f3Smrg   if (is_vertex_position(ctx, index))
29867ec681f3Smrg      ATTR1F(0, (GLfloat) x);
29877ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
29887ec681f3Smrg      ATTR1F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) x);
29897ec681f3Smrg   else
29907ec681f3Smrg      ERROR(GL_INVALID_VALUE);
29917ec681f3Smrg}
29927ec681f3Smrg
29937ec681f3Smrgstatic void GLAPIENTRY
29947ec681f3SmrgTAG(VertexAttrib2s)(GLuint index, GLshort x, GLshort y)
29957ec681f3Smrg{
29967ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
29977ec681f3Smrg   if (is_vertex_position(ctx, index))
29987ec681f3Smrg      ATTR2F(0, (GLfloat) x, (GLfloat) y);
29997ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
30007ec681f3Smrg      ATTR2F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) x, (GLfloat) y);
30017ec681f3Smrg   else
30027ec681f3Smrg      ERROR(GL_INVALID_VALUE);
30037ec681f3Smrg}
30047ec681f3Smrg
30057ec681f3Smrgstatic void GLAPIENTRY
30067ec681f3SmrgTAG(VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y)
30077ec681f3Smrg{
30087ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
30097ec681f3Smrg   if (is_vertex_position(ctx, index))
30107ec681f3Smrg      ATTR2F(0, (GLfloat) x, (GLfloat) y);
30117ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
30127ec681f3Smrg      ATTR2F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) x, (GLfloat) y);
30137ec681f3Smrg   else
30147ec681f3Smrg      ERROR(GL_INVALID_VALUE);
30157ec681f3Smrg}
30167ec681f3Smrg
30177ec681f3Smrgstatic void GLAPIENTRY
30187ec681f3SmrgTAG(VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z)
30197ec681f3Smrg{
30207ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
30217ec681f3Smrg   if (is_vertex_position(ctx, index))
30227ec681f3Smrg      ATTR3F(0, (GLfloat) x, (GLfloat) y, (GLfloat) z);
30237ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
30247ec681f3Smrg      ATTR3F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
30257ec681f3Smrg   else
30267ec681f3Smrg      ERROR(GL_INVALID_VALUE);
30277ec681f3Smrg}
30287ec681f3Smrg
30297ec681f3Smrgstatic void GLAPIENTRY
30307ec681f3SmrgTAG(VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z)
30317ec681f3Smrg{
30327ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
30337ec681f3Smrg   if (is_vertex_position(ctx, index))
30347ec681f3Smrg      ATTR3F(0, (GLfloat) x, (GLfloat) y, (GLfloat) z);
30357ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
30367ec681f3Smrg      ATTR3F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
30377ec681f3Smrg   else
30387ec681f3Smrg      ERROR(GL_INVALID_VALUE);
30397ec681f3Smrg}
30407ec681f3Smrg
30417ec681f3Smrgstatic void GLAPIENTRY
30427ec681f3SmrgTAG(VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
30437ec681f3Smrg{
30447ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
30457ec681f3Smrg   if (is_vertex_position(ctx, index))
30467ec681f3Smrg      ATTR4F(0, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
30477ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
30487ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
30497ec681f3Smrg   else
30507ec681f3Smrg      ERROR(GL_INVALID_VALUE);
30517ec681f3Smrg}
30527ec681f3Smrg
30537ec681f3Smrgstatic void GLAPIENTRY
30547ec681f3SmrgTAG(VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
30557ec681f3Smrg{
30567ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
30577ec681f3Smrg   if (is_vertex_position(ctx, index))
30587ec681f3Smrg      ATTR4F(0, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
30597ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
30607ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
30617ec681f3Smrg   else
30627ec681f3Smrg      ERROR(GL_INVALID_VALUE);
30637ec681f3Smrg}
30647ec681f3Smrg
30657ec681f3Smrgstatic void GLAPIENTRY
30667ec681f3SmrgTAG(VertexAttrib1sv)(GLuint index, const GLshort *v)
30677ec681f3Smrg{
30687ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
30697ec681f3Smrg   if (is_vertex_position(ctx, index))
30707ec681f3Smrg      ATTR1F(0, (GLfloat) v[0]);
30717ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
30727ec681f3Smrg      ATTR1F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0]);
30737ec681f3Smrg   else
30747ec681f3Smrg      ERROR(GL_INVALID_VALUE);
30757ec681f3Smrg}
30767ec681f3Smrg
30777ec681f3Smrgstatic void GLAPIENTRY
30787ec681f3SmrgTAG(VertexAttrib1dv)(GLuint index, const GLdouble *v)
30797ec681f3Smrg{
30807ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
30817ec681f3Smrg   if (is_vertex_position(ctx, index))
30827ec681f3Smrg      ATTR1F(0, (GLfloat) v[0]);
30837ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
30847ec681f3Smrg      ATTR1F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0]);
30857ec681f3Smrg   else
30867ec681f3Smrg      ERROR(GL_INVALID_VALUE);
30877ec681f3Smrg}
30887ec681f3Smrg
30897ec681f3Smrgstatic void GLAPIENTRY
30907ec681f3SmrgTAG(VertexAttrib2sv)(GLuint index, const GLshort *v)
30917ec681f3Smrg{
30927ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
30937ec681f3Smrg   if (is_vertex_position(ctx, index))
30947ec681f3Smrg      ATTR2F(0, (GLfloat) v[0], (GLfloat) v[1]);
30957ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
30967ec681f3Smrg      ATTR2F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1]);
30977ec681f3Smrg   else
30987ec681f3Smrg      ERROR(GL_INVALID_VALUE);
30997ec681f3Smrg}
31007ec681f3Smrg
31017ec681f3Smrgstatic void GLAPIENTRY
31027ec681f3SmrgTAG(VertexAttrib2dv)(GLuint index, const GLdouble *v)
31037ec681f3Smrg{
31047ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
31057ec681f3Smrg   if (is_vertex_position(ctx, index))
31067ec681f3Smrg      ATTR2F(0, (GLfloat) v[0], (GLfloat) v[1]);
31077ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
31087ec681f3Smrg      ATTR2F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1]);
31097ec681f3Smrg   else
31107ec681f3Smrg      ERROR(GL_INVALID_VALUE);
31117ec681f3Smrg}
31127ec681f3Smrg
31137ec681f3Smrgstatic void GLAPIENTRY
31147ec681f3SmrgTAG(VertexAttrib3sv)(GLuint index, const GLshort *v)
31157ec681f3Smrg{
31167ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
31177ec681f3Smrg   if (is_vertex_position(ctx, index))
31187ec681f3Smrg      ATTR3F(0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
31197ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
31207ec681f3Smrg      ATTR3F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
31217ec681f3Smrg   else
31227ec681f3Smrg      ERROR(GL_INVALID_VALUE);
31237ec681f3Smrg}
31247ec681f3Smrg
31257ec681f3Smrgstatic void GLAPIENTRY
31267ec681f3SmrgTAG(VertexAttrib3dv)(GLuint index, const GLdouble *v)
31277ec681f3Smrg{
31287ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
31297ec681f3Smrg   if (is_vertex_position(ctx, index))
31307ec681f3Smrg      ATTR3F(0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
31317ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
31327ec681f3Smrg      ATTR3F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
31337ec681f3Smrg   else
31347ec681f3Smrg      ERROR(GL_INVALID_VALUE);
31357ec681f3Smrg}
31367ec681f3Smrg
31377ec681f3Smrgstatic void GLAPIENTRY
31387ec681f3SmrgTAG(VertexAttrib4sv)(GLuint index, const GLshort *v)
31397ec681f3Smrg{
31407ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
31417ec681f3Smrg   if (is_vertex_position(ctx, index))
31427ec681f3Smrg      ATTR4F(0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31437ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
31447ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31457ec681f3Smrg   else
31467ec681f3Smrg      ERROR(GL_INVALID_VALUE);
31477ec681f3Smrg}
31487ec681f3Smrg
31497ec681f3Smrgstatic void GLAPIENTRY
31507ec681f3SmrgTAG(VertexAttrib4dv)(GLuint index, const GLdouble *v)
31517ec681f3Smrg{
31527ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
31537ec681f3Smrg   if (is_vertex_position(ctx, index))
31547ec681f3Smrg      ATTR4F(0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31557ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
31567ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31577ec681f3Smrg   else
31587ec681f3Smrg      ERROR(GL_INVALID_VALUE);
31597ec681f3Smrg}
31607ec681f3Smrg
31617ec681f3Smrgstatic void GLAPIENTRY
31627ec681f3SmrgTAG(VertexAttrib4bv)(GLuint index, const GLbyte * v)
31637ec681f3Smrg{
31647ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
31657ec681f3Smrg   if (is_vertex_position(ctx, index))
31667ec681f3Smrg      ATTR4F(0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31677ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
31687ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31697ec681f3Smrg   else
31707ec681f3Smrg      ERROR(GL_INVALID_VALUE);
31717ec681f3Smrg}
31727ec681f3Smrg
31737ec681f3Smrgstatic void GLAPIENTRY
31747ec681f3SmrgTAG(VertexAttrib4iv)(GLuint index, const GLint * v)
31757ec681f3Smrg{
31767ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
31777ec681f3Smrg   if (is_vertex_position(ctx, index))
31787ec681f3Smrg      ATTR4F(0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31797ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
31807ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31817ec681f3Smrg   else
31827ec681f3Smrg      ERROR(GL_INVALID_VALUE);
31837ec681f3Smrg}
31847ec681f3Smrg
31857ec681f3Smrgstatic void GLAPIENTRY
31867ec681f3SmrgTAG(VertexAttrib4ubv)(GLuint index, const GLubyte * v)
31877ec681f3Smrg{
31887ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
31897ec681f3Smrg   if (is_vertex_position(ctx, index))
31907ec681f3Smrg      ATTR4F(0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31917ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
31927ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
31937ec681f3Smrg   else
31947ec681f3Smrg      ERROR(GL_INVALID_VALUE);
31957ec681f3Smrg}
31967ec681f3Smrg
31977ec681f3Smrgstatic void GLAPIENTRY
31987ec681f3SmrgTAG(VertexAttrib4usv)(GLuint index, const GLushort * v)
31997ec681f3Smrg{
32007ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
32017ec681f3Smrg   if (is_vertex_position(ctx, index))
32027ec681f3Smrg      ATTR4F(0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
32037ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
32047ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
32057ec681f3Smrg   else
32067ec681f3Smrg      ERROR(GL_INVALID_VALUE);
32077ec681f3Smrg}
32087ec681f3Smrg
32097ec681f3Smrgstatic void GLAPIENTRY
32107ec681f3SmrgTAG(VertexAttrib4uiv)(GLuint index, const GLuint * v)
32117ec681f3Smrg{
32127ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
32137ec681f3Smrg   if (is_vertex_position(ctx, index))
32147ec681f3Smrg      ATTR4F(0, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
32157ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
32167ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]);
32177ec681f3Smrg   else
32187ec681f3Smrg      ERROR(GL_INVALID_VALUE);
32197ec681f3Smrg}
32207ec681f3Smrg
32217ec681f3Smrgstatic void GLAPIENTRY
32227ec681f3SmrgTAG(VertexAttrib4Nbv)(GLuint index, const GLbyte * v)
32237ec681f3Smrg{
32247ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
32257ec681f3Smrg   if (is_vertex_position(ctx, index))
32267ec681f3Smrg      ATTR4F(0, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]));
32277ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
32287ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]));
32297ec681f3Smrg   else
32307ec681f3Smrg      ERROR(GL_INVALID_VALUE);
32317ec681f3Smrg}
32327ec681f3Smrg
32337ec681f3Smrgstatic void GLAPIENTRY
32347ec681f3SmrgTAG(VertexAttrib4Nsv)(GLuint index, const GLshort * v)
32357ec681f3Smrg{
32367ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
32377ec681f3Smrg   if (is_vertex_position(ctx, index))
32387ec681f3Smrg      ATTR4F(0, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]));
32397ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
32407ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]));
32417ec681f3Smrg   else
32427ec681f3Smrg      ERROR(GL_INVALID_VALUE);
32437ec681f3Smrg}
32447ec681f3Smrg
32457ec681f3Smrgstatic void GLAPIENTRY
32467ec681f3SmrgTAG(VertexAttrib4Niv)(GLuint index, const GLint * v)
32477ec681f3Smrg{
32487ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
32497ec681f3Smrg   if (is_vertex_position(ctx, index))
32507ec681f3Smrg      ATTR4F(0, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]));
32517ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
32527ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]));
32537ec681f3Smrg   else
32547ec681f3Smrg      ERROR(GL_INVALID_VALUE);
32557ec681f3Smrg}
32567ec681f3Smrg
32577ec681f3Smrgstatic void GLAPIENTRY
32587ec681f3SmrgTAG(VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
32597ec681f3Smrg{
32607ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
32617ec681f3Smrg   if (is_vertex_position(ctx, index))
32627ec681f3Smrg      ATTR4F(0, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y), UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
32637ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
32647ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y), UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w));
32657ec681f3Smrg   else
32667ec681f3Smrg      ERROR(GL_INVALID_VALUE);
32677ec681f3Smrg}
32687ec681f3Smrg
32697ec681f3Smrgstatic void GLAPIENTRY
32707ec681f3SmrgTAG(VertexAttrib4Nubv)(GLuint index, const GLubyte * v)
32717ec681f3Smrg{
32727ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
32737ec681f3Smrg   if (is_vertex_position(ctx, index))
32747ec681f3Smrg      ATTR4F(0, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
32757ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
32767ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]));
32777ec681f3Smrg   else
32787ec681f3Smrg      ERROR(GL_INVALID_VALUE);
32797ec681f3Smrg}
32807ec681f3Smrg
32817ec681f3Smrgstatic void GLAPIENTRY
32827ec681f3SmrgTAG(VertexAttrib4Nusv)(GLuint index, const GLushort * v)
32837ec681f3Smrg{
32847ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
32857ec681f3Smrg   if (is_vertex_position(ctx, index))
32867ec681f3Smrg      ATTR4F(0, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]));
32877ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
32887ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]));
32897ec681f3Smrg   else
32907ec681f3Smrg      ERROR(GL_INVALID_VALUE);
32917ec681f3Smrg}
32927ec681f3Smrg
32937ec681f3Smrgstatic void GLAPIENTRY
32947ec681f3SmrgTAG(VertexAttrib4Nuiv)(GLuint index, const GLuint * v)
32957ec681f3Smrg{
32967ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
32977ec681f3Smrg   if (is_vertex_position(ctx, index))
32987ec681f3Smrg      ATTR4F(0, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]));
32997ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
33007ec681f3Smrg      ATTR4F(VBO_ATTRIB_GENERIC0 + index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]));
33017ec681f3Smrg   else
33027ec681f3Smrg      ERROR(GL_INVALID_VALUE);
33037ec681f3Smrg}
33047ec681f3Smrg
33057ec681f3Smrg
33067ec681f3Smrg
33077ec681f3Smrg/**
33087ec681f3Smrg * GL_EXT_gpu_shader / GL 3.0 signed/unsigned integer-valued attributes.
33097ec681f3Smrg * Note that attribute indexes do NOT alias conventional attributes.
33107ec681f3Smrg */
33117ec681f3Smrg
33127ec681f3Smrgstatic void GLAPIENTRY
33137ec681f3SmrgTAG(VertexAttribI1iv)(GLuint index, const GLint *v)
33147ec681f3Smrg{
33157ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
33167ec681f3Smrg   if (is_vertex_position(ctx, index))
33177ec681f3Smrg      ATTR1I(0, v[0]);
33187ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
33197ec681f3Smrg      ATTR1I(VBO_ATTRIB_GENERIC0 + index, v[0]);
33207ec681f3Smrg   else
33217ec681f3Smrg      ERROR(GL_INVALID_VALUE);
33227ec681f3Smrg}
33237ec681f3Smrg
33247ec681f3Smrgstatic void GLAPIENTRY
33257ec681f3SmrgTAG(VertexAttribI1uiv)(GLuint index, const GLuint *v)
33267ec681f3Smrg{
33277ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
33287ec681f3Smrg   if (is_vertex_position(ctx, index))
33297ec681f3Smrg      ATTR1UI(0, v[0]);
33307ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
33317ec681f3Smrg      ATTR1UI(VBO_ATTRIB_GENERIC0 + index, v[0]);
33327ec681f3Smrg   else
33337ec681f3Smrg      ERROR(GL_INVALID_VALUE);
33347ec681f3Smrg}
33357ec681f3Smrg
33367ec681f3Smrgstatic void GLAPIENTRY
33377ec681f3SmrgTAG(VertexAttribI4bv)(GLuint index, const GLbyte *v)
33387ec681f3Smrg{
33397ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
33407ec681f3Smrg   if (is_vertex_position(ctx, index))
33417ec681f3Smrg      ATTR4I(0, v[0], v[1], v[2], v[3]);
33427ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
33437ec681f3Smrg      ATTR4I(VBO_ATTRIB_GENERIC0 + index, v[0], v[1], v[2], v[3]);
33447ec681f3Smrg   else
33457ec681f3Smrg      ERROR(GL_INVALID_VALUE);
33467ec681f3Smrg}
33477ec681f3Smrg
33487ec681f3Smrgstatic void GLAPIENTRY
33497ec681f3SmrgTAG(VertexAttribI4sv)(GLuint index, const GLshort *v)
33507ec681f3Smrg{
33517ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
33527ec681f3Smrg   if (is_vertex_position(ctx, index))
33537ec681f3Smrg      ATTR4I(0, v[0], v[1], v[2], v[3]);
33547ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
33557ec681f3Smrg      ATTR4I(VBO_ATTRIB_GENERIC0 + index, v[0], v[1], v[2], v[3]);
33567ec681f3Smrg   else
33577ec681f3Smrg      ERROR(GL_INVALID_VALUE);
33587ec681f3Smrg}
33597ec681f3Smrg
33607ec681f3Smrgstatic void GLAPIENTRY
33617ec681f3SmrgTAG(VertexAttribI4ubv)(GLuint index, const GLubyte *v)
33627ec681f3Smrg{
33637ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
33647ec681f3Smrg   if (is_vertex_position(ctx, index))
33657ec681f3Smrg      ATTR4UI(0, v[0], v[1], v[2], v[3]);
33667ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
33677ec681f3Smrg      ATTR4UI(VBO_ATTRIB_GENERIC0 + index, v[0], v[1], v[2], v[3]);
33687ec681f3Smrg   else
33697ec681f3Smrg      ERROR(GL_INVALID_VALUE);
33707ec681f3Smrg}
33717ec681f3Smrg
33727ec681f3Smrgstatic void GLAPIENTRY
33737ec681f3SmrgTAG(VertexAttribI4usv)(GLuint index, const GLushort *v)
33747ec681f3Smrg{
33757ec681f3Smrg   GET_CURRENT_CONTEXT(ctx);
33767ec681f3Smrg   if (is_vertex_position(ctx, index))
33777ec681f3Smrg      ATTR4UI(0, v[0], v[1], v[2], v[3]);
33787ec681f3Smrg   else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
33797ec681f3Smrg      ATTR4UI(VBO_ATTRIB_GENERIC0 + index, v[0], v[1], v[2], v[3]);
33807ec681f3Smrg   else
33817ec681f3Smrg      ERROR(GL_INVALID_VALUE);
33827ec681f3Smrg}
33837ec681f3Smrg
33847117f1b4Smrg#undef ATTR1FV
33857117f1b4Smrg#undef ATTR2FV
33867117f1b4Smrg#undef ATTR3FV
33877117f1b4Smrg#undef ATTR4FV
33887117f1b4Smrg
33897117f1b4Smrg#undef ATTR1F
33907117f1b4Smrg#undef ATTR2F
33917117f1b4Smrg#undef ATTR3F
33927117f1b4Smrg#undef ATTR4F
33937117f1b4Smrg
3394af69d88dSmrg#undef ATTR_UI
3395af69d88dSmrg
33967117f1b4Smrg#undef MAT
3397