Skip to content

ILedSource

InterfaceLEDStudioLEDStudio
public interface ILedSource

Unified interface for all content sources that can feed into the logical board composition pipeline. Sources provide content at board-space resolution and report dirty regions for partial updates.

void Prepare(Vector2Int targetResolution)

Allocates or resizes source resources for the requested logical board resolution.

Parameters

Name Type
targetResolution UnityEngine.Vector2Int
void UpdateSource(in TimeStep step)

Updates time-dependent content using the board’s deterministic simulation step.

Parameters

Name Type
step ImpossibleRobert.Common.Timing.TimeStep
void MarkClean()

Clears dirty state after the compositor consumes the current output.

void GetDirtyRects(List<RectInt> outRects)

Appends source-space rectangles that changed since the last clean frame.

Parameters

Name Type
outRects System.Collections.Generic.List{UnityEngine.RectInt}
void Release()

Releases textures and other resources owned by the source; repeated calls must be safe.

LedSourceType SourceType { get; }

Returns

LEDStudio.LedSourceType

bool IsReady { get; }

Returns

System.Boolean

bool IsDirty { get; }

Returns

System.Boolean

Texture OutputTexture { get; }

Returns

UnityEngine.Texture