picogl.texture.binding

Provides a context manager for binding a texture in OpenGL.

This module allows temporary binding of a texture in an OpenGL context, ensuring that the original binding is restored afterwards. It helps manage state changes when working with OpenGL texture.

Functions

gl_bound_texture(texture_id[, target])

Bind texture_id to target, restoring the previous binding on exit.

Module Contents

picogl.texture.binding.gl_bound_texture(texture_id: int, target: picogl.texture.gltexture.GLTexture = GLTexture.TEXTURE_2D)[source]

Bind texture_id to target, restoring the previous binding on exit.