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'
COPYRIGHT
Copyright (C) 2006, 2007, 2008 OpenedHand LtdCopyright (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.