Clutter::Cogl.3pm

Langue: en

Version: 2008-10-14 (ubuntu - 08/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

Clutter::Cogl

Clutter::Cogl is an abstraction API over GL and GLES, and it is used internally by Clutter to allow portability between platforms.

The Clutter::Cogl API is low-level and it is meant to be used only when creating new Clutter::Actor classes.

Clutter::Cogl tries to provide an API that is nicer and more understandable than the raw OpenGL API (as exposed, for instance, by the Perl OpenGL wrapper module).

METHODS


boolean = Clutter::Cogl->check_extension ($name, $ext)


boolean = Clutter::Cogl->check_extension ($name, $ext)

$name (string)
$ext (string)

Checks whether name occurs in the list of extensions inside ext

Clutter::Cogl->clip_set ($x_offset, $y_offset, $width, $height)


Clutter::Cogl->clip_set ($x_offset, $y_offset, $width, $height)

$x_offset (double)
$y_offset (double)
$width (double)
$height (double)

Specifies a rectangular clipping area for all subsequent drawing operations. Any drawing commands that extend outside the rectangle will be clipped so that only the portion inside the rectangle will be displayed. The rectangle dimensions are transformed by the current model-view matrix

Clutter::Cogl->clip_unset

Removes the current clipping rectangle so that all drawing operations extend to full size of the viewport again

Clutter::Cogl->color ($color)

$color (Clutter::Color)

Changes the color of the pen used for filling and stroking primitives

Clutter::Cogl->enable_depth_test ($enable_test)

$enable_test (boolean)

Sets whether depth testing is enabled. If it is disabled then the order that actors are layered on the screen depends solely on the order specified using Clutter::Actor::raise() and Clutter::Actor::lower(), otherwise it will also take into account the actor's depth. Depth testing is disabled by default

boolean = Clutter::Cogl->features_available ($features)

$features (CoglFeatureFlags)

Checks whether the given features are available.

CoglFeatureFlags = Clutter::Cogl->get_features

Retrieves all the features supported by Cogl on the current platform

Clutter::Cogl->frustum ($left, $right, $bottom, $top, $z_near, $z_far)


Clutter::Cogl->frustum ($left, $right, $bottom, $top, $z_near, $z_far)

$left (double)
$right (double)
$bottom (double)
$top (double)
$z_near (double)
$z_far (double)

Replaces the current projection matrix with a perspective matrix for the given viewing frustum
Since: clutter 0.8

Clutter::Cogl->path_arc ($center_x, $center_y, $radius_x, $radius_y, $angle_start, $angle_end)


Clutter::Cogl->path_arc ($center_x, $center_y, $radius_x, $radius_y, $angle_start, $angle_end)

$center_x (double)
$center_y (double)
$radius_x (double)
$radius_y (double)
$angle_start (double)
$angle_end (double)

Adds an elliptical arc segment to the current path. A straight line segment will link the current pen location with the first vertex of the arc. If you perform a move_to to the arc start just before drawing it you create a free standing arc.

Clutter::Cogl->path_close

Closes the path being constructed by adding a straight line segment to it that ends at the first vertex of the path

Clutter::Cogl->path_curve_to ($x1, $y1, $x2, $y2, $x3, $y3)


Clutter::Cogl->path_curve_to ($x1, $y1, $x2, $y2, $x3, $y3)

$x1 (double)
$y1 (double)
$x2 (double)
$y2 (double)
$x3 (double)
$y3 (double)

Adds a cubic bezier curve segment to the current path with the given second, third and fourth control points and using current pen location as the first control point.

Clutter::Cogl->path_ellipse ($center_x, $center_y, $radius_x, $radius_y)


Clutter::Cogl->path_ellipse ($center_x, $center_y, $radius_x, $radius_y)

$center_x (double)
$center_y (double)
$radius_x (double)
$radius_y (double)

Clears the previously constructed shape and constructs an ellipse shape

Clutter::Cogl->path_fill

Fills the constructed shape using the current drawing color

Clutter::Cogl->path_line ($x1, $y1, $x2, $y2)


Clutter::Cogl->path_line ($x1, $y1, $x2, $y2)

$x1 (double)
$y1 (double)
$x2 (double)
$y2 (double)

Clears the previously constructed shape and constructs a straight line shape start and ending at the given coordinates

Clutter::Cogl->path_line_to ($x, $y)


Clutter::Cogl->path_line_to ($x, $y)

$x (double)
$y (double)

Adds a straight line segment to the current path that ends at the given coordinates

Clutter::Cogl->path_move_to ($x, $y)


Clutter::Cogl->path_move_to ($x, $y)

$x (double)
$y (double)

Clears the previously constructed shape and begins a new path contour by moving the pen to the given coordinates

Clutter::Cogl->path_rectangle ($x, $y, $width, $height)


Clutter::Cogl->path_rectangle ($x, $y, $width, $height)

$x (double)
$y (double)
$width (double)
$height (double)

Clears the previously constructed shape and constructs a rectangular shape at the given coordinates

Clutter::Cogl->path_rel_curve_to ($x1, $y1, $x2, $y2, $x3, $y3)


Clutter::Cogl->path_rel_curve_to ($x1, $y1, $x2, $y2, $x3, $y3)

$x1 (double)
$y1 (double)
$x2 (double)
$y2 (double)
$x3 (double)
$y3 (double)

Adds a cubic bezier curve segment to the current path with the given second, third and fourth control points and using current pen location as the first control point. The given coordinates are relative to the current pen location

Clutter::Cogl->path_rel_line_to ($x, $y)


Clutter::Cogl->path_rel_line_to ($x, $y)

$x (double)
$y (double)

Adds a straight line segment to the current path that ends at the given coordinates relative to the current pen location

Clutter::Cogl->path_rel_move_to ($x, $y)


Clutter::Cogl->path_rel_move_to ($x, $y)

$x (double)
$y (double)

Clears the previously constructed shape and begins a new path contour by moving the pen to the given coordinates relative to the current pen location

Clutter::Cogl->path_round_rectangle ($x, $y, $width, $height, $radius, $arc_step)


Clutter::Cogl->path_round_rectangle ($x, $y, $width, $height, $radius, $arc_step)

$x (double)
$y (double)
$width (double)
$height (double)
$radius (double)
$arc_step (double)

Clears the previously constructed shape and constructs a rectangular shape with rounded corners

Clutter::Cogl->path_stroke

Strokes the constructed shape using the current drawing color and a width of 1 pixel (regardless of the current transformation matrix)

Clutter::Cogl->perspective ($fovy, $aspect, $z_near, $z_far)


Clutter::Cogl->perspective ($fovy, $aspect, $z_near, $z_far)

$fovy (double)
$aspect (double)
$z_near (double)
$z_far (double)

Multiplies the current set matrix with a projection matrix based on the provided values

Clutter::Cogl->pop_matrix

Restore the current model-view matrix from the matrix stack

Clutter::Cogl->push_matrix

Stores the current model-view matrix on the matrix stack. The matrix can later be restored with Clutter::Cogl->pop_matrix()

Clutter::Cogl->rectangle ($x, $y, $width, $height)


Clutter::Cogl->rectangle ($x, $y, $width, $height)

$x (integer)
$y (integer)
$width (integer)
$height (integer)

Fills a rectangle at the given coordinates with the current drawing color in a highly optimizied fashion

Clutter::Cogl->rotate ($angle, $x, $y, $z)


Clutter::Cogl->rotate ($angle, $x, $y, $z)

$angle (double)
$x (integer)
$y (integer)
$z (integer)

Multiplies the current model-view matrix by one that rotates the model around the vertex specified by x, y and z. The rotation follows the right-hand thumb rule so for example rotating by 10 degrees about the vertex (0, 0, 1) causes a small counter-clockwise rotation

Clutter::Cogl->scale ($x, $y)


Clutter::Cogl->scale ($x, $y)

$x (double)
$y (double)

Multiplies the current model-view matrix by one that scales the x and y axes by the given values

Clutter::Cogl->setup_viewport ($width, $height, $fovy, $aspect, $z_near, $z_far)


Clutter::Cogl->setup_viewport ($width, $height, $fovy, $aspect, $z_near, $z_far)

$width (integer)
$height (integer)
$fovy (double)
$aspect (double)
$z_near (double)
$z_far (double)

Replaces the current viewport and projection matrix with the given values. The viewport is placed at the top left corner of the window with the given width and height. The projection matrix is replaced with one that has a viewing angle of fovy along the y-axis and a view scaled according to aspect along the x-axis. The view is clipped according to z_near and z_far on the z-axis

Clutter::Cogl->translate ($x, $y, $z)


Clutter::Cogl->translate ($x, $y, $z)

$x (double)
$y (double)
$z (double)

Multiplies the current model-view matrix by one that translates the model along all three axes according to the given values

(x, y, width, height) = Clutter::Cogl->get_viewport

SEE ALSO

Clutter Copyright (C) 2006 OpenedHand Ltd.

This module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public Library version 2.1, or under the terms of the Artistic License. See Clutter for the full copyright notice.