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.

Methods
GType _gType() @property
GLTextureBuilder self()Returns `this`, for use in `with` statements.
GLTextureBuilderGidBuilder builder()Get builder for [gdk.gltexture_builder.GLTextureBuilder] Returns: New builder object
gdk.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.
bool hasMipmap() @propertyGet `hasMipmap` property. Returns: If the texture has a mipmap.
void hasMipmap(bool propval) @propertySet `hasMipmap` property. Params: propval = If the texture has a mipmap.
int height() @propertyGet `height` property. Returns: The height of the texture.
void height(int propval) @propertySet `height` property. Params: propval = The height of the texture.
uint id() @propertyGet `id` property. Returns: The texture ID to use.
void id(uint propval) @propertySet `id` property. Params: propval = The texture ID to use.
void * sync() @propertyGet `sync` property. Returns: An optional `GLSync` object.
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.
int width() @propertyGet `width` property. Returns: The width of the texture.
void width(int propval) @propertySet `width` property. Params: propval = The width of the texture.
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 context
gdk.types.MemoryFormat getFormat()Gets the format previously set via [gdk.gltexture_builder.GLTextureBuilder.setFormat]. Returns: The format
bool getHasMipmap()Gets whether the texture has a mipmap. Returns: Whether the texture has a mipmap
int getHeight()Gets the height previously set via [gdk.gltexture_builder.GLTextureBuilder.setHeight] or 0 if the height wasn't set. Returns: The height
uint getId()Gets the texture id previously set via [gdk.gltexture_builder.GLTextureBuilder.setId] or 0 if the id wasn't set. Returns: The id
void * 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 region
gdk.texture.Texture getUpdateTexture()Gets the texture previously set via [gdk.gltexture_builder.GLTextureBuilder.setUpdateTexture] or null if none was set. Returns: The texture
int getWidth()Gets the width previously set via [gdk.gltexture_builder.GLTextureBuilder.setWidth] or 0 if the width wasn't set. Returns: The width
void 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.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new texture builder. Returns: the new `GdkTextureBuilder`
Methods
T context(gdk.glcontext.GLContext propval)Set `context` property. Params: propval = The context owning the texture. Returns: Builder instance for fluent chaining
T format(gdk.types.MemoryFormat propval)Set `format` property. Params: propval = The format when downloading the texture. Returns: Builder instance for fluent chaining
T hasMipmap(bool propval)Set `hasMipmap` property. Params: propval = If the texture has a mipmap. Returns: Builder instance for fluent chaining
T height(int propval)Set `height` property. Params: propval = The height of the texture. Returns: Builder instance for fluent chaining
T id(uint propval)Set `id` property. Params: propval = The texture ID to use. Returns: Builder instance for fluent chaining
T 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 chaining
T 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 chaining
T width(int propval)Set `width` property. Params: propval = The width of the texture. Returns: Builder instance for fluent chaining

Fluent builder for [gdk.gltexture_builder.GLTextureBuilder]