---
name: "Clutter::Cogl::Texture"
section: "3pm"
platform: "linux"
package: "libclutter-perl"
version: "1.002-1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Clutter::Cogl::Texture"
---

# Clutter::Cogl::Texture(3pm)

Low-level image handling

## NAME

Clutter::Cogl::Texture - Low-level image handling

## DESCRIPTION

COGL allows creating and manipulating GL textures using a uniform API that tries to hide all the various complexities of creating, loading and manipulating textures.

## METHODS

### handle = Clutter::Cogl::Texture-\>new\_from\_data ($width, $height, $flags=COGL\_TEXTURE\_NONE, $format=COGL\_PIXEL\_FORMAT\_ANY, $internal\_format=COGL\_PIXEL\_FORMAT\_ANY, $rowstride, $data)

- •

  `$width` (integer)

- •

  `$height` (integer)

- •

  `$flags` (Clutter::Cogl::TextureFlags)

- •

  `$format` (Clutter::Cogl::PixelFormat)

- •

  `$internal_format` (Clutter::Cogl::PixelFormat)

- •

  `$rowstride` (integer)

- •

  `$data` (scalar)

### handle = Clutter::Cogl::Texture-\>new\_from\_file ($filename, $flags, $internal\_format)

- •

  `$filename` (string)

- •

  `$flags` (Clutter::Cogl::TextureFlags)

- •

  `$internal_format` (Clutter::Cogl::PixelFormat)

May croak with a Glib::Error in $@ on failure.

### handle = Clutter::Cogl::Texture-\>new\_from\_foreign ($gl\_handle, $gl\_target, $width, $height, $x\_pot\_waste, $y\_pot\_waste, $format=COGL\_PIXEL\_FORMAT\_ANY)

- •

  `$gl_handle` (integer)

- •

  `$gl_target` (integer)

- •

  `$width` (integer)

- •

  `$height` (integer)

- •

  `$x_pot_waste` (integer)

- •

  `$y_pot_waste` (integer)

- •

  `$format` (Clutter::Cogl::PixelFormat)

### handle = Clutter::Cogl::Texture-\>new\_with\_size ($width, $height, $flags=COGL\_TEXTURE\_NONE, $internal\_format=COGL\_PIXEL\_FORMAT\_ANY)

- •

  `$width` (integer)

- •

  `$height` (integer)

- •

  `$flags` (Clutter::Cogl::TextureFlags)

- •

  `$internal_format` (Clutter::Cogl::PixelFormat)

### pixelformat = $handle-\>get\_format

### (gl\_handle, gl\_target) = $handle-\>get\_gl\_texture

### integer = $handle-\>get\_height

### boolean = $handle-\>is\_sliced

### integer = $handle-\>get\_max\_waste

### integer = $handle-\>get\_rowstride

### integer = $handle-\>get\_width

## ENUMS AND FLAGS

### enum Clutter::Cogl::PixelFormat

- •

  'any' / 'COGL\_PIXEL\_FORMAT\_ANY'

- •

  'a-8' / 'COGL\_PIXEL\_FORMAT\_A\_8'

- •

  'rgb-565' / 'COGL\_PIXEL\_FORMAT\_RGB\_565'

- •

  'rgba-4444' / 'COGL\_PIXEL\_FORMAT\_RGBA\_4444'

- •

  'rgba-5551' / 'COGL\_PIXEL\_FORMAT\_RGBA\_5551'

- •

  'yuv' / 'COGL\_PIXEL\_FORMAT\_YUV'

- •

  'g-8' / 'COGL\_PIXEL\_FORMAT\_G\_8'

- •

  'rgb-888' / 'COGL\_PIXEL\_FORMAT\_RGB\_888'

- •

  'bgr-888' / 'COGL\_PIXEL\_FORMAT\_BGR\_888'

- •

  'rgba-8888' / 'COGL\_PIXEL\_FORMAT\_RGBA\_8888'

- •

  'bgra-8888' / 'COGL\_PIXEL\_FORMAT\_BGRA\_8888'

- •

  'argb-8888' / 'COGL\_PIXEL\_FORMAT\_ARGB\_8888'

- •

  'abgr-8888' / 'COGL\_PIXEL\_FORMAT\_ABGR\_8888'

- •

  'rgba-8888-pre' / 'COGL\_PIXEL\_FORMAT\_RGBA\_8888\_PRE'

- •

  'bgra-8888-pre' / 'COGL\_PIXEL\_FORMAT\_BGRA\_8888\_PRE'

- •

  'argb-8888-pre' / 'COGL\_PIXEL\_FORMAT\_ARGB\_8888\_PRE'

- •

  'abgr-8888-pre' / 'COGL\_PIXEL\_FORMAT\_ABGR\_8888\_PRE'

- •

  'rgba-4444-pre' / 'COGL\_PIXEL\_FORMAT\_RGBA\_4444\_PRE'

- •

  'rgba-5551-pre' / 'COGL\_PIXEL\_FORMAT\_RGBA\_5551\_PRE'

### flags Clutter::Cogl::TextureFlags

- •

  'none' / 'COGL\_TEXTURE\_NONE'

- •

  'no-auto-mipmap' / 'COGL\_TEXTURE\_NO\_AUTO\_MIPMAP'

- •

  'no-slicing' / 'COGL\_TEXTURE\_NO\_SLICING'

## SEE ALSO

Clutter

## COPYRIGHT

Copyright (C) 2006, 2007, 2008  OpenedHand Ltd

Copyright (C) 2009  Intel Corporation

This module is free software; you can redistribute it and/or modify it under the terms of either:

- •

  the GNU Lesser General Public Library version 2.1; or

- •

  the Artistic License, version 2.0.

See Clutter for the full copyright notice.
