Constructor

GdkGLTexturenew

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().

Parameters

context GdkGLContext
 

A GdkGLContext

 The data is owned by the caller of the function.
id guint
 

The ID of a texture that was created with context.

width int
 

The nominal width of the texture.

height int
 

The nominal height of the texture.

destroy GDestroyNotify
 

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

data gpointer
 

Data that gets passed to destroy.

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

Return value

Returns: GdkGLTexture
 

A newly-created GdkTexture

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