Class: Gdk::GLTextureBuilder

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initializeGdk::GLTextureBuilder

Creates a new texture builder.

Instance Method Details

#build(destroy, data) ⇒ Gdk::Texture

Builds a new GdkTexture with the values set up in the builder.

The destroy function gets called when the returned texture gets released; either when the texture is finalized or by an explicit call to [methodGdk.GLTexture.release]. It should release all GL resources associated with the texture, such as the [propertyGdk.GLTextureBuilder:id] and the [propertyGdk.GLTextureBuilder:sync].

Note that it is a programming error to call this function if any mandatory property has not been set.

It is possible to call this function multiple times to create multiple textures, possibly with changing properties in between.

Parameters:

  • destroy (GLib::DestroyNotify)

    destroy function to be called when the texture is released

  • data (GObject)

    user data to pass to the destroy function

Returns:

#contextGdk::GLContext

The context owning the texture.

Returns:

#context=(context) ⇒ Gdk::GLContext

The context owning the texture.

Parameters:

Returns:

#formatGdk::MemoryFormat

The format when downloading the texture.

Returns:

#format=(format) ⇒ Gdk::MemoryFormat

The format when downloading the texture.

Parameters:

Returns:

#has_mipmapBoolean

Gets whether the texture has a mipmap.

Returns:

  • (Boolean)

    Whether the texture has a mipmap

#has_mipmap=(has_mipmap) ⇒ Boolean

If the texture has a mipmap.

Parameters:

  • has_mipmap (Boolean)

Returns:

  • (Boolean)

    has-mipmap

  • (Boolean)

    has-mipmap

#has_mipmap?Boolean

If the texture has a mipmap.

Returns:

  • (Boolean)

    has-mipmap

#heightInteger

The height of the texture.

Returns:

  • (Integer)

    height

#height=(height) ⇒ Integer

The height of the texture.

Parameters:

  • height (Integer)

Returns:

  • (Integer)

    height

  • (Integer)

    height

#idInteger

The texture ID to use.

Returns:

  • (Integer)

    id

#id=(id) ⇒ Integer

The texture ID to use.

Parameters:

  • id (Integer)

Returns:

  • (Integer)

    id

  • (Integer)

    id

#syncGObject

An optional GLSync object.

If this is set, GTK will wait on it before using the texture.

Returns:

  • (GObject)

    sync

#sync=(sync) ⇒ GObject

An optional GLSync object.

If this is set, GTK will wait on it before using the texture.

Parameters:

  • sync (GObject)

Returns:

  • (GObject)

    sync

  • (GObject)

    sync

#update_regioncairo::Region

The update region for [propertyGdk.GLTextureBuilder:update-texture].

Returns:

  • (cairo::Region)

    update-region

#update_region=(update_region) ⇒ cairo::Region

The update region for [propertyGdk.GLTextureBuilder:update-texture].

Parameters:

  • update_region (cairo::Region)

Returns:

  • (cairo::Region)

    update-region

  • (cairo::Region)

    update-region

#update_textureGdk::Texture

The texture [propertyGdk.GLTextureBuilder:update-region] is an update for.

Returns:

#update_texture=(update_texture) ⇒ Gdk::Texture

The texture [propertyGdk.GLTextureBuilder:update-region] is an update for.

Parameters:

Returns:

#widthInteger

The width of the texture.

Returns:

  • (Integer)

    width

#width=(width) ⇒ Integer

The width of the texture.

Parameters:

  • width (Integer)

Returns:

  • (Integer)

    width

  • (Integer)

    width