Clutter.TextureContent.new_from_texture
Description: Reference for Clutter.TextureContent.new_from_texture

### Function

# Clutter TextureContentnew_from_texture

#### Declaration [src]

    ClutterContent*
    clutter_texture_content_new_from_texture (
      CoglTexture* texture,
      cairo_rectangle_int_t* clip
    )

#### Description [src]

Creates a new `ClutterTextureContent` instance for `texture`, taking an internal reference to `texture`.

If you change the contents of the `CoglTexture` you will need to manually invalidate the `texture_content` with `clutter_content_invalidate()` in order to update the actors using `texture_content` as their content.

#### Parameters

`texture`

  Type: `CoglTexture`

  A `CoglTexture`.

  The data is owned by the caller of the function.

`clip`

  Type: `cairo_rectangle_int_t`

  A clipping rectangle.

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

#### Return value

Type: `ClutterContent`

The newly created `ClutterTextureContent` instance. Use `g_object_unref()` when done.

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