Table of Contents

Interface IHighlightRenderer

Namespace
Map.Rendering.Highlight
Assembly
MapAssembly.dll

ENGINE: Interface for pluggable highlight/selection rendering implementations. ENGINE provides default (GPU compute-based fill/border). GAME can register custom implementations via MapRendererRegistry.

Examples of custom implementations:

  • Animated pulse effect
  • Glow/bloom effect
  • Custom outline styles
  • Shader-based selection
public interface IHighlightRenderer

Properties

DisplayName

Display name for UI/debugging

string DisplayName { get; }

Property Value

string

RendererId

Unique identifier for this renderer (e.g., "Default", "Glow", "Pulse")

string RendererId { get; }

Property Value

string

RequiresPerFrameUpdate

Whether this renderer requires per-frame updates (e.g., animated effects)

bool RequiresPerFrameUpdate { get; }

Property Value

bool

Methods

ApplyToMaterial(Material, HighlightStyleParams)

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

void ApplyToMaterial(Material material, HighlightStyleParams styleParams)

Parameters

material Material
styleParams HighlightStyleParams

ClearHighlight()

Clear all highlights.

void ClearHighlight()

Dispose()

Cleanup resources when renderer is deactivated or destroyed.

void Dispose()

GetHighlightedProvince()

Get the currently highlighted province ID.

ushort GetHighlightedProvince()

Returns

ushort

HighlightCountry(ushort, Color)

Highlight all provinces owned by a country.

void HighlightCountry(ushort countryID, Color color)

Parameters

countryID ushort

Country ID to highlight

color Color

Highlight color with alpha

HighlightProvince(ushort, Color, HighlightMode)

Highlight a single province.

void HighlightProvince(ushort provinceID, Color color, HighlightMode mode)

Parameters

provinceID ushort

Province to highlight (0 = clear)

color Color

Highlight color with alpha

mode HighlightMode

Fill or border-only mode

Initialize(MapTextureManager, HighlightRendererContext)

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

void Initialize(MapTextureManager textureManager, HighlightRendererContext context)

Parameters

textureManager MapTextureManager
context HighlightRendererContext

OnRenderFrame()

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

void OnRenderFrame()