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

Fluent builder implementation template for gdk.gltexture_builder.GLTextureBuilder

Methods
T context(gdk.glcontext.GLContext propval) nothrowSet `context` property. Params: propval = The context owning the texture. Returns: Builder instance for fluent chaining
T format(gdk.types.MemoryFormat propval) nothrowSet `format` property. Params: propval = The format when downloading the texture. Returns: Builder instance for fluent chaining
T hasMipmap(bool propval) nothrowSet `hasMipmap` property. Params: propval = If the texture has a mipmap. Returns: Builder instance for fluent chaining
T height(int propval) nothrowSet `height` property. Params: propval = The height of the texture. Returns: Builder instance for fluent chaining
T id(uint propval) nothrowSet `id` property. Params: propval = The texture ID to use. Returns: Builder instance for fluent chaining
T sync(void * propval) nothrowSet `sync` property. Params: propval = An optional `GLSync` object.
T updateRegion(cairo.region.Region propval) nothrowSet `updateRegion` property. Params: propval = The update region for [gdk.gltexture_builder.GLTextureBuilder.updateTexture]. Returns: Builder instance for fluent chaining
T 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 chaining
T width(int propval) nothrowSet `width` property. Params: propval = The width of the texture. Returns: Builder instance for fluent chaining