Example #1
0
 public void DrawInstanced(SlimDX.Direct3D10.Device device, int nInstances)
 {
     if (MeshType == MeshType.Indexed)
         device.DrawIndexedInstanced(NFaces * 3, nInstances, 0, 0, 0);
     else if (MeshType == MeshType.TriangleStrip || MeshType == MeshType.PointList || MeshType == MeshType.LineStrip)
         device.DrawInstanced(NVertices, nInstances, 0, 0);
     else
         throw new NotImplementedException();
 }
 public override void Draw(SlimDX.Direct3D11.DeviceContext ctx)
 {
     ctx.DrawInstanced(this.VertexCount, this.InstanceCount, 0, 0);
 }