Gdk.GLTexture¶
class — extends Texture, Paintable, Gio.Icon, Gio.LoadableIcon
A GdkTexture representing a GL texture object.
Constructors¶
new¶
@classmethod
def new(cls, context: GLContext, id: int, width: int, height: int, destroy: GLib.DestroyNotify, data: int | None = ...) -> GLTexture
:::warning Deprecated since 4.12 This API is deprecated. :::
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 GLTexture.release.
Parameters:
context— aGdkGLContextid— the ID of a texture that was created withcontextwidth— the nominal width of the textureheight— the nominal height of the texturedestroy— a destroy notify that will be called when the GL resources are releaseddata— data that gets passed todestroy
Methods¶
release¶
Releases the GL resources held by a GdkGLTexture.
The texture contents are still available via the
Texture.download function, after this
function has been called.