public VertexElement(Util.DataType type, int size, int offset, bool normalized = false) { Type = type; Size = size; Offset = offset; Normalized = normalized; }
public void AddElement(Util.DataType type, int count, bool normalized = false) { int offset = 0; if (Elements.Count > 0) { offset = Elements[Elements.Count - 1].Offset + Elements[Elements.Count - 1].Size * Elements[Elements.Count - 1].Type.GetSize(); } Elements.Add(new VertexElement(type, count, offset, normalized)); }