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