Exemple #1
0
 public void SetInstanceDataBuffer(GpuVertexBuffer buffer, int startVertex /*= 0*/, int count /*= -1*/)
 {
     if (buffer.Flags.HasFlag(GpuBufferFlags.Dynamic) || buffer.Flags.HasFlag(GpuBufferFlags.ComputeWrite))
     {
         Bgfx.SetInstanceDataBuffer((DynamicVertexBuffer)buffer.GetNativeObject(), startVertex, count);
     }
     else
     {
         Bgfx.SetInstanceDataBuffer((VertexBuffer)buffer.GetNativeObject(), startVertex, count);
     }
 }
Exemple #2
0
 public void SetVertexBuffer(int stream, GpuVertexBuffer buffer, int startVertex = 0, int count = -1)
 {
     if (buffer.Flags.HasFlag(GpuBufferFlags.Dynamic) || buffer.Flags.HasFlag(GpuBufferFlags.ComputeWrite))
     {
         Bgfx.SetVertexBuffer(stream, (DynamicVertexBuffer)buffer.GetNativeObject(), startVertex, count);
     }
     else
     {
         Bgfx.SetVertexBuffer(stream, (VertexBuffer)buffer.GetNativeObject(), startVertex, count);
     }
 }