- if(*c<ATTRIB1)
- throw InvalidState("Last component is not a generic attribute");
- // VertexArray uses an unsigned to store flags for enabled arrays
- if(i>=28)
- throw InvalidParameterValue("Generic attribute index out of range");
+ if((*c<TEXCOORD1 && i>0) || (*c<ATTRIB1 && i>=8) || i>=53)
+ throw InvalidParameterValue("Vertex component index out of range");