picogl.texture.texture2d ======================== .. py:module:: picogl.texture.texture2d .. autoapi-nested-parse:: This module provides functionality for managing 2D OpenGL textures. It includes a class for creating, binding, uploading data, setting parameters, generating mipmaps, and deleting 2D textures in OpenGL. This class ensures efficient management of texture resources in graphics applications. Example Usage: ============== >> spec = TextureSpec(width=width, height=height) >> tex = Texture2D(spec, data) >> driver = GLTextureDriver() >> driver.create(tex) >> driver.bind(tex) >> driver.set_parameters() >> driver.upload(tex) >> driver.generate_mipmap() >> return tex.handle Classes ------- .. autoapisummary:: picogl.texture.texture2d.Texture2D Module Contents --------------- .. py:class:: Texture2D(spec: picogl.texture.texture_spec.TextureSpec, data: numpy.ndarray | None = None) Texture 2D .. py:attribute:: spec .. py:attribute:: data :value: None .. py:attribute:: handle :value: None .. py:attribute:: initialized :value: False