gdk.gltexture_builder
Module for [GLTextureBuilder] class
Types 3
gdk.gltexture_builder.GLTextureBuilder is a builder used to construct gdk.texture.Texture objects from GL textures.
The operation is quite simple: Create a texture builder, set all the necessary properties - keep in mind that the properties gdk.gltexture_builder.GLTextureBuilder.context, gdk.gltexture_builder.GLTextureBuilder.id, gdk.gltexture_builder.GLTextureBuilder.width, and gdk.gltexture_builder.GLTextureBuilder.height are mandatory - and then call gdk.gltexture_builder.GLTextureBuilder.build to create the new texture.
gdk.gltexture_builder.GLTextureBuilder can be used for quick one-shot construction of textures as well as kept around and reused to construct multiple textures.
GLTextureBuilderGidBuilder builder() static nothrowGet builder for [gdk.gltexture_builder.GLTextureBuilder] Returns: New builder objectgdk.glcontext.GLContext context() @property nothrowGet `context` property. Returns: The context owning the texture.void context(gdk.glcontext.GLContext propval) @property nothrowSet `context` property. Params: propval = The context owning the texture.gdk.types.MemoryFormat format() @property nothrowGet `format` property. Returns: The format when downloading the texture.void format(gdk.types.MemoryFormat propval) @property nothrowSet `format` property. Params: propval = The format when downloading the texture.void hasMipmap(bool propval) @property nothrowSet `hasMipmap` property. Params: propval = If the texture has a mipmap.void height(int propval) @property nothrowSet `height` property. Params: propval = The height of the texture.void sync(void * propval) @property nothrowSet `sync` property. Params: propval = An optional `GLSync` object.cairo.region.Region updateRegion() @property nothrowGet `updateRegion` property. Returns: The update region for [gdk.gltexture_builder.GLTextureBuilder.updateTexture].void updateRegion(cairo.region.Region propval) @property nothrowSet `updateRegion` property. Params: propval = The update region for [gdk.gltexture_builder.GLTextureBuilder.updateTexture].gdk.texture.Texture updateTexture() @property nothrowGet `updateTexture` property. Returns: The texture [gdk.gltexture_builder.GLTextureBuilder.updateRegion] is an update for.void updateTexture(gdk.texture.Texture propval) @property nothrowSet `updateTexture` property. Params: propval = The texture [gdk.gltexture_builder.GLTextureBuilder.updateRegion] is an update for.void width(int propval) @property nothrowSet `width` property. Params: propval = The width of the texture.gdk.texture.Texture build(glib.types.DestroyNotify destroy = null, void * data = null) nothrowBuilds a new [gdk.texture.Texture] with the values set up in the builder.gdk.glcontext.GLContext getContext() nothrowGets the context previously set via [gdk.gltexture_builder.GLTextureBuilder.setContext] or null if none was set. Returns: The contextgdk.types.MemoryFormat getFormat() nothrowGets the format previously set via [gdk.gltexture_builder.GLTextureBuilder.setFormat]. Returns: The formatbool getHasMipmap() nothrowGets whether the texture has a mipmap. Returns: Whether the texture has a mipmapint getHeight() nothrowGets the height previously set via [gdk.gltexture_builder.GLTextureBuilder.setHeight] or 0 if the height wasn't set. Returns: The heightuint getId() nothrowGets the texture id previously set via [gdk.gltexture_builder.GLTextureBuilder.setId] or 0 if the id wasn't set. Returns: The idvoid * getSync() nothrowGets the `GLsync` previously set via [gdk.gltexture_builder.GLTextureBuilder.setSync]. Returns: the `GLSync`cairo.region.Region getUpdateRegion() nothrowGets the region previously set via [gdk.gltexture_builder.GLTextureBuilder.setUpdateRegion] or null if none was set. Returns: The regiongdk.texture.Texture getUpdateTexture() nothrowGets the texture previously set via [gdk.gltexture_builder.GLTextureBuilder.setUpdateTexture] or null if none was set. Returns: The textureint getWidth() nothrowGets the width previously set via [gdk.gltexture_builder.GLTextureBuilder.setWidth] or 0 if the width wasn't set. Returns: The widthvoid setContext(gdk.glcontext.GLContext context = null) nothrowSets the context to be used for the texture. This is the context that owns the texture.void setFormat(gdk.types.MemoryFormat format) nothrowSets the format of the texture. The default is [gdk.types.MemoryFormat.R8g8b8a8Premultiplied].void setHasMipmap(bool hasMipmap) nothrowSets whether the texture has a mipmap. This allows the renderer and other users of the generated texture to use a higher quality downscaling.void setId(uint id) nothrowSets the texture id of the texture. The texture id must remain unmodified until the texture was finalized. See [gdk.gltexture_builder.GLTextureBuilder.build] for a longer discussion.void setUpdateRegion(cairo.region.Region region = null) nothrowSets the region to be updated by this texture. Together with [gdk.gltexture_builder.GLTextureBuilder.updateTexture] this describes an update of a previous texture.void setUpdateTexture(gdk.texture.Texture texture = null) nothrowSets the texture to be updated by this texture. See [gdk.gltexture_builder.GLTextureBuilder.setUpdateRegion] for an explanation.Fluent builder implementation template for gdk.gltexture_builder.GLTextureBuilder
T context(gdk.glcontext.GLContext propval) nothrowSet `context` property. Params: propval = The context owning the texture. Returns: Builder instance for fluent chainingT format(gdk.types.MemoryFormat propval) nothrowSet `format` property. Params: propval = The format when downloading the texture. Returns: Builder instance for fluent chainingT hasMipmap(bool propval) nothrowSet `hasMipmap` property. Params: propval = If the texture has a mipmap. Returns: Builder instance for fluent chainingT height(int propval) nothrowSet `height` property. Params: propval = The height of the texture. Returns: Builder instance for fluent chainingT id(uint propval) nothrowSet `id` property. Params: propval = The texture ID to use. Returns: Builder instance for fluent chainingT updateRegion(cairo.region.Region propval) nothrowSet `updateRegion` property. Params: propval = The update region for [gdk.gltexture_builder.GLTextureBuilder.updateTexture]. Returns: Builder instance for fluent chainingT updateTexture(gdk.texture.Texture propval) nothrowSet `updateTexture` property. Params: propval = The texture [gdk.gltexture_builder.GLTextureBuilder.updateRegion] is an update for. Returns: Builder instance for fluent chainingT width(int propval) nothrowSet `width` property. Params: propval = The width of the texture. Returns: Builder instance for fluent chainingFluent builder for gdk.gltexture_builder.GLTextureBuilder