private VertexFormat(IEnumerable <VertexAttrib> attributes) { vertexAttributes = new VertexAttrib[attributes.Count()]; for (int attributeIndex = 0; attributeIndex < attributes.Count(); attributeIndex++) { VertexAttrib attribute = attributes.ElementAt(attributeIndex); vertexAttributes[attributeIndex] = attribute; stride += attribute.GetSizeBytes(); } }