textures
Texture loading and OpenGL binding management.
This module is responsible for loading 2D image assets via Pygame, applying transforms, and safely mapping them into ModernGL Texture and TextureArray objects. It enforces strict mipmap generation and anisotropic filtering to guarantee crisp pixel art visuals across all rendering distances.
- class textures.Textures(app)[source]
Bases:
objectLoads, configures, and binds OpenGL textures and texture arrays.
Handles mipmapping, anisotropic filtering, and texture units for crisp rendering. It pre-loads all essential visual assets during initialization and assigns them to specific texture binding locations for the GLSL shaders to sample from.
- Parameters:
app (Any) – The main application instance containing the Pygame and ModernGL contexts.