:right-sidebar: True GLTexture =================================================================== .. currentmodule:: gi.repository.Gdk .. class:: GLTexture(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gdk.Texture`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gdk.Paintable`, :class:`~gi.repository.Gio.Icon`, :class:`~gi.repository.Gio.LoadableIcon` A GdkTexture representing a GL texture object. Constructors ------------ .. rst-class:: interim-class .. class:: GLTexture :no-index: .. classmethod:: new(context: ~gi.repository.Gdk.GLContext, id: int, width: int, height: int, destroy: ~typing.Callable[[~typing.Any], None], data: ~typing.Any = None) -> ~gi.repository.Gdk.GLTexture Creates a new texture for an existing GL texture. Note that the GL texture must not be modified until ``destroy`` is called, which will happen when the GdkTexture object is finalized, or due to an explicit call of :obj:`~gi.repository.Gdk.GLTexture.release`\. .. deprecated:: 4.12 :obj:`~gi.repository.Gdk.GLTextureBuilder` supersedes this function and provides extended functionality for creating GL textures. :param context: a ``GdkGLContext`` :param id: the ID of a texture that was created with ``context`` :param width: the nominal width of the texture :param height: the nominal height of the texture :param destroy: a destroy notify that will be called when the GL resources are released :param data: data that gets passed to ``destroy`` Methods ------- .. rst-class:: interim-class .. class:: GLTexture :no-index: .. method:: release() -> None Releases the GL resources held by a ``GdkGLTexture``\. The texture contents are still available via the :obj:`~gi.repository.Gdk.Texture.download` function, after this function has been called.