Next: , Previous: ClutterContent, Up: Top


27 ClutterDeformEffect

A base class for effects deforming the geometry of an actor

27.1 Overview

<clutter-deform-effect> is an abstract class providing all the plumbing for creating effects that result in the deformation of an actor's geometry.

<clutter-deform-effect> uses offscreen buffers to render the contents of a <clutter-actor> and then the Cogl vertex buffers API to submit the geometry to the GPU.

27.2 Implementing ClutterDeformEffect

Sub-classes of <clutter-deform-effect> should override the deform-vertex virtual function; this function is called on every vertex that needs to be deformed by the effect. Each passed vertex is an in-out parameter that initially contains the position of the vertex and should be modified according to a specific deformation algorithm.

<clutter-deform-effect> is available since Clutter 1.4

27.3 Usage

— Function: clutter-deform-effect-set-n-tiles (self <clutter-deform-effect>) (x_tiles unsigned-int) (y_tiles unsigned-int)
— Method: set-n-tiles

Sets the number of horizontal and vertical tiles to be used when applying the effect

More tiles allow a finer grained deformation at the expenses of computation

effect
a <clutter-deform-effect>
x-tiles
number of horizontal tiles
y-tiles
number of vertical tiles

Since 1.4

— Function: clutter-deform-effect-get-n-tiles (self <clutter-deform-effect>) ⇒  (x_tiles unsigned-int) (y_tiles unsigned-int)
— Method: get-n-tiles

Retrieves the number of horizontal and vertical tiles used to sub-divide the actor's geometry during the effect

effect
a <clutter-deform-effect>
x-tiles
return location for the number of horizontal tiles, or ‘#f’.
y-tiles
return location for the number of vertical tiles, or ‘#f’.

Since 1.4

— Function: clutter-deform-effect-invalidate (self <clutter-deform-effect>)
— Method: invalidate

Invalidates the effect's vertices and, if it is associated to an actor, it will queue a redraw

effect
a <clutter-deform-effect>

Since 1.4