Table of Contents

Class MapTexturePopulator

Namespace
Map.Rendering
Assembly
MapAssembly.dll

Handles population of map textures from province data. Uses GPU compute shader for the pixel loop (color→provinceID mapping). Falls back to CPU path if compute shader unavailable or BMP format. Plain C# class - dependencies passed via constructor.

public class MapTexturePopulator
Inheritance
object
MapTexturePopulator

Constructors

MapTexturePopulator(OwnerTextureDispatcher, bool)

public MapTexturePopulator(OwnerTextureDispatcher ownerDispatcher, bool logProgress = true)

Parameters

ownerDispatcher OwnerTextureDispatcher
logProgress bool

Methods

PopulateWithSimulationData(ProvinceMapResult, MapTextureManager, ProvinceMapping, GameState)

Populate textures using simulation data. Attempts GPU compute path first, falls back to CPU if needed.

public void PopulateWithSimulationData(ProvinceMapProcessor.ProvinceMapResult provinceResult, MapTextureManager textureManager, ProvinceMapping mapping, GameState gameState)

Parameters

provinceResult ProvinceMapProcessor.ProvinceMapResult
textureManager MapTextureManager
mapping ProvinceMapping
gameState GameState

UpdateSimulationData(MapTextureManager, ProvinceMapping, GameState, ushort[])

Update owner texture for changed provinces (runtime updates).

public void UpdateSimulationData(MapTextureManager textureManager, ProvinceMapping mapping, GameState gameState, ushort[] changedProvinces)

Parameters

textureManager MapTextureManager
mapping ProvinceMapping
gameState GameState
changedProvinces ushort[]