MeshGeometry constructor
Implementation
factory MeshGeometry(int length, List<VertexAttrib> attributes) {
int stride = 0;
for (VertexAttrib a in attributes) {
stride += a.elementSize * a.size;
}
int offset = 0;
final List<VertexAttrib> attribs = <VertexAttrib>[];
for (VertexAttrib a in attributes) {
attribs.add(new VertexAttrib._resetStrideOffset(a, stride, offset));
offset += a.elementSize * a.size;
}
return new MeshGeometry._internal(length, stride, attribs);
}