122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes/* 222144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * Mesa 3-D graphics library 3095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul * Version: 6.5.1 422144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 5eec33cc310ce2b99164d182719c8d6d54b80a704Brian Paul * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 722144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * Permission is hereby granted, free of charge, to any person obtaining a 822144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * copy of this software and associated documentation files (the "Software"), 922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * to deal in the Software without restriction, including without limitation 1022144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * the rights to use, copy, modify, merge, publish, distribute, sublicense, 1122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * and/or sell copies of the Software, and to permit persons to whom the 1222144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * Software is furnished to do so, subject to the following conditions: 1322144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 1422144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * The above copyright notice and this permission notice shall be included 1522144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * in all copies or substantial portions of the Software. 1622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * 1722144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1822144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 2022144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 2122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2222144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2322144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes */ 2422144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes 2555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul/** 2655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul * This file implements the glArrayElement() function. 2755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul * It involves looking at the format/type of all the enabled vertex arrays 2855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul * and emitting a list of pointers to functions which set the per-vertex 2955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul * state for the element/index. 3055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul */ 3155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul 3255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul 33fc00cbe8d1ac48faf345e41a13757a8a1e2e5ebeKeith Whitwell/* Author: 3405a4b37707d2c598ea68c05d07a3d65bcbf5a076Brian Paul * Keith Whitwell <keith@tungstengraphics.com> 35fc00cbe8d1ac48faf345e41a13757a8a1e2e5ebeKeith Whitwell */ 36fc00cbe8d1ac48faf345e41a13757a8a1e2e5ebeKeith Whitwell 37cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell#include "glheader.h" 384b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell#include "api_arrayelt.h" 39434ec3ada841915a00ffc23f699401eb3e7b37eeBrian Paul#include "bufferobj.h" 40cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell#include "context.h" 413c63452e64df7e10aa073c6c3b9492b1d7dabbb8Brian Paul#include "imports.h" 42cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell#include "macros.h" 43db61b9ce39bccc43140357652ceb78baaf2aea44Vinson Lee#include "mfeatures.h" 440117da40cd7edd3d165bb28569c289b37eca12b9Vinson Lee#include "mtypes.h" 452cf44390d1e819f23e1d7ceb3199276c9148c647Chia-I Wu#include "main/dispatch.h" 46cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 47faaf78aeb0e18c75c9b204a634f296b9c056cf5cRoland Scheideggertypedef void (GLAPIENTRY *array_func)( const void * ); 480aa8a1062a06616fad18a1901afb5fa67fdcf82aBrian Paul 49cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwelltypedef struct { 500d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul const struct gl_client_array *array; 519bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick int offset; 52faaf78aeb0e18c75c9b204a634f296b9c056cf5cRoland Scheidegger} AEarray; 530aa8a1062a06616fad18a1901afb5fa67fdcf82aBrian Paul 540d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paultypedef void (GLAPIENTRY *attrib_func)( GLuint indx, const void *data ); 550d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 560d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paultypedef struct { 570d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul const struct gl_client_array *array; 580d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul attrib_func func; 590d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul GLuint index; 600d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} AEattrib; 610d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 620aa8a1062a06616fad18a1901afb5fa67fdcf82aBrian Paultypedef struct { 6353ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul AEarray arrays[32]; 640d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul AEattrib attribs[VERT_ATTRIB_MAX + 1]; 65cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell GLuint NewState; 66b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 67b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell struct gl_buffer_object *vbo[VERT_ATTRIB_MAX]; 68b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell GLuint nr_vbos; 69b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell GLboolean mapped_vbos; 70b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 714b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell} AEcontext; 724b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell 734b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell#define AE_CONTEXT(ctx) ((AEcontext *)(ctx)->aelt_context) 740d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 759bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick 760d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* 770d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul * Convert GL_BYTE, GL_UNSIGNED_BYTE, .. GL_DOUBLE into an integer 780d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul * in the range [0, 7]. Luckily these type tokens are sequentially 79f2f33507748260fe766742a0ed8b02c49d548bd8Brian Paul * numbered in gl.h, except for GL_DOUBLE. 800d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul */ 81f2f33507748260fe766742a0ed8b02c49d548bd8Brian Paul#define TYPE_IDX(t) ( (t) == GL_DOUBLE ? 7 : (t) & 7 ) 82cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 8355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul#define NUM_TYPES 8 8455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul 8580630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu 8680630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu#if FEATURE_arrayelt 8780630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu 8880630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu 8955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paulstatic const int ColorFuncs[2][NUM_TYPES] = { 9094987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson { 919bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color3bv, 929bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color3ubv, 939bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color3sv, 949bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color3usv, 959bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color3iv, 969bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color3uiv, 979bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color3fv, 989bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color3dv, 9994987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson }, 10094987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson { 1019bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color4bv, 1029bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color4ubv, 1039bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color4sv, 1049bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color4usv, 1059bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color4iv, 1069bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color4uiv, 1079bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color4fv, 1089bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Color4dv, 10994987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson }, 11053ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul}; 11153ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul 11255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paulstatic const int VertexFuncs[3][NUM_TYPES] = { 11394987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson { 1149bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1159bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1169bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex2sv, 1179bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1189bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex2iv, 1199bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1209bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex2fv, 1219bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex2dv, 12294987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson }, 12394987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson { 1249bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1259bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1269bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex3sv, 1279bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1289bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex3iv, 1299bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1309bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex3fv, 1319bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex3dv, 13294987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson }, 13394987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson { 1349bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1359bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1369bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex4sv, 1379bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1389bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex4iv, 1399bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1409bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex4fv, 1419bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Vertex4dv, 14294987beb2c9e87d9c55db5cb7c089dc77f78df94Adam Jackson }, 14353ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul}; 14453ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul 14555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paulstatic const int IndexFuncs[NUM_TYPES] = { 1469bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1479bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Indexubv, 1489bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Indexsv, 1499bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1509bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Indexiv, 1519bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1529bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Indexfv, 1539bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Indexdv, 154cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell}; 155cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 15655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paulstatic const int NormalFuncs[NUM_TYPES] = { 1579bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Normal3bv, 1589bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1599bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Normal3sv, 1609bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1619bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Normal3iv, 1629bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick -1, 1639bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Normal3fv, 1649bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick _gloffset_Normal3dv, 16553ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul}; 16653ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul 1670f1d98c422129b002bd3d90699da7fe8286b3c47Brian Paul/* Note: _gloffset_* for these may not be a compile-time constant. */ 16855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paulstatic int SecondaryColorFuncs[NUM_TYPES]; 16955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paulstatic int FogCoordFuncs[NUM_TYPES]; 17053ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul 171095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 172095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/** 173095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul ** GL_NV_vertex_program 174095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul **/ 1750d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 1760d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* GL_BYTE attributes */ 1770d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 1787fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 17955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NbvNV(GLuint index, const GLbyte *v) 1800d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 1819bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]))); 1820d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 1830d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 1847fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 18555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1bvNV(GLuint index, const GLbyte *v) 1860d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 187c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); 1880d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 1890d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 1907fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 19155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NbvNV(GLuint index, const GLbyte *v) 1920d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 1939bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]))); 1940d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 1950d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 1967fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 19755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2bvNV(GLuint index, const GLbyte *v) 1980d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 199c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); 2000d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2010d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2027fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 20355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NbvNV(GLuint index, const GLbyte *v) 2040d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 2059bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), 2069bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick BYTE_TO_FLOAT(v[1]), 2079bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick BYTE_TO_FLOAT(v[2]))); 2080d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2090d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2107fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 21155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3bvNV(GLuint index, const GLbyte *v) 2120d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 213c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); 2140d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2150d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2167fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 21755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NbvNV(GLuint index, const GLbyte *v) 2180d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 2199bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), 2209bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick BYTE_TO_FLOAT(v[1]), 2219bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick BYTE_TO_FLOAT(v[2]), 2229bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick BYTE_TO_FLOAT(v[3]))); 2230d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2240d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2257fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 22655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4bvNV(GLuint index, const GLbyte *v) 2270d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 228c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); 2290d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2300d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2310d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* GL_UNSIGNED_BYTE attributes */ 2320d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2337fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 23455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NubvNV(GLuint index, const GLubyte *v) 2350d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 2369bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]))); 2370d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2380d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2397fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 24055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1ubvNV(GLuint index, const GLubyte *v) 2410d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 242c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); 2430d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2440d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2457fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 24655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NubvNV(GLuint index, const GLubyte *v) 2470d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 2489bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]), 24955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[1]))); 2500d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2510d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2527fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 25355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2ubvNV(GLuint index, const GLubyte *v) 2540d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 255c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); 2560d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2570d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2587fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 25955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NubvNV(GLuint index, const GLubyte *v) 2600d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 2619bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]), 2629bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick UBYTE_TO_FLOAT(v[1]), 2639bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick UBYTE_TO_FLOAT(v[2]))); 2640d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2657fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 26655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3ubvNV(GLuint index, const GLubyte *v) 2670d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 26855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], 26955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1], (GLfloat)v[2])); 2700d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2710d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2727fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 27355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NubvNV(GLuint index, const GLubyte *v) 2740d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 2759bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]), 27655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[1]), 27755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[2]), 27855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[3]))); 2790d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2800d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2817fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 28255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4ubvNV(GLuint index, const GLubyte *v) 2830d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 28455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], 28555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1], (GLfloat)v[2], 28655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[3])); 2870d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2880d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2890d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* GL_SHORT attributes */ 2900d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2917fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 29255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NsvNV(GLuint index, const GLshort *v) 2930d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 2949bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]))); 2950d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 2960d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 2977fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 29855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1svNV(GLuint index, const GLshort *v) 2990d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 300c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); 3010d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3020d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3037fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 30455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NsvNV(GLuint index, const GLshort *v) 3050d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 3069bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]), 30755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul SHORT_TO_FLOAT(v[1]))); 3080d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3090d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3107fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 31155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2svNV(GLuint index, const GLshort *v) 3120d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 313c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); 3140d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3150d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3167fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 31755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NsvNV(GLuint index, const GLshort *v) 3180d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 3199bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]), 320c1d455f5827e7044dcb316dadc755a6f91299906Ian Romanick SHORT_TO_FLOAT(v[1]), 3219bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick SHORT_TO_FLOAT(v[2]))); 3220d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3230d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3247fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 32555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3svNV(GLuint index, const GLshort *v) 3260d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 32755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 32855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2])); 3290d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3300d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3317fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 33255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NsvNV(GLuint index, const GLshort *v) 3330d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 3349bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]), 335c1d455f5827e7044dcb316dadc755a6f91299906Ian Romanick SHORT_TO_FLOAT(v[1]), 336c1d455f5827e7044dcb316dadc755a6f91299906Ian Romanick SHORT_TO_FLOAT(v[2]), 3379bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick SHORT_TO_FLOAT(v[3]))); 3380d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3390d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3407fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 34155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4svNV(GLuint index, const GLshort *v) 3420d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 34355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 34455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2], (GLfloat)v[3])); 3450d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3460d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3470d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* GL_UNSIGNED_SHORT attributes */ 3480d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3497fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 35055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NusvNV(GLuint index, const GLushort *v) 3510d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 3529bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]))); 3530d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3540d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3557fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 35655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1usvNV(GLuint index, const GLushort *v) 3570d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 358c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); 3590d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3600d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3617fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 36255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NusvNV(GLuint index, const GLushort *v) 3630d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 3649bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), 3659bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick USHORT_TO_FLOAT(v[1]))); 3660d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3670d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3687fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 36955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2usvNV(GLuint index, const GLushort *v) 3700d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 37155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], 37255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1])); 3730d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3740d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3757fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 37655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NusvNV(GLuint index, const GLushort *v) 3770d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 3789bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), 3799bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick USHORT_TO_FLOAT(v[1]), 3809bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick USHORT_TO_FLOAT(v[2]))); 3810d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3820d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3837fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 38455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3usvNV(GLuint index, const GLushort *v) 3850d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 38655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 38755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2])); 3880d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3890d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3907fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 39155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NusvNV(GLuint index, const GLushort *v) 3920d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 3939bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), 3949bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick USHORT_TO_FLOAT(v[1]), 3959bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick USHORT_TO_FLOAT(v[2]), 3969bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick USHORT_TO_FLOAT(v[3]))); 3970d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 3980d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 3997fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 40055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4usvNV(GLuint index, const GLushort *v) 4010d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 40255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 40355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2], (GLfloat)v[3])); 4040d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4050d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4060d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* GL_INT attributes */ 4070d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4087fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 40955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NivNV(GLuint index, const GLint *v) 4100d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 4119bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]))); 4120d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4130d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4147fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 41555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1ivNV(GLuint index, const GLint *v) 4160d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 417c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); 4180d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4190d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4207fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 42155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NivNV(GLuint index, const GLint *v) 4220d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 4239bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), 4249bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick INT_TO_FLOAT(v[1]))); 4250d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4260d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4277fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 42855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2ivNV(GLuint index, const GLint *v) 4290d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 430c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); 4310d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4320d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4337fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 43455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NivNV(GLuint index, const GLint *v) 4350d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 4369bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), 4379bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick INT_TO_FLOAT(v[1]), 4389bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick INT_TO_FLOAT(v[2]))); 4390d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4400d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4417fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 44255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3ivNV(GLuint index, const GLint *v) 4430d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 44455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 44555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2])); 4460d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4470d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4487fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 44955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NivNV(GLuint index, const GLint *v) 4500d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 4519bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), 45255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul INT_TO_FLOAT(v[1]), 45355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul INT_TO_FLOAT(v[2]), 45455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul INT_TO_FLOAT(v[3]))); 4550d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4560d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4577fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 45855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4ivNV(GLuint index, const GLint *v) 4590d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 46055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 46155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2], (GLfloat)v[3])); 4620d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4630d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4640d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* GL_UNSIGNED_INT attributes */ 4650d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4667fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 46755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NuivNV(GLuint index, const GLuint *v) 4680d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 4699bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]))); 4700d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4710d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4727fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 47355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1uivNV(GLuint index, const GLuint *v) 4740d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 475c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); 4760d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4770d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4787fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 47955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NuivNV(GLuint index, const GLuint *v) 4800d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 4819bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), 48255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UINT_TO_FLOAT(v[1]))); 4830d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4840d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4857fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 48655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2uivNV(GLuint index, const GLuint *v) 4870d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 48855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], 48955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1])); 4900d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4910d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 4927fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 49355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NuivNV(GLuint index, const GLuint *v) 4940d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 4959bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), 4969bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick UINT_TO_FLOAT(v[1]), 4979bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick UINT_TO_FLOAT(v[2]))); 4980d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 4990d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5007fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 50155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3uivNV(GLuint index, const GLuint *v) 5020d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 50355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 50455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2])); 5050d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5060d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5077fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 50855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NuivNV(GLuint index, const GLuint *v) 5090d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 5109bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), 5119bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick UINT_TO_FLOAT(v[1]), 5129bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick UINT_TO_FLOAT(v[2]), 5139bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick UINT_TO_FLOAT(v[3]))); 5140d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5150d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5167fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 51755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4uivNV(GLuint index, const GLuint *v) 5180d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 51955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 52055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2], (GLfloat)v[3])); 5210d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5220d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5230d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* GL_FLOAT attributes */ 5240d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5257fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 52655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1fvNV(GLuint index, const GLfloat *v) 5270d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 5289bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib1fvNV(GET_DISPATCH(), (index, v)); 5290d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5300d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5317fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 53255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2fvNV(GLuint index, const GLfloat *v) 5330d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 5349bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib2fvNV(GET_DISPATCH(), (index, v)); 5350d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5360d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5377fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 53855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3fvNV(GLuint index, const GLfloat *v) 5390d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 5409bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib3fvNV(GET_DISPATCH(), (index, v)); 5410d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5420d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5437fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 54455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4fvNV(GLuint index, const GLfloat *v) 5450d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 5469bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib4fvNV(GET_DISPATCH(), (index, v)); 5470d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5480d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5490d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* GL_DOUBLE attributes */ 5500d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5517fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 55255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1dvNV(GLuint index, const GLdouble *v) 5530d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 5549bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib1dvNV(GET_DISPATCH(), (index, v)); 5550d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5560d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5577fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 55855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2dvNV(GLuint index, const GLdouble *v) 5590d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 5609bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib2dvNV(GET_DISPATCH(), (index, v)); 5610d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5620d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5637fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 56455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3dvNV(GLuint index, const GLdouble *v) 5650d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 5669bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib3dvNV(GET_DISPATCH(), (index, v)); 5670d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5680d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5697fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 57055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4dvNV(GLuint index, const GLdouble *v) 5710d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul{ 5729bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_VertexAttrib4dvNV(GET_DISPATCH(), (index, v)); 5730d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul} 5740d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5750d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 5760d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/* 5770d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul * Array [size][type] of VertexAttrib functions 5780d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul */ 57955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paulstatic attrib_func AttribFuncsNV[2][4][NUM_TYPES] = { 5800d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 5810d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* non-normalized */ 5820d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 5830d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* size 1 */ 584b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1bvNV, 585b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1ubvNV, 586b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1svNV, 587b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1usvNV, 588b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1ivNV, 589b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1uivNV, 590b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1fvNV, 591b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1dvNV 5920d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul }, 5930d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 5940d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* size 2 */ 595b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2bvNV, 596b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2ubvNV, 597b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2svNV, 598b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2usvNV, 599b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2ivNV, 600b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2uivNV, 601b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2fvNV, 602b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2dvNV 6030d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul }, 6040d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 6050d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* size 3 */ 606b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3bvNV, 607b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3ubvNV, 608b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3svNV, 609b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3usvNV, 610b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3ivNV, 611b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3uivNV, 612b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3fvNV, 613b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3dvNV 6140d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul }, 6150d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 6160d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* size 4 */ 617b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4bvNV, 618b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4ubvNV, 619b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4svNV, 620b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4usvNV, 621b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4ivNV, 622b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4uivNV, 623b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4fvNV, 624b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4dvNV 6250d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul } 6260d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul }, 6270d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 6280d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* normalized (except for float/double) */ 6290d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 6300d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* size 1 */ 631b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1NbvNV, 632b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1NubvNV, 633b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1NsvNV, 634b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1NusvNV, 635b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1NivNV, 636b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1NuivNV, 637b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1fvNV, 638b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib1dvNV 6390d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul }, 6400d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 6410d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* size 2 */ 642b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2NbvNV, 643b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2NubvNV, 644b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2NsvNV, 645b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2NusvNV, 646b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2NivNV, 647b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2NuivNV, 648b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2fvNV, 649b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib2dvNV 6500d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul }, 6510d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 6520d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* size 3 */ 653b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3NbvNV, 654b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3NubvNV, 655b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3NsvNV, 656b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3NusvNV, 657b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3NivNV, 658b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3NuivNV, 659b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3fvNV, 660b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib3dvNV 6610d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul }, 6620d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul { 6630d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* size 4 */ 664b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4NbvNV, 665b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4NubvNV, 666b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4NsvNV, 667b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4NusvNV, 668b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4NivNV, 669b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4NuivNV, 670b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4fvNV, 671b5b8d22c4ee921dff99b898a5907023b20670a27Brian Paul (attrib_func) VertexAttrib4dvNV 6720d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul } 6730d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul } 6740d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul}; 6750d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 676095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 677095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/** 678095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul ** GL_ARB_vertex_program 679095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul **/ 680095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 681095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/* GL_BYTE attributes */ 682095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 6837fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 68455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NbvARB(GLuint index, const GLbyte *v) 685095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 686095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]))); 687095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 688095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 6897fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 69055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1bvARB(GLuint index, const GLbyte *v) 691095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 692c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); 693095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 694095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 6957fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 69655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NbvARB(GLuint index, const GLbyte *v) 697095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 698095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]))); 699095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 700095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7017fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 70255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2bvARB(GLuint index, const GLbyte *v) 703095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 704c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); 705095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 706095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7077fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 70855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NbvARB(GLuint index, const GLbyte *v) 709095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 710095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), 711095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul BYTE_TO_FLOAT(v[1]), 712095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul BYTE_TO_FLOAT(v[2]))); 713095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 714095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7157fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 71655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3bvARB(GLuint index, const GLbyte *v) 717095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 718c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); 719095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 720095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7217fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 72255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NbvARB(GLuint index, const GLbyte *v) 723095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 724095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), 725095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul BYTE_TO_FLOAT(v[1]), 726095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul BYTE_TO_FLOAT(v[2]), 727095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul BYTE_TO_FLOAT(v[3]))); 728095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 729095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7307fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 73155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4bvARB(GLuint index, const GLbyte *v) 732095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 733c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); 734095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 735095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 736095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/* GL_UNSIGNED_BYTE attributes */ 737095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7387fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 73955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NubvARB(GLuint index, const GLubyte *v) 740095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 741095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]))); 742095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 743095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7447fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 74555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1ubvARB(GLuint index, const GLubyte *v) 746095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 747c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); 748095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 749095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7507fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 75155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NubvARB(GLuint index, const GLubyte *v) 752095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 75355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, 75455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[0]), 75555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[1]))); 756095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 757095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7587fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 75955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2ubvARB(GLuint index, const GLubyte *v) 760095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 76155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, 76255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[0], (GLfloat)v[1])); 763095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 764095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7657fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 76655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NubvARB(GLuint index, const GLubyte *v) 767095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 76855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, 76955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[0]), 77055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[1]), 77155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[2]))); 772095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 7737fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 77455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3ubvARB(GLuint index, const GLubyte *v) 775095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 77655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, 77755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[0], 77855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1], 77955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2])); 780095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 781095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7827fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 78355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NubvARB(GLuint index, const GLubyte *v) 784095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 78555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), 78655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (index, 78755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[0]), 78855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[1]), 78955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[2]), 79055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UBYTE_TO_FLOAT(v[3]))); 791095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 792095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 7937fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 79455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4ubvARB(GLuint index, const GLubyte *v) 795095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 79655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), 79755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (index, 79855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[0], (GLfloat)v[1], 79955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2], (GLfloat)v[3])); 800095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 801095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 802095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/* GL_SHORT attributes */ 803095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8047fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 80555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NsvARB(GLuint index, const GLshort *v) 806095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 807095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]))); 808095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 809095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8107fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 81155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1svARB(GLuint index, const GLshort *v) 812095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 813c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); 814095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 815095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8167fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 81755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NsvARB(GLuint index, const GLshort *v) 818095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 81955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), 82055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (index, SHORT_TO_FLOAT(v[0]), 82155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul SHORT_TO_FLOAT(v[1]))); 822095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 823095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8247fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 82555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2svARB(GLuint index, const GLshort *v) 826095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 82755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), 82855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (index, (GLfloat)v[0], (GLfloat)v[1])); 829095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 830095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8317fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 83255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NsvARB(GLuint index, const GLshort *v) 833095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 83455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), 83555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (index, 83655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul SHORT_TO_FLOAT(v[0]), 83755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul SHORT_TO_FLOAT(v[1]), 83855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul SHORT_TO_FLOAT(v[2]))); 839095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 840095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8417fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 84255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3svARB(GLuint index, const GLshort *v) 843095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 84455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), 84555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (index, 84655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); 847095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 848095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8497fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 85055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NsvARB(GLuint index, const GLshort *v) 851095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 85255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), 85355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (index, 85455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul SHORT_TO_FLOAT(v[0]), 85555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul SHORT_TO_FLOAT(v[1]), 85655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul SHORT_TO_FLOAT(v[2]), 85755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul SHORT_TO_FLOAT(v[3]))); 858095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 859095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8607fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 86155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4svARB(GLuint index, const GLshort *v) 862095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 86355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 86455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2], (GLfloat)v[3])); 865095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 866095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 867095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/* GL_UNSIGNED_SHORT attributes */ 868095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8697fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 87055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NusvARB(GLuint index, const GLushort *v) 871095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 872095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]))); 873095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 874095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8757fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 87655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1usvARB(GLuint index, const GLushort *v) 877095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 878c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); 879095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 880095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8817fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 88255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NusvARB(GLuint index, const GLushort *v) 883095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 884095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), 885095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul USHORT_TO_FLOAT(v[1]))); 886095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 887095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8887fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 88955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2usvARB(GLuint index, const GLushort *v) 890095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 89155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], 89255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1])); 893095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 894095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 8957fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 89655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NusvARB(GLuint index, const GLushort *v) 897095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 898095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), 899095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul USHORT_TO_FLOAT(v[1]), 900095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul USHORT_TO_FLOAT(v[2]))); 901095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 902095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9037fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 90455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3usvARB(GLuint index, const GLushort *v) 905095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 90655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], 90755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1], (GLfloat)v[2])); 908095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 909095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9107fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 91155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NusvARB(GLuint index, const GLushort *v) 912095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 913095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), 914095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul USHORT_TO_FLOAT(v[1]), 915095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul USHORT_TO_FLOAT(v[2]), 916095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul USHORT_TO_FLOAT(v[3]))); 917095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 918095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9197fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 92055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4usvARB(GLuint index, const GLushort *v) 921095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 922c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); 923095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 924095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 925095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/* GL_INT attributes */ 926095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9277fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 92855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NivARB(GLuint index, const GLint *v) 929095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 930095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]))); 931095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 932095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9337fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 93455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1ivARB(GLuint index, const GLint *v) 935095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 936c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); 937095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 938095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9397fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 94055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NivARB(GLuint index, const GLint *v) 941095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 942095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), 943095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul INT_TO_FLOAT(v[1]))); 944095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 945095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9467fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 94755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2ivARB(GLuint index, const GLint *v) 948095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 94955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], 95055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1])); 951095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 952095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9537fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 95455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NivARB(GLuint index, const GLint *v) 955095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 956095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), 957095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul INT_TO_FLOAT(v[1]), 958095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul INT_TO_FLOAT(v[2]))); 959095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 960095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9617fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 96255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3ivARB(GLuint index, const GLint *v) 963095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 96455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], 96555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1], (GLfloat)v[2])); 966095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 967095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9687fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 96955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NivARB(GLuint index, const GLint *v) 970095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 971095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), 972095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul INT_TO_FLOAT(v[1]), 973095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul INT_TO_FLOAT(v[2]), 974095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul INT_TO_FLOAT(v[3]))); 975095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 976095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9777fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 97855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4ivARB(GLuint index, const GLint *v) 979095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 98055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 98155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2], (GLfloat)v[3])); 982095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 983095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 984095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/* GL_UNSIGNED_INT attributes */ 985095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9867fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 98755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1NuivARB(GLuint index, const GLuint *v) 988095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 989095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]))); 990095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 991095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9927fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 99355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1uivARB(GLuint index, const GLuint *v) 994095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 995c07e274f44356cb662c04817f810d8d1adedd872Keith Whitwell CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); 996095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 997095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 9987fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 99955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2NuivARB(GLuint index, const GLuint *v) 1000095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1001095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), 100255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UINT_TO_FLOAT(v[1]))); 1003095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1004095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10057fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 100655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2uivARB(GLuint index, const GLuint *v) 1007095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 100855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], 100955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1])); 1010095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1011095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10127fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 101355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3NuivARB(GLuint index, const GLuint *v) 1014095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1015095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), 101655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UINT_TO_FLOAT(v[1]), 101755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UINT_TO_FLOAT(v[2]))); 1018095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1019095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10207fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 102155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3uivARB(GLuint index, const GLuint *v) 1022095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 102355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], 102455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[1], (GLfloat)v[2])); 1025095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1026095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10277fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 102855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4NuivARB(GLuint index, const GLuint *v) 1029095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1030095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), 103155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UINT_TO_FLOAT(v[1]), 103255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UINT_TO_FLOAT(v[2]), 103355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul UINT_TO_FLOAT(v[3]))); 1034095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1035095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10367fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 103755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4uivARB(GLuint index, const GLuint *v) 1038095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 103955dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], 104055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul (GLfloat)v[2], (GLfloat)v[3])); 1041095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1042095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 1043095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/* GL_FLOAT attributes */ 1044095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10457fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 104655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1fvARB(GLuint index, const GLfloat *v) 1047095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1048095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib1fvARB(GET_DISPATCH(), (index, v)); 1049095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1050095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10517fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 105255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2fvARB(GLuint index, const GLfloat *v) 1053095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1054095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib2fvARB(GET_DISPATCH(), (index, v)); 1055095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1056095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10577fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 105855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3fvARB(GLuint index, const GLfloat *v) 1059095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1060095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib3fvARB(GET_DISPATCH(), (index, v)); 1061095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1062095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10637fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 106455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4fvARB(GLuint index, const GLfloat *v) 1065095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1066095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib4fvARB(GET_DISPATCH(), (index, v)); 1067095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1068095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 1069095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/* GL_DOUBLE attributes */ 1070095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10717fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 107255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib1dvARB(GLuint index, const GLdouble *v) 1073095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1074095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib1dvARB(GET_DISPATCH(), (index, v)); 1075095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1076095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10777fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 107855dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib2dvARB(GLuint index, const GLdouble *v) 1079095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1080095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib2dvARB(GET_DISPATCH(), (index, v)); 1081095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1082095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10837fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 108455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib3dvARB(GLuint index, const GLdouble *v) 1085095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1086095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib3dvARB(GET_DISPATCH(), (index, v)); 1087095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1088095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 10897fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 109055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian PaulVertexAttrib4dvARB(GLuint index, const GLdouble *v) 1091095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul{ 1092095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul CALL_VertexAttrib4dvARB(GET_DISPATCH(), (index, v)); 1093095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul} 1094095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 1095095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 1096d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul/** 1097d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul * Integer-valued attributes 1098d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul */ 10997fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1100d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI1bv(GLuint index, const GLbyte *v) 1101d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1102d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0])); 1103d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1104d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11057fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1106d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI2bv(GLuint index, const GLbyte *v) 1107d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1108d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1])); 1109d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1110d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11117fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1112d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI3bv(GLuint index, const GLbyte *v) 1113d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1114d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); 1115d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1116d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11177fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1118d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI4bv(GLuint index, const GLbyte *v) 1119d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 112055dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttribI4bvEXT(GET_DISPATCH(), (index, v)); 1121d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1122d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1123d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11247fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1125d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI1ubv(GLuint index, const GLubyte *v) 1126d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1127d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0])); 1128d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1129d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11307fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1131d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI2ubv(GLuint index, const GLubyte *v) 1132d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1133d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1])); 1134d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1135d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11367fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1137d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI3ubv(GLuint index, const GLubyte *v) 1138d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1139d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); 1140d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1141d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11427fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1143d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI4ubv(GLuint index, const GLubyte *v) 1144d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 114555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttribI4ubvEXT(GET_DISPATCH(), (index, v)); 1146d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1147d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1148d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1149d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11507fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1151d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI1sv(GLuint index, const GLshort *v) 1152d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1153d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0])); 1154d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1155d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11567fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1157d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI2sv(GLuint index, const GLshort *v) 1158d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1159d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1])); 1160d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1161d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11627fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1163d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI3sv(GLuint index, const GLshort *v) 1164d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1165d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); 1166d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1167d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11687fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1169d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI4sv(GLuint index, const GLshort *v) 1170d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 117155dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttribI4svEXT(GET_DISPATCH(), (index, v)); 1172d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1173d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1174d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11757fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1176d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI1usv(GLuint index, const GLushort *v) 1177d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1178d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0])); 1179d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1180d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11817fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1182d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI2usv(GLuint index, const GLushort *v) 1183d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1184d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1])); 1185d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1186d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11877fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1188d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI3usv(GLuint index, const GLushort *v) 1189d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1190d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); 1191d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1192d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 11937fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1194d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI4usv(GLuint index, const GLushort *v) 1195d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 119655dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttribI4usvEXT(GET_DISPATCH(), (index, v)); 1197d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1198d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1199d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1200d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 12017fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1202d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI1iv(GLuint index, const GLint *v) 1203d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1204d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0])); 1205d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1206d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 12077fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1208d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI2iv(GLuint index, const GLint *v) 1209d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1210d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1])); 1211d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1212d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 12137fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1214d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI3iv(GLuint index, const GLint *v) 1215d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1216d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); 1217d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1218d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 12197fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1220d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI4iv(GLuint index, const GLint *v) 1221d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 122255dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttribI4ivEXT(GET_DISPATCH(), (index, v)); 1223d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1224d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1225d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 12267fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1227d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI1uiv(GLuint index, const GLuint *v) 1228d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1229d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0])); 1230d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1231d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 12327fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1233d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI2uiv(GLuint index, const GLuint *v) 1234d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1235d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1])); 1236d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1237d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 12387fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1239d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI3uiv(GLuint index, const GLuint *v) 1240d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 1241d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); 1242d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1243d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 12447fbe020bbcfeefbb2b6d6d8d0e23bca99bc06bf1José Fonsecastatic void GLAPIENTRY 1245d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian PaulVertexAttribI4uiv(GLuint index, const GLuint *v) 1246d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul{ 124755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul CALL_VertexAttribI4uivEXT(GET_DISPATCH(), (index, v)); 1248d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul} 1249d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1250d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1251d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1252d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1253095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul/* 125455dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul * Array [unnormalized/normalized/integer][size][type] of VertexAttrib 125555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul * functions 1256095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul */ 125755dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paulstatic attrib_func AttribFuncsARB[3][4][NUM_TYPES] = { 1258095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1259095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* non-normalized */ 1260095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1261095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* size 1 */ 1262095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1bvARB, 1263095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1ubvARB, 1264095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1svARB, 1265095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1usvARB, 1266095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1ivARB, 1267095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1uivARB, 1268095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1fvARB, 1269095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1dvARB 1270095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul }, 1271095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1272095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* size 2 */ 1273095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2bvARB, 1274095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2ubvARB, 1275095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2svARB, 1276095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2usvARB, 1277095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2ivARB, 1278095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2uivARB, 1279095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2fvARB, 1280095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2dvARB 1281095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul }, 1282095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1283095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* size 3 */ 1284095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3bvARB, 1285095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3ubvARB, 1286095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3svARB, 1287095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3usvARB, 1288095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3ivARB, 1289095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3uivARB, 1290095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3fvARB, 1291095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3dvARB 1292095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul }, 1293095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1294095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* size 4 */ 1295095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4bvARB, 1296095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4ubvARB, 1297095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4svARB, 1298095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4usvARB, 1299095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4ivARB, 1300095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4uivARB, 1301095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4fvARB, 1302095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4dvARB 1303095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul } 1304095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul }, 1305095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1306095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* normalized (except for float/double) */ 1307095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1308095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* size 1 */ 1309095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1NbvARB, 1310095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1NubvARB, 1311095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1NsvARB, 1312095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1NusvARB, 1313095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1NivARB, 1314095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1NuivARB, 1315095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1fvARB, 1316095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib1dvARB 1317095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul }, 1318095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1319095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* size 2 */ 1320095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2NbvARB, 1321095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2NubvARB, 1322095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2NsvARB, 1323095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2NusvARB, 1324095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2NivARB, 1325095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2NuivARB, 1326095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2fvARB, 1327095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib2dvARB 1328095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul }, 1329095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1330095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* size 3 */ 1331095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3NbvARB, 1332095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3NubvARB, 1333095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3NsvARB, 1334095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3NusvARB, 1335095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3NivARB, 1336095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3NuivARB, 1337095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3fvARB, 1338095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib3dvARB 1339095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul }, 1340095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul { 1341095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* size 4 */ 1342095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4NbvARB, 1343095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4NubvARB, 1344095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4NsvARB, 1345095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4NusvARB, 1346095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4NivARB, 1347095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4NuivARB, 1348095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4fvARB, 1349095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul (attrib_func) VertexAttrib4dvARB 1350095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul } 1351d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul }, 1352d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1353d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul { 1354d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul /* integer-valued */ 1355d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul { 1356d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul /* size 1 */ 1357d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI1bv, 1358d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI1ubv, 1359d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI1sv, 1360d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI1usv, 1361d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI1iv, 1362d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI1uiv, 1363d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul NULL, /* GL_FLOAT */ 1364d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul NULL /* GL_DOUBLE */ 1365d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul }, 1366d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul { 1367d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul /* size 2 */ 1368d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI2bv, 1369d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI2ubv, 1370d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI2sv, 1371d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI2usv, 1372d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI2iv, 1373d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI2uiv, 1374d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul NULL, /* GL_FLOAT */ 1375d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul NULL /* GL_DOUBLE */ 1376d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul }, 1377d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul { 1378d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul /* size 3 */ 1379d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI3bv, 1380d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI3ubv, 1381d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI3sv, 1382d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI3usv, 1383d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI3iv, 1384d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI3uiv, 1385d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul NULL, /* GL_FLOAT */ 1386d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul NULL /* GL_DOUBLE */ 1387d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul }, 1388d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul { 1389d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul /* size 4 */ 1390d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI4bv, 1391d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI4ubv, 1392d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI4sv, 1393d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI4usv, 1394d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI4iv, 1395d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul (attrib_func) VertexAttribI4uiv, 1396d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul NULL, /* GL_FLOAT */ 1397d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul NULL /* GL_DOUBLE */ 1398d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul } 1399095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul } 1400095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul}; 1401095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul 14020d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/**********************************************************************/ 14030d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul 140403c0c2e8aa5e5f1b430c4b3faa1f9ad92b1b71ebBrian Paul 1405f9995b30756140724f41daf963fa06167912be7fKristian HøgsbergGLboolean _ae_create_context( struct gl_context *ctx ) 140603c0c2e8aa5e5f1b430c4b3faa1f9ad92b1b71ebBrian Paul{ 1407ae0eaf93e092ac8e8b1c98f3e986de96940663faKeith Whitwell if (ctx->aelt_context) 1408ae0eaf93e092ac8e8b1c98f3e986de96940663faKeith Whitwell return GL_TRUE; 1409ae0eaf93e092ac8e8b1c98f3e986de96940663faKeith Whitwell 14100f1d98c422129b002bd3d90699da7fe8286b3c47Brian Paul /* These _gloffset_* values may not be compile-time constants */ 1411126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick SecondaryColorFuncs[0] = _gloffset_SecondaryColor3bvEXT; 1412126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick SecondaryColorFuncs[1] = _gloffset_SecondaryColor3ubvEXT; 1413126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick SecondaryColorFuncs[2] = _gloffset_SecondaryColor3svEXT; 1414126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick SecondaryColorFuncs[3] = _gloffset_SecondaryColor3usvEXT; 1415126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick SecondaryColorFuncs[4] = _gloffset_SecondaryColor3ivEXT; 1416126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick SecondaryColorFuncs[5] = _gloffset_SecondaryColor3uivEXT; 1417126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick SecondaryColorFuncs[6] = _gloffset_SecondaryColor3fvEXT; 1418126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick SecondaryColorFuncs[7] = _gloffset_SecondaryColor3dvEXT; 1419126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick 1420eec33cc310ce2b99164d182719c8d6d54b80a704Brian Paul FogCoordFuncs[0] = -1; 1421eec33cc310ce2b99164d182719c8d6d54b80a704Brian Paul FogCoordFuncs[1] = -1; 1422eec33cc310ce2b99164d182719c8d6d54b80a704Brian Paul FogCoordFuncs[2] = -1; 1423eec33cc310ce2b99164d182719c8d6d54b80a704Brian Paul FogCoordFuncs[3] = -1; 1424eec33cc310ce2b99164d182719c8d6d54b80a704Brian Paul FogCoordFuncs[4] = -1; 1425eec33cc310ce2b99164d182719c8d6d54b80a704Brian Paul FogCoordFuncs[5] = -1; 1426126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick FogCoordFuncs[6] = _gloffset_FogCoordfvEXT; 1427126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick FogCoordFuncs[7] = _gloffset_FogCoorddvEXT; 1428126c89e35fb5179fe077f7593f31ea874c89dd65Ian Romanick 1429b1c102d37bb3c273a2623358cb8ebff00bdfb65eKeith Whitwell ctx->aelt_context = CALLOC( sizeof(AEcontext) ); 14301fb0a43c16190f4d043b8a0918361bee76b37e5fGareth Hughes if (!ctx->aelt_context) 14314b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell return GL_FALSE; 14324b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell 14334b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell AE_CONTEXT(ctx)->NewState = ~0; 14344b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell return GL_TRUE; 14354b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell} 14364b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell 14374b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell 1438f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergvoid _ae_destroy_context( struct gl_context *ctx ) 14394b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell{ 14404b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell if ( AE_CONTEXT( ctx ) ) { 14414b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell FREE( ctx->aelt_context ); 1442a0c85249244e1af8dac88076d5f384cf4bd01236Keith Whitwell ctx->aelt_context = NULL; 14434b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell } 1444cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell} 1445cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 1446b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwellstatic void check_vbo( AEcontext *actx, 1447b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell struct gl_buffer_object *vbo ) 1448b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell{ 1449434ec3ada841915a00ffc23f699401eb3e7b37eeBrian Paul if (_mesa_is_bufferobj(vbo) && !_mesa_bufferobj_mapped(vbo)) { 1450b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell GLuint i; 1451b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell for (i = 0; i < actx->nr_vbos; i++) 1452b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell if (actx->vbo[i] == vbo) 1453b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell return; 1454b72fbcbe63bd53460da07ce840094924f04d38e0Keith Whitwell assert(actx->nr_vbos < VERT_ATTRIB_MAX); 1455b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell actx->vbo[actx->nr_vbos++] = vbo; 1456b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell } 1457b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell} 1458b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 14594b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell 14600d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul/** 14610d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul * Make a list of per-vertex functions to call for each glArrayElement call. 14621e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul * These functions access the array data (i.e. glVertex, glColor, glNormal, 14631e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul * etc). 14641e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul * Note: this may be called during display list construction. 14650d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul */ 1466f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergstatic void _ae_update_state( struct gl_context *ctx ) 1467cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell{ 14684b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell AEcontext *actx = AE_CONTEXT(ctx); 14694b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell AEarray *aa = actx->arrays; 14700d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul AEattrib *at = actx->attribs; 1471db07de057f10ab7ab5be84352b674b200a0a9e22Brian Paul GLuint i; 1472bf4dfd6563e1ce5cabea415d1e3600ab4abefe81Brian Paul struct gl_array_object *arrayObj = ctx->Array.ArrayObj; 1473cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 1474b72fbcbe63bd53460da07ce840094924f04d38e0Keith Whitwell actx->nr_vbos = 0; 1475b72fbcbe63bd53460da07ce840094924f04d38e0Keith Whitwell 14761e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul /* conventional vertex arrays */ 1477762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) { 1478762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX]; 14799bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick aa->offset = IndexFuncs[TYPE_IDX(aa->array->Type)]; 1480b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell check_vbo(actx, aa->array->BufferObj); 1481cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell aa++; 1482cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell } 1483762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich if (arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) { 1484762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG]; 14859bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick aa->offset = _gloffset_EdgeFlagv; 1486b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell check_vbo(actx, aa->array->BufferObj); 1487faaf78aeb0e18c75c9b204a634f296b9c056cf5cRoland Scheidegger aa++; 1488faaf78aeb0e18c75c9b204a634f296b9c056cf5cRoland Scheidegger } 1489762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich if (arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) { 1490762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL]; 14919bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick aa->offset = NormalFuncs[TYPE_IDX(aa->array->Type)]; 1492b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell check_vbo(actx, aa->array->BufferObj); 14931e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul aa++; 14941e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul } 1495762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) { 1496762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0]; 14979bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick aa->offset = ColorFuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)]; 1498b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell check_vbo(actx, aa->array->BufferObj); 14991e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul aa++; 15001e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul } 1501762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) { 1502762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1]; 15039bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick aa->offset = SecondaryColorFuncs[TYPE_IDX(aa->array->Type)]; 1504b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell check_vbo(actx, aa->array->BufferObj); 15051e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul aa++; 15061e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul } 1507762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich if (arrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled) { 1508762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_FOG]; 15099bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick aa->offset = FogCoordFuncs[TYPE_IDX(aa->array->Type)]; 1510b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell check_vbo(actx, aa->array->BufferObj); 15111e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul aa++; 15121e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul } 15131e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { 1514762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)]; 1515095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul if (attribArray->Enabled) { 1516095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul /* NOTE: we use generic glVertexAttribNV functions here. 1517095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul * If we ever remove GL_NV_vertex_program this will have to change. 15181e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul */ 15191e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul at->array = attribArray; 1520095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul ASSERT(!at->array->Normalized); 1521095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul at->func = AttribFuncsNV[at->array->Normalized] 1522095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul [at->array->Size-1] 1523095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul [TYPE_IDX(at->array->Type)]; 15249d1ff8c1bb56b9ba0d3bf4552351d8bff6620ef2Brian Paul at->index = VERT_ATTRIB_TEX0 + i; 152564920ed10ac702ed9be33d4045faa71f06e05029Keith Whitwell check_vbo(actx, at->array->BufferObj); 15261e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul at++; 15270d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul } 15281e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul } 1529cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 1530b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell /* generic vertex attribute arrays */ 1531762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) { /* skip zero! */ 1532762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)]; 1533095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul if (attribArray->Enabled) { 15340d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul at->array = attribArray; 15350d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul /* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV 15360d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul * function pointer here (for float arrays) since the pointer may 153780630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu * change from one execution of _ae_ArrayElement() to 15380d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul * the next. Doing so caused UT to break. 15390d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul */ 1540095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul if (ctx->VertexProgram._Enabled 1541095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul && ctx->VertexProgram.Current->IsNVProgram) { 1542095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul at->func = AttribFuncsNV[at->array->Normalized] 1543095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul [at->array->Size-1] 1544095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul [TYPE_IDX(at->array->Type)]; 1545095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul } 1546095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul else { 1547d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul GLint intOrNorm; 1548d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul if (at->array->Integer) 1549d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul intOrNorm = 2; 1550d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul else if (at->array->Normalized) 1551d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul intOrNorm = 1; 1552d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul else 1553d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul intOrNorm = 0; 1554d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul 1555d916d81582aa7c45ccd128f7fd3e8205b1ceebf1Brian Paul at->func = AttribFuncsARB[intOrNorm] 1556095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul [at->array->Size-1] 1557095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul [TYPE_IDX(at->array->Type)]; 1558095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul } 15591e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul at->index = i; 156064920ed10ac702ed9be33d4045faa71f06e05029Keith Whitwell check_vbo(actx, at->array->BufferObj); 15610d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul at++; 15620d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul } 1563faaf78aeb0e18c75c9b204a634f296b9c056cf5cRoland Scheidegger } 15641e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul 15651e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul /* finally, vertex position */ 1566762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich if (arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled) { 15671e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul /* Use glVertex(v) instead of glVertexAttrib(0, v) to be sure it's 1568095c6699f449ed4803f23e844cc0227743a9c3e1Brian Paul * issued as the last (provoking) attribute). 15691e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul */ 1570762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0]; 15711e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul assert(aa->array->Size >= 2); /* XXX fix someday? */ 15729bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)]; 1573b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell check_vbo(actx, aa->array->BufferObj); 15741e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul aa++; 15751e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul } 1576762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich else if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) { 1577762c9766c93697af8d7fbaa729aed118789dbe8eMathias Fröhlich aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_POS]; 15789bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)]; 1579b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell check_vbo(actx, aa->array->BufferObj); 15801e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul aa++; 15811e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul } 15821e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul 1583a0a5bd4bb30a73c10b02c3c3b914940a03f9b790Yuanhan Liu check_vbo(actx, arrayObj->ElementArrayBufferObj); 1584b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 15850d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul ASSERT(at - actx->attribs <= VERT_ATTRIB_MAX); 15860d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul ASSERT(aa - actx->arrays < 32); 15870d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul at->func = NULL; /* terminate the list */ 15889bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick aa->offset = -1; /* terminate the list */ 1589faaf78aeb0e18c75c9b204a634f296b9c056cf5cRoland Scheidegger 1590cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell actx->NewState = 0; 1591cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell} 1592cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 1593f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergvoid _ae_map_vbos( struct gl_context *ctx ) 1594b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell{ 1595b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell AEcontext *actx = AE_CONTEXT(ctx); 1596b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell GLuint i; 1597b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1598b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell if (actx->mapped_vbos) 1599b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell return; 1600b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1601b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell if (actx->NewState) 1602b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell _ae_update_state(ctx); 1603b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1604b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell for (i = 0; i < actx->nr_vbos; i++) 160528249bd260f4c52badf3eb61ade2744604b21bcaIan Romanick ctx->Driver.MapBufferRange(ctx, 0, 160628249bd260f4c52badf3eb61ade2744604b21bcaIan Romanick actx->vbo[i]->Size, 160728249bd260f4c52badf3eb61ade2744604b21bcaIan Romanick GL_MAP_READ_BIT, 160828249bd260f4c52badf3eb61ade2744604b21bcaIan Romanick actx->vbo[i]); 1609b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1610b1c102d37bb3c273a2623358cb8ebff00bdfb65eKeith Whitwell if (actx->nr_vbos) 1611b1c102d37bb3c273a2623358cb8ebff00bdfb65eKeith Whitwell actx->mapped_vbos = GL_TRUE; 1612b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell} 1613b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1614f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergvoid _ae_unmap_vbos( struct gl_context *ctx ) 1615b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell{ 1616b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell AEcontext *actx = AE_CONTEXT(ctx); 1617b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell GLuint i; 1618b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1619479aca6bf10b9546deb523f42bc3be48b17081cfKeith Whitwell if (!actx->mapped_vbos) 1620b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell return; 1621b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1622479aca6bf10b9546deb523f42bc3be48b17081cfKeith Whitwell assert (!actx->NewState); 1623b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1624b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell for (i = 0; i < actx->nr_vbos; i++) 162556f0c00f125ee75caeadc1c9e8cab8a488635e5eIan Romanick ctx->Driver.UnmapBuffer(ctx, actx->vbo[i]); 1626b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1627479aca6bf10b9546deb523f42bc3be48b17081cfKeith Whitwell actx->mapped_vbos = GL_FALSE; 1628b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell} 1629b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1630cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 16311e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul/** 16321e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul * Called via glArrayElement() and glDrawArrays(). 16331e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul * Issue the glNormal, glVertex, glColor, glVertexAttrib, etc functions 16341e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul * for all enabled vertex arrays (for elt-th element). 16351e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul * Note: this may be called during display list construction. 16361e3d868ffbec46eecb85b4aaf6990d9ad69e830fBrian Paul */ 163780630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wuvoid GLAPIENTRY _ae_ArrayElement( GLint elt ) 1638cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell{ 1639cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell GET_CURRENT_CONTEXT(ctx); 16400d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul const AEcontext *actx = AE_CONTEXT(ctx); 16410d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul const AEarray *aa; 16420d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul const AEattrib *at; 16439bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick const struct _glapi_table * const disp = GET_DISPATCH(); 1644b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell GLboolean do_map; 16459bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick 16465795d3b5aec767dc2d7901b432f9182121b8e46fJordan Justen /* If PrimitiveRestart is enabled and the index is the RestartIndex 16475795d3b5aec767dc2d7901b432f9182121b8e46fJordan Justen * then we call PrimitiveRestartNV and return. 16485795d3b5aec767dc2d7901b432f9182121b8e46fJordan Justen */ 16495795d3b5aec767dc2d7901b432f9182121b8e46fJordan Justen if (ctx->Array.PrimitiveRestart && (elt == ctx->Array.RestartIndex)) { 16505795d3b5aec767dc2d7901b432f9182121b8e46fJordan Justen CALL_PrimitiveRestartNV((struct _glapi_table *)disp, ()); 16515795d3b5aec767dc2d7901b432f9182121b8e46fJordan Justen return; 16525795d3b5aec767dc2d7901b432f9182121b8e46fJordan Justen } 16535795d3b5aec767dc2d7901b432f9182121b8e46fJordan Justen 1654b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell if (actx->NewState) { 1655b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell assert(!actx->mapped_vbos); 16564b7d6f216bf768482e07e4d7feb8ca3e1be92d53Keith Whitwell _ae_update_state( ctx ); 1657b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell } 1658cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 16595795d3b5aec767dc2d7901b432f9182121b8e46fJordan Justen /* Determine if we need to map/unmap VBOs */ 1660b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell do_map = actx->nr_vbos && !actx->mapped_vbos; 1661b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1662b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell if (do_map) 1663b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell _ae_map_vbos(ctx); 1664b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 166555dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul /* emit generic attribute elements */ 16660d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul for (at = actx->attribs; at->func; at++) { 1667024b5896f09650a599fdf60aa49aaf348941c3e5Brian Paul const GLubyte *src 1668b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell = ADD_POINTERS(at->array->BufferObj->Pointer, at->array->Ptr) 1669024b5896f09650a599fdf60aa49aaf348941c3e5Brian Paul + elt * at->array->StrideB; 16700d4393a38a2237bb65fbd38b8da73ac328a967d0Brian Paul at->func( at->index, src ); 167153ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul } 167253ad0369721966c67bf6edad59c74e9ba7891fa5Brian Paul 167355dc971dedd8155e2fe2eb9bb9239e56442b3075Brian Paul /* emit conventional arrays elements */ 16749bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick for (aa = actx->arrays; aa->offset != -1 ; aa++) { 1675024b5896f09650a599fdf60aa49aaf348941c3e5Brian Paul const GLubyte *src 1676b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell = ADD_POINTERS(aa->array->BufferObj->Pointer, aa->array->Ptr) 1677024b5896f09650a599fdf60aa49aaf348941c3e5Brian Paul + elt * aa->array->StrideB; 16789bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick CALL_by_offset( disp, (array_func), aa->offset, 16799bdfee3a470a535ebe31074651fbacf680bcea6aIan Romanick ((const void *) src) ); 1680cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell } 1681b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 1682b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell if (do_map) 1683b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell _ae_unmap_vbos(ctx); 1684cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell} 1685cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 1686cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 1687f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergvoid _ae_invalidate_state( struct gl_context *ctx, GLuint new_state ) 1688cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell{ 1689b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell AEcontext *actx = AE_CONTEXT(ctx); 1690b97947972193b6b004a0ee49da31146230d43dd8Keith Whitwell 169196c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell 169296c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell /* Only interested in this subset of mesa state. Need to prune 169396c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell * this down as both tnl/ and the drivers can raise statechanges 169496c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell * for arcane reasons in the middle of seemingly atomic operations 169596c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell * like DrawElements, over which we'd like to keep a known set of 169696c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell * arrays and vbo's mapped. 169796c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell * 169896c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell * Luckily, neither the drivers nor tnl muck with the state that 169996c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell * concerns us here: 1700b72fbcbe63bd53460da07ce840094924f04d38e0Keith Whitwell */ 170196c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell new_state &= _NEW_ARRAY | _NEW_PROGRAM; 170296c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell if (new_state) { 170396c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell assert(!actx->mapped_vbos); 170496c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell actx->NewState |= new_state; 170596c0a6de25de2ba8f9601c13f67c22e1aff17b29Keith Whitwell } 1706cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell} 170780630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu 170880630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu 170980630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wuvoid _mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp, 171080630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu const GLvertexformat *vfmt) 171180630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu{ 171280630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu SET_ArrayElement(disp, vfmt->ArrayElement); 171380630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu} 171480630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu 171580630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu 171680630d1fed6cd32e75f5e97e2cd27509be21d093Chia-I Wu#endif /* FEATURE_arrayelt */ 1717