예제 #1
0
        public void Upload(Vertex3D[] Verts, ushort[] Inds)
        {
            VertBuffer?.Dispose();
            IndBuffer?.Dispose();

            VertBuffer      = Fact.CreateBuffer(new BufferDescription((uint)(sizeof(Vertex3D) * Verts.Length), BufferUsage.VertexBuffer));
            VertBuffer.Name = "VertBuffer";

            IndBuffer      = Fact.CreateBuffer(new BufferDescription((uint)(sizeof(ushort) * Inds.Length), BufferUsage.IndexBuffer));
            IndBuffer.Name = "IndBuffer";

            Dev.UpdateBuffer(VertBuffer, 0, Verts);
            Dev.UpdateBuffer(IndBuffer, 0, Inds);
            IndexCount = Inds.Length;
        }