+void VertexArray::reset(const VertexFormat &f)
+{
+ clear();
+ format = f;
+ stride = get_stride(format);
+
+ bool has_multitex = false;
+ bool has_gen_attrs = false;
+ for(const unsigned char *c=format.begin(); c!=format.end(); ++c)
+ {
+ if(*c>=TEXCOORD1+4 && *c<ATTRIB1)
+ has_multitex = true;
+ if(*c>=ATTRIB1)
+ has_gen_attrs = true;
+ }
+ if(has_multitex)
+ static Require _req(ARB_multitexture);
+ if(has_gen_attrs)
+ static Require _req(ARB_vertex_shader);
+}
+