simvx.graphics.materials.texture

Texture loading and bindless descriptor array management.

Module Contents

Classes

TextureManager

Loads textures into the bindless descriptor array with path-based caching.

Data

API

simvx.graphics.materials.texture.__all__

[‘TextureManager’]

simvx.graphics.materials.texture.log

‘getLogger(…)’

class simvx.graphics.materials.texture.TextureManager(engine: Any)

Loads textures into the bindless descriptor array with path-based caching.

Wraps Engine.load_texture() to avoid duplicate GPU uploads for the same file.

Initialization

load(path: str | pathlib.Path) int

Load a texture from disk. Returns its bindless index.

Cached — loading the same path twice returns the same index.

load_if_exists(path: str | pathlib.Path) int

Load a texture if the file exists. Returns -1 if not found.

property count: int

Number of unique textures loaded.

destroy() None

Cleanup (GPU resources owned by Engine, just clear cache).