Table of Contents

Class DebugOverlayRenderer

Namespace
TileWorld.Engine.Render
Assembly
TileWorld.Engine.dll

Produces the debug overlay used by the desktop test application.

public sealed class DebugOverlayRenderer
Inheritance
DebugOverlayRenderer
Inherited Members

Remarks

This API is intended for engine infrastructure and advanced tooling. Prefer WorldRuntime as the stable gameplay-facing entry point.

Constructors

DebugOverlayRenderer(WorldRenderSettings, DebugBitmapFont5x7, string)

Creates a debug overlay renderer.

public DebugOverlayRenderer(WorldRenderSettings settings, DebugBitmapFont5x7 font = null, string textureKey = "debug/white")

Parameters

settings WorldRenderSettings

The render settings that define tile and chunk pixel sizes.

font DebugBitmapFont5x7

The debug font used for panel text.

textureKey string

The white-pixel texture key used to draw overlay primitives.

Properties

TextureKey

public string TextureKey { get; }

Property Value

string

Methods

Build(WorldRuntime, WorldRenderer, Camera2D, FrameInput, ushort, string)

Builds a frame of overlay draw commands and textual panel content.

public DebugOverlayFrame Build(WorldRuntime runtime, WorldRenderer worldRenderer, Camera2D camera, FrameInput input, ushort selectedTileId, string selectionLabel = null)

Parameters

runtime WorldRuntime

The world runtime being inspected.

worldRenderer WorldRenderer

The renderer that defines the visible chunk set.

camera Camera2D

The active camera.

input FrameInput

The current frame input snapshot.

selectedTileId ushort

The tile currently selected by the debug application.

selectionLabel string

An optional label that should override the default selection text.

Returns

DebugOverlayFrame

A frame containing textual lines and generated overlay draw commands.

Draw(WorldRuntime, WorldRenderer, Camera2D, FrameInput, IRenderContext, ushort, string)

Draws the debug overlay directly into a render context.

public void Draw(WorldRuntime runtime, WorldRenderer worldRenderer, Camera2D camera, FrameInput input, IRenderContext renderContext, ushort selectedTileId, string selectionLabel = null)

Parameters

runtime WorldRuntime

The world runtime being inspected.

worldRenderer WorldRenderer

The renderer that defines the visible chunk set.

camera Camera2D

The active camera.

input FrameInput

The current frame input snapshot.

renderContext IRenderContext

The render context that receives overlay draw commands.

selectedTileId ushort

The tile currently selected by the debug application.

selectionLabel string

An optional label that should override the default selection text.

TryGetHoveredTileCoord(Camera2D, FrameInput)

Attempts to resolve the world-tile coordinate currently under the cursor.

public WorldTileCoord? TryGetHoveredTileCoord(Camera2D camera, FrameInput input)

Parameters

camera Camera2D

The camera used to transform screen-space input into world space.

input FrameInput

The current frame input snapshot.

Returns

WorldTileCoord?

The hovered world-tile coordinate when the cursor is inside the viewport; otherwise null.