static ModelVertexArray() { Modes = new[] { BeginMode.Triangles }; Specification = new ArraySpecification( ArrayIndex.Vector3("Position"), ArrayIndex.Vector2("Texture")); SpecSize = Specification.Indices.Sum(x => x.Length); }
static GridRenderable() { Modes = new[] {BeginMode.Lines}; Specification = new ArraySpecification( ArrayIndex.Vector3("Position"), ArrayIndex.Vector4("Colour")); SpecSize = Specification.Indices.Sum(x => x.Length); }
static SolidVertexArray() { Modes = new[] { BeginMode.Triangles, BeginMode.Lines}; Specification = new ArraySpecification( ArrayIndex.Vector3("Position"), ArrayIndex.Vector3("Normal"), ArrayIndex.Vector2("Texture"), ArrayIndex.Vector4("Colour"), ArrayIndex.Float("Selected")); SpecSize = Specification.Indices.Sum(x => x.Length); }
protected VBO(IEnumerable <TIn> data) { Specification = new ArraySpecification(typeof(TOut)); _size = Marshal.SizeOf(typeof(TOut)); _data = new List <TOut>(); _indices = new Dictionary <int, List <uint> >(); _subsetState = new Dictionary <int, int>(); _subsets = new Dictionary <int, List <Subset> >(); _offsets = new Dictionary <object, int>(); Update(data); }