Gdk.GLTexture.new
Description: Reference for Gdk.GLTexture.new

### Constructor

# Gdk GLTexturenew

deprecated: 4.12

#### Declaration [src]

    GdkTexture*
    gdk_gl_texture_new (
      GdkGLContext* context,
      guint id,
      int width,
      int height,
      GDestroyNotify destroy,
      gpointer data
    )

#### Description [src]

Creates a new texture for an existing GL texture.

Note that the GL texture must not be modified until `destroy` is called, which will happen when the GdkTexture object is finalized, or due to an explicit call of `gdk_gl_texture_release()`.

Deprecated since: 4.12

`GdkGLTextureBuilder` supersedes this function and provides extended functionality for creating GL textures.

#### Parameters

`context`

  Type: `GdkGLContext`

  A `GdkGLContext`.

  The data is owned by the caller of the function.

`id`

  Type: `guint`

  The ID of a texture that was created with `context`.

`width`

  Type: `int`

  The nominal width of the texture.

`height`

  Type: `int`

  The nominal height of the texture.

`destroy`

  Type: `GDestroyNotify`

  A destroy notify that will be called when the GL resources are released.

`data`

  Type: `gpointer`

  Data that gets passed to `destroy`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: `GdkGLTexture`

A newly-created `GdkTexture`.

The caller of the function takes ownership of the data, and is responsible for freeing it.