Package icyllis.arc3d.granite

# Class MeshDrawWriter

java.lang.Object
icyllis.arc3d.granite.MeshDrawWriter

All Implemented Interfaces:
  `AutoCloseable`

public class MeshDrawWriter extends Object implements AutoCloseable

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MeshDrawWriter(DrawBufferManager drawBufferManager, DrawCommandList commandList)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `append(int count)`
  The caller must write `count * stride` bytes to the pointer.
  `void`
  `beginInstances(BufferViewInfo vertexBufferInfo, BufferViewInfo indexBufferInfo, int vertexCount)`
  Start writing instance data and bind static vertex buffer and index buffer.
  `void`
  `beginVertices()`
  `void`
  `close()`
  `void`
  `endAppender()`
  `void`
  `flush()`
  `void`
  `newDynamicState()`
  `void`
  `newPipelineState(int vertexBinding, int instanceBinding, int vertexStride, int instanceStride)`
  `void`
  `reserve(int count)`

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

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

- ## Constructor Details

  - ### MeshDrawWriter

    public MeshDrawWriter(DrawBufferManager drawBufferManager, DrawCommandList commandList)

- ## Method Details

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`

  - ### newPipelineState

    public void newPipelineState(int vertexBinding, int instanceBinding, int vertexStride, int instanceStride)

  - ### newDynamicState

    public void newDynamicState()

  - ### flush

    public void flush()

  - ### beginVertices

    public void beginVertices()

  - ### beginInstances

    public void beginInstances(@Nullable BufferViewInfo vertexBufferInfo, @Nullable BufferViewInfo indexBufferInfo, int vertexCount)
    Start writing instance data and bind static vertex buffer and index buffer.
    Parameters:
      `vertexBufferInfo` -
      `indexBufferInfo` -
      `vertexCount` -

  - ### reserve

    public void reserve(int count)

  - ### append

    public long append(int count)
    The caller must write `count * stride` bytes to the pointer.
    Parameters:
      `count` - vertex count or instance count

  - ### endAppender

    public void endAppender()