RectangleBatcher
interludesoftware.tick¶
Interlude.Tick¶
RectangleBatcher Class¶
Inheritance System.Object → RectangleBatcher
Implements System.IDisposable
Constructors¶
RectangleBatcher(Mesh, Material) Constructor¶
Creates a RectangleBatcher that draws instanced quads using quadMesh and material.
Parameters¶
quadMesh UnityEngine.Mesh
material UnityEngine.Material
Properties¶
RectangleBatcher.BatchCount Property¶
Returns the number of batches recorded since the last Reset().
Property Value¶
Methods¶
RectangleBatcher.AddToBatch(DrawCommand) Method¶
Appends command as a new Interlude.Tick.RectangleBatcher.RectInstance to the active batch.
Parameters¶
command DrawCommand
RectangleBatcher.BeginBatch() Method¶
Opens a new batch starting at the current instance write head.
RectangleBatcher.Dispose() Method¶
Releases the GPU UnityEngine.GraphicsBuffer.
Implements Dispose()
RectangleBatcher.EndBatch() Method¶
Closes the current batch, discarding it if it contains no instances.
RectangleBatcher.GetBatchStartIndexAndInstanceCount(int) Method¶
Returns the GPU buffer start index and instance count for the batch at index.
Parameters¶
index System.Int32
Returns¶
RectangleBatcher.RecordInto(CommandBuffer, int) Method¶
Issues a DrawMeshInstancedProcedural call for batch index into target.
Parameters¶
target UnityEngine.Rendering.CommandBuffer
index System.Int32
RectangleBatcher.Reset() Method¶
Clears all batches and resets the instance write head for the next frame.
RectangleBatcher.UploadToGPU() Method¶
Uploads all accumulated instance data to the GPU structured buffer, growing the buffer if needed.