Table of Contents

Class BorderRendererBase

Namespace
Map.Rendering.Border
Assembly
MapAssembly.dll

ENGINE: Abstract base class for border renderers with common functionality. Handles both GPU compute and CPU-based implementations. Extend this class to create custom border renderers.

public abstract class BorderRendererBase : IBorderRenderer
Inheritance
object
BorderRendererBase
Implements
Derived

Fields

THREAD_GROUP_SIZE

protected const int THREAD_GROUP_SIZE = 8

Field Value

int

context

protected BorderRendererContext context

Field Value

BorderRendererContext

isInitialized

protected bool isInitialized

Field Value

bool

textureManager

protected MapTextureManager textureManager

Field Value

MapTextureManager

Properties

DisplayName

Display name for UI/debugging

public abstract string DisplayName { get; }

Property Value

string

RendererId

Unique identifier for this renderer (e.g., "DistanceField", "PixelPerfect", "MyCustom")

public abstract string RendererId { get; }

Property Value

string

RequiresPerFrameUpdate

Whether this renderer requires per-frame updates (e.g., MeshGeometry needs OnRenderFrame)

public virtual bool RequiresPerFrameUpdate { get; }

Property Value

bool

Methods

ApplyCommonStyleParams(Material, BorderStyleParams)

Utility: Apply common border style parameters to material.

protected void ApplyCommonStyleParams(Material material, BorderStyleParams styleParams)

Parameters

material Material
styleParams BorderStyleParams

ApplyToMaterial(Material, BorderStyleParams)

Apply visual parameters to the material (colors, widths, etc.) Called when visual style parameters change.

public abstract void ApplyToMaterial(Material material, BorderStyleParams styleParams)

Parameters

material Material
styleParams BorderStyleParams

CalculateThreadGroups(int, int)

Utility: Calculate thread groups for compute shader dispatch.

protected (int x, int y) CalculateThreadGroups(int width, int height)

Parameters

width int
height int

Returns

(int x, int y)

Dispose()

Cleanup resources when renderer is deactivated or destroyed.

public abstract void Dispose()

GenerateBorders(BorderGenerationParams)

Generate/update borders. Called when borders are dirty or ownership changes.

public abstract void GenerateBorders(BorderGenerationParams parameters)

Parameters

parameters BorderGenerationParams

GetShaderModeValue(string)

Utility: Get shader mode integer value for material.

protected int GetShaderModeValue(string rendererId)

Parameters

rendererId string

Returns

int

Initialize(MapTextureManager, BorderRendererContext)

Initialize the renderer with required resources. Called once when renderer is first activated.

public virtual void Initialize(MapTextureManager texManager, BorderRendererContext ctx)

Parameters

texManager MapTextureManager
ctx BorderRendererContext

OnInitialize()

Override for custom initialization logic. Called after textureManager and context are set.

protected abstract void OnInitialize()

OnRenderFrame()

Called per-frame for renderers that need continuous updates. Only called if RequiresPerFrameUpdate is true.

public virtual void OnRenderFrame()