picogl.backend.texture
Module provides utility functions and a class for managing OpenGL texture.
This module contains context managers for handling texture bindings, utility functions for creating procedural texture, and the TextureManager class for managing and reloading texture. It integrates with OpenGL through a backend driver, providing streamlined texture handling and fallback behavior.
Classes
TextureManager |
Functions
|
gl texture binding |
|
bind_texture |
|
Return absolute path to a texture. |
|
Create a checkerboard pattern |
|
Create fallback RGB checkerboard texture data. |
Module Contents
- picogl.backend.texture.bind_texture(tex: picogl.texture.texture2d.Texture2D | None)[source]
bind_texture
- picogl.backend.texture.get_texture_path(texture_name: str) pathlib.Path[source]
Return absolute path to a texture.
- picogl.backend.texture.create_checkerboard(texture_data: numpy.ndarray[Any, Any], texture_size: int)[source]
Create a checkerboard pattern
- picogl.backend.texture.create_checkerboard_array(texture_size: int) numpy.ndarray[source]
Create fallback RGB checkerboard texture data.