Top |
ClutterDeformEffectClutterDeformEffect — A base class for effects deforming the geometry of an actor |
void | clutter_deform_effect_set_back_material () |
CoglHandle | clutter_deform_effect_get_back_material () |
void | clutter_deform_effect_set_n_tiles () |
void | clutter_deform_effect_get_n_tiles () |
void | clutter_deform_effect_invalidate () |
CoglHandle * | back-material | Read / Write |
guint | x-tiles | Read / Write |
guint | y-tiles | Read / Write |
GObject ╰── GInitiallyUnowned ╰── ClutterActorMeta ╰── ClutterEffect ╰── ClutterOffscreenEffect ╰── ClutterDeformEffect ╰── ClutterPageTurnEffect
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.
ClutterDeformEffect is available since Clutter 1.4
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.
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
Since: 1.4
CoglHandle
clutter_deform_effect_get_back_material
(ClutterDeformEffect *effect
);
Retrieves the handle to the back face material used by effect
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
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
effect |
||
x_tiles |
return location for the number of horizontal tiles,
or |
[out] |
y_tiles |
return location for the number of vertical tiles,
or |
[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
Since: 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
Since: 1.4
“back-material”
property “back-material” CoglHandle *
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
Flags: Read / Write
Since: 1.4
“x-tiles”
property “x-tiles” guint
The number of horizontal tiles. The bigger the number, the smaller the tiles
Flags: Read / Write
Allowed values: >= 1
Default value: 32
Since: 1.4
“y-tiles”
property “y-tiles” guint
The number of vertical tiles. The bigger the number, the smaller the tiles
Flags: Read / Write
Allowed values: >= 1
Default value: 32
Since: 1.4