Пример #1
0
 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);
     }
 }
Пример #2
0
        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;
            }
        }
Пример #3
0
 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);
     }
 }
Пример #4
0
 public void Draw(DeviceContext ctx)
 {
     ctx.DrawIndexedInstancedIndirect(this.indbuffer.Buffer, 0);
 }