public void Draw(DeviceContext ctx) { if (this.props.AllowIndexBuffer) { ctx.DrawIndexedInstancedIndirect(this.buffer.Buffer, this.Prop.DrawOffset); } else { ctx.DrawInstancedIndirect(this.buffer.Buffer, this.Prop.DrawOffset); } }
protected override void DrawIndexedIndirectCore(DeviceBuffer indirectBuffer, uint offset, uint drawCount, uint stride) { PreDrawCommand(); D3D11Buffer d3d11Buffer = Util.AssertSubtype <DeviceBuffer, D3D11Buffer>(indirectBuffer); int currentOffset = (int)offset; for (uint i = 0; i < drawCount; i++) { _context.DrawIndexedInstancedIndirect(d3d11Buffer.Buffer, currentOffset); currentOffset += (int)stride; } }
public void Draw(DeviceContext ctx) { if (this.props.AllowIndexBuffer) { ctx.DrawIndexedInstancedIndirect(this.buffer.Buffer, this.Prop.DrawOffset); } else { ctx.DrawInstancedIndirect(this.buffer.Buffer, this.Prop.DrawOffset); } }
public void Draw(DeviceContext ctx) { ctx.DrawIndexedInstancedIndirect(this.indbuffer.Buffer, 0); }