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.
GLTextureBuilder self()Returns `this`, for use in `with` statements.GLTextureBuilderGidBuilder builder()Get builder for [gdk.gltexture_builder.GLTextureBuilder] Returns: New builder objectgdk.glcontext.GLContext context() @propertyGet `context` property. Returns: The context owning the texture.void context(gdk.glcontext.GLContext propval) @propertySet `context` property. Params: propval = The context owning the texture.gdk.types.MemoryFormat format() @propertyGet `format` property. Returns: The format when downloading the texture.void format(gdk.types.MemoryFormat propval) @propertySet `format` property. Params: propval = The format when downloading the texture.void hasMipmap(bool propval) @propertySet `hasMipmap` property. Params: propval = If the texture has a mipmap.void height(int propval) @propertySet `height` property. Params: propval = The height of the texture.void sync(void * propval) @propertySet `sync` property. Params: propval = An optional `GLSync` object.cairo.region.Region updateRegion() @propertyGet `updateRegion` property. Returns: The update region for `property@Gdk.GLTextureBuilder:update-texture`.void updateRegion(cairo.region.Region propval) @propertySet `updateRegion` property. Params: propval = The update region for `property@Gdk.GLTextureBuilder:update-texture`.gdk.texture.Texture updateTexture() @propertyGet `updateTexture` property. Returns: The texture `property@Gdk.GLTextureBuilder:update-region` is an update for.void updateTexture(gdk.texture.Texture propval) @propertySet `updateTexture` property. Params: propval = The texture `property@Gdk.GLTextureBuilder:update-region` is an update for.gdk.texture.Texture build(glib.types.DestroyNotify destroy = null, void * data = null)Builds a new [gdk.texture.Texture] with the values set up in the builder.gdk.glcontext.GLContext getContext()Gets the context previously set via [gdk.gltexture_builder.GLTextureBuilder.setContext] or null if none was set. Returns: The contextgdk.types.MemoryFormat getFormat()Gets the format previously set via [gdk.gltexture_builder.GLTextureBuilder.setFormat]. Returns: The formatbool getHasMipmap()Gets whether the texture has a mipmap. Returns: Whether the texture has a mipmapint getHeight()Gets the height previously set via [gdk.gltexture_builder.GLTextureBuilder.setHeight] or 0 if the height wasn't set. Returns: The heightuint getId()Gets the texture id previously set via [gdk.gltexture_builder.GLTextureBuilder.setId] or 0 if the id wasn't set. Returns: The idvoid * getSync()Gets the `GLsync` previously set via [gdk.gltexture_builder.GLTextureBuilder.setSync]. Returns: the `GLSync`cairo.region.Region getUpdateRegion()Gets the region previously set via [gdk.gltexture_builder.GLTextureBuilder.setUpdateRegion] or null if none was set. Returns: The regiongdk.texture.Texture getUpdateTexture()Gets the texture previously set via [gdk.gltexture_builder.GLTextureBuilder.setUpdateTexture] or null if none was set. Returns: The textureint getWidth()Gets 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)Sets the context to be used for the texture. This is the context that owns the texture.void setFormat(gdk.types.MemoryFormat format)Sets the format of the texture. The default is [gdk.types.MemoryFormat.R8g8b8a8Premultiplied].void setHasMipmap(bool hasMipmap)Sets whether the texture has a mipmap. This allows the renderer and other users of the generated texture to use a higher quality downscaling.void setHeight(int height)Sets the height of the texture.void setId(uint id)Sets 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 setSync(void * sync = null)Sets the GLSync object to use for the texture.void setUpdateRegion(cairo.region.Region region = null)Sets the region to be updated by this texture. Together with `propertyGdk.GLTextureBuilder:update-texture` this describes an update of a previous texture.void setUpdateTexture(gdk.texture.Texture texture = null)Sets the texture to be updated by this texture. See [gdk.gltexture_builder.GLTextureBuilder.setUpdateRegion] for an explanation.void setWidth(int width)Sets the width of the texture.T context(gdk.glcontext.GLContext propval)Set `context` property. Params: propval = The context owning the texture. Returns: Builder instance for fluent chainingT format(gdk.types.MemoryFormat propval)Set `format` property. Params: propval = The format when downloading the texture. Returns: Builder instance for fluent chainingT hasMipmap(bool propval)Set `hasMipmap` property. Params: propval = If the texture has a mipmap. Returns: Builder instance for fluent chainingT height(int propval)Set `height` property. Params: propval = The height of the texture. Returns: Builder instance for fluent chainingT id(uint propval)Set `id` property. Params: propval = The texture ID to use. Returns: Builder instance for fluent chainingT sync(void * propval)Set `sync` property. Params: propval = An optional `GLSync` object.T updateRegion(cairo.region.Region propval)Set `updateRegion` property. Params: propval = The update region for `property@Gdk.GLTextureBuilder:update-texture`. Returns: Builder instance for fluent chainingT updateTexture(gdk.texture.Texture propval)Set `updateTexture` property. Params: propval = The texture `property@Gdk.GLTextureBuilder:update-region` is an update for. Returns: Builder instance for fluent chainingT width(int propval)Set `width` property. Params: propval = The width of the texture. Returns: Builder instance for fluent chainingFluent builder for [gdk.gltexture_builder.GLTextureBuilder]