Package icyllis.arc3d.granite

# Class DrawCommandList

java.lang.Object
icyllis.arc3d.granite.DrawCommandList

public class DrawCommandList extends Object
The list that holds commands of a draw pass, and can be replayed on `CommandBuffer`.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CMD_BIND_GRAPHICS_PIPELINE`
  `struct BindGraphicsPipeline { int pipelineIndex; }`
  `static final int`
  `CMD_BIND_INDEX_BUFFER`
  `static final int`
  `CMD_BIND_TEXTURES`
  `static final int`
  `CMD_BIND_UNIFORM_BUFFER`
  `static final int`
  `CMD_BIND_VERTEX_BUFFER`
  `static final int`
  `CMD_DRAW`
  `struct Draw { int vertexCount; int baseVertex; }`
  `static final int`
  `CMD_DRAW_INDEXED`
  `static final int`
  `CMD_DRAW_INDEXED_INSTANCED`
  `static final int`
  `CMD_DRAW_INSTANCED`
  `static final int`
  `CMD_SET_SCISSOR`
  `final it.unimi.dsi.fastutil.objects.ObjectArrayList<Object>`
  `mPointers`
  Holds all reference data, raw pointers.
  `final it.unimi.dsi.fastutil.ints.IntArrayList`
  `mPrimitives`
  Holds all primitive data.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DrawCommandList()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `bindGraphicsPipeline(int pipelineIndex)`
  `final void`
  `bindIndexBuffer(int indexType, BufferViewInfo bufferInfo)`
  `final void`
  `bindTextures(int[] textures)`
  `final void`
  `bindUniformBuffer(int binding, @RawPtr Buffer buffer, long offset, long size)`
  `final void`
  `bindVertexBuffer(int binding, BufferViewInfo bufferInfo)`
  `void`
  `debug(PrintWriter pw)`
  `void`
  `draw(int vertexCount, int baseVertex)`
  `final void`
  `drawIndexed(int indexCount, int baseIndex, int baseVertex)`
  `final void`
  `drawIndexedInstanced(int indexCount, int baseIndex, int instanceCount, int baseInstance, int baseVertex)`
  `final void`
  `drawInstanced(int instanceCount, int baseInstance, int vertexCount, int baseVertex)`
  `final void`
  `finish()`
  `final void`
  `setScissor(Rect2ic scissor, int surfaceHeight, int origin)`
  Flush scissor.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### CMD_BIND_GRAPHICS_PIPELINE

    public static final int CMD_BIND_GRAPHICS_PIPELINE

         struct BindGraphicsPipeline {
             int pipelineIndex;
         }

    See Also:
      - Constant Field Values

  - ### CMD_DRAW

    public static final int CMD_DRAW

         struct Draw {
             int vertexCount;
             int baseVertex;
         }

    See Also:
      - Constant Field Values

  - ### CMD_DRAW_INDEXED

    public static final int CMD_DRAW_INDEXED
    See Also:
      - Constant Field Values

  - ### CMD_DRAW_INSTANCED

    public static final int CMD_DRAW_INSTANCED
    See Also:
      - Constant Field Values

  - ### CMD_DRAW_INDEXED_INSTANCED

    public static final int CMD_DRAW_INDEXED_INSTANCED
    See Also:
      - Constant Field Values

  - ### CMD_BIND_INDEX_BUFFER

    public static final int CMD_BIND_INDEX_BUFFER
    See Also:
      - Constant Field Values

  - ### CMD_BIND_VERTEX_BUFFER

    public static final int CMD_BIND_VERTEX_BUFFER
    See Also:
      - Constant Field Values

  - ### CMD_SET_SCISSOR

    public static final int CMD_SET_SCISSOR
    See Also:
      - Constant Field Values

  - ### CMD_BIND_UNIFORM_BUFFER

    public static final int CMD_BIND_UNIFORM_BUFFER
    See Also:
      - Constant Field Values

  - ### CMD_BIND_TEXTURES

    public static final int CMD_BIND_TEXTURES
    See Also:
      - Constant Field Values

  - ### mPrimitives

    public final it.unimi.dsi.fastutil.ints.IntArrayList mPrimitives
    Holds all primitive data.

  - ### mPointers

    public final it.unimi.dsi.fastutil.objects.ObjectArrayList<Object> mPointers
    Holds all reference data, raw pointers.

- ## Constructor Details

  - ### DrawCommandList

    public DrawCommandList()

- ## Method Details

  - ### bindGraphicsPipeline

    public void bindGraphicsPipeline(int pipelineIndex)

  - ### draw

    public void draw(int vertexCount, int baseVertex)

  - ### drawIndexed

    public final void drawIndexed(int indexCount, int baseIndex, int baseVertex)

  - ### drawInstanced

    public final void drawInstanced(int instanceCount, int baseInstance, int vertexCount, int baseVertex)

  - ### drawIndexedInstanced

    public final void drawIndexedInstanced(int indexCount, int baseIndex, int instanceCount, int baseInstance, int baseVertex)

  - ### bindIndexBuffer

    public final void bindIndexBuffer(int indexType, BufferViewInfo bufferInfo)

  - ### bindVertexBuffer

    public final void bindVertexBuffer(int binding, BufferViewInfo bufferInfo)

  - ### setScissor

    public final void setScissor(Rect2ic scissor, int surfaceHeight, int origin)
    Flush scissor.
    Parameters:
      `surfaceHeight` - the effective height of color attachment
      `origin` - the surface origin
    See Also:
      - `Engine.SurfaceOrigin`

  - ### bindUniformBuffer

    public final void bindUniformBuffer(int binding, @RawPtr @RawPtr Buffer buffer, long offset, long size)

  - ### bindTextures

    public final void bindTextures(int[] textures)
    Parameters:
      `textures` - pairs of texture view index and sampler index

  - ### finish

    public final void finish()

  - ### debug

    public void debug(PrintWriter pw)