Table of Contents

Class BitmapTextureLoader

Namespace
Map.Loading.Images
Assembly
MapAssembly.dll

Abstract base class for loading and populating textures from bitmap files Provides common infrastructure for terrain, heightmap, and normal map loading Eliminates code duplication across specialized bitmap loaders

public abstract class BitmapTextureLoader
Inheritance
object
BitmapTextureLoader

Fields

bmpLoader

protected JobifiedBMPLoader bmpLoader

Field Value

JobifiedBMPLoader

logProgress

protected bool logProgress

Field Value

bool

textureManager

protected MapTextureManager textureManager

Field Value

MapTextureManager

Methods

ApplyTextureAndSync(Texture2D)

Apply texture changes and force GPU sync Common pattern used by all bitmap loaders

protected void ApplyTextureAndSync(Texture2D texture)

Parameters

texture Texture2D

GetBitmapFileName()

Get the bitmap filename (e.g., "terrain.bmp", "heightmap.bmp")

protected abstract string GetBitmapFileName()

Returns

string

GetLoaderName()

Get the loader name for logging purposes

protected abstract string GetLoaderName()

Returns

string

Initialize(MapTextureManager, bool)

Initialize the bitmap loader with required dependencies

public void Initialize(MapTextureManager textures, bool enableLogging = true)

Parameters

textures MapTextureManager
enableLogging bool

LoadAndPopulateAsync(string)

Load bitmap and populate corresponding texture

public Task LoadAndPopulateAsync(string provincesPath)

Parameters

provincesPath string

Path to provinces.bmp or provinces.png (used to derive bitmap path)

Returns

Task

PopulateTexture(BMPLoadResult)

Populate texture with bitmap data (implemented by derived classes)

protected abstract void PopulateTexture(BMPLoadResult bitmapData)

Parameters

bitmapData BMPLoadResult

RebindTexturesToMaterials()

Rebind textures to runtime materials after texture updates Ensures all material instances have the updated textures

protected void RebindTexturesToMaterials()