+ unsigned slot = get_array_slot(*c);
+ if(slot>=arrays.size())
+ arrays.resize(slot+1);
+
+ Array &arr = arrays[slot];
+ arr.component = *c;
+ arr.offset = offset;
+
+ offset += get_component_size(*c);
+ }
+}
+
+unsigned VertexArray::get_array_slot(unsigned char comp)
+{
+ unsigned t = get_component_type(comp);
+ if(t==get_component_type(VERTEX3))
+ return 0;
+ else if(t==get_component_type(NORMAL3))
+ return 1;
+ else if(t==get_component_type(COLOR4_FLOAT))
+ return 2;
+ else if(comp>=TEXCOORD1 && comp<=TEXCOORD4+12)
+ {
+ t -= get_component_type(TEXCOORD1);
+ if(t>0)
+ static Require _req(ARB_multitexture);
+ return 3+t;