Example #1
0
        public VboShape(ref OpenTK.Graphics.OpenGL.BeginMode primitives, ref VertexT2dN3dV3d[] vertices, ref uint[] indices, bool useDL)
            : base(useDL)
        {
            PrimitiveMode = primitives;
            VertexArray   = new VertexT2dN3dV3d[vertices.Length];
            for (uint i = 0; i < vertices.Length; i++)
            {
                VertexArray[i] = vertices[i];
            }

            IndexArray = new uint[indices.Length];
            for (uint i = 0; i < indices.Length; i++)
            {
                IndexArray[i] = indices[i];
            }
        }
Example #2
0
        public IBufferRange FindOrCreateIndexBufferRange(
            MeshMode meshMode,
            IBuffer buffer,
            BeginMode beginMode
            )
        {
            if (HasIndexBufferRange(meshMode) == false)
            {
                var indexBufferRange = buffer.CreateIndexBufferRange(beginMode);
                indexBufferRanges[(int)meshMode] = indexBufferRange;

                return(indexBufferRange);
            }
            else
            {
                var indexBufferRange = indexBufferRanges[(int)meshMode];
                return(indexBufferRanges[(int)meshMode]);
            }
        }
Example #3
0
 public IBufferRange CreateIndexBufferRange(OpenTK.Graphics.OpenGL.BeginMode beginMode)
 {
     return(new BufferRangeRL(this, (BeginMode)beginMode));
 }