Top | Description | Object Hierarchy | Properties |
ClutterDeformEffectClutterDeformEffect — A base class for effects deforming the geometry of an actor |
struct ClutterDeformEffect; struct ClutterDeformEffectClass; void clutter_deform_effect_set_back_material (ClutterDeformEffect *effect
,CoglHandle material
); CoglHandle clutter_deform_effect_get_back_material (ClutterDeformEffect *effect
); void clutter_deform_effect_set_n_tiles (ClutterDeformEffect *effect
,guint x_tiles
,guint y_tiles
); void clutter_deform_effect_get_n_tiles (ClutterDeformEffect *effect
,guint *x_tiles
,guint *y_tiles
); void clutter_deform_effect_invalidate (ClutterDeformEffect *effect
);
GObject +----GInitiallyUnowned +----ClutterActorMeta +----ClutterEffect +----ClutterOffscreenEffect +----ClutterDeformEffect +----ClutterPageTurnEffect
"back-material" CoglHandle* : Read / Write "x-tiles" guint : Read / Write "y-tiles" guint : Read / Write
ClutterDeformEffect is an abstract class providing all the plumbing for creating effects that result in the deformation of an actor's geometry.
ClutterDeformEffect uses offscreen buffers to render the contents of a ClutterActor and then the Cogl vertex buffers API to submit the geometry to the GPU.
Sub-classes of ClutterDeformEffect should override the
ClutterDeformEffectClass.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.
ClutterDeformEffect is available since Clutter 1.4
struct ClutterDeformEffect;
The ClutterDeformEffect structure contains only private data and should be accessed using the provided API
Since 1.4
struct ClutterDeformEffectClass { void (* deform_vertex) (ClutterDeformEffect *effect, gfloat width, gfloat height, CoglTextureVertex *vertex); };
The ClutterDeformEffectClass structure contains only private data
virtual function; sub-classes should override this function to compute the deformation of each vertex |
Since 1.4
void clutter_deform_effect_set_back_material (ClutterDeformEffect *effect
,CoglHandle material
);
Sets the material that should be used when drawing the back face of the actor during a deformation
The ClutterDeformEffect will take a reference on the material's handle
|
a ClutterDeformEffect |
|
a handle to a Cogl material. [allow-none] |
Since 1.4
CoglHandle clutter_deform_effect_get_back_material
(ClutterDeformEffect *effect
);
Retrieves the handle to the back face material used by effect
|
a ClutterDeformEffect |
Returns : |
a handle for the material, or NULL .
The returned material is owned by the ClutterDeformEffect and it
should not be freed directly. [transfer none]
|
Since 1.4
void clutter_deform_effect_set_n_tiles (ClutterDeformEffect *effect
,guint x_tiles
,guint y_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
|
a ClutterDeformEffect |
|
number of horizontal tiles |
|
number of vertical tiles |
Since 1.4
void clutter_deform_effect_get_n_tiles (ClutterDeformEffect *effect
,guint *x_tiles
,guint *y_tiles
);
Retrieves the number of horizontal and vertical tiles used to sub-divide the actor's geometry during the effect
|
a ClutterDeformEffect |
|
return location for the number of horizontal tiles,
or NULL . [out]
|
|
return location for the number of vertical tiles,
or NULL . [out]
|
Since 1.4
void clutter_deform_effect_invalidate (ClutterDeformEffect *effect
);
Invalidates the effect
's vertices and, if it is associated
to an actor, it will queue a redraw
|
a ClutterDeformEffect |
Since 1.4
"back-material"
property "back-material" CoglHandle* : Read / Write
A material to be used when painting the back of the actor to which this effect has been applied
By default, no material will be used
Since 1.4
"x-tiles"
property "x-tiles" guint : Read / Write
The number of horizontal tiles. The bigger the number, the smaller the tiles
Allowed values: >= 1
Default value: 32
Since 1.4