Support scaling on the z axis with cogl_scale

This simply adds a z argument to cogl_scale and updates clutter-actor.c
to pass 1.0 for the z scale.
This commit is contained in:
Robert Bragg 2009-01-26 22:52:38 +00:00
parent e9a45c7744
commit 70d7d16f13
5 changed files with 12 additions and 8 deletions

2
README
View File

@ -251,6 +251,8 @@ Release Notes for Clutter 1.0
* cogl_alpha_func has been removed, since this is now controlled using the * cogl_alpha_func has been removed, since this is now controlled using the
material API via cogl_material_set_alpha_test_function () material API via cogl_material_set_alpha_test_function ()
* cogl_scale now supports scaling on the z axis
Release Notes for Clutter 0.8 Release Notes for Clutter 0.8
------------------------------- -------------------------------

View File

@ -1369,7 +1369,7 @@ _clutter_actor_apply_modelview_transform (ClutterActor *self)
* entire object will move on the screen as a result of rotating it). * entire object will move on the screen as a result of rotating it).
*/ */
if (priv->scale_x != 1.0 || priv->scale_y != 1.0) if (priv->scale_x != 1.0 || priv->scale_y != 1.0)
cogl_scale (priv->scale_x, priv->scale_y); cogl_scale (priv->scale_x, priv->scale_y, 1.0);
if (priv->rzang) if (priv->rzang)
{ {

View File

@ -226,12 +226,14 @@ void cogl_pop_matrix (void);
* cogl_scale: * cogl_scale:
* @x: Amount to scale along the x-axis * @x: Amount to scale along the x-axis
* @y: Amount to scale along the y-axis * @y: Amount to scale along the y-axis
* @z: Amount to scale along the z-axis
* *
* Multiplies the current model-view matrix by one that scales the x * Multiplies the current model-view matrix by one that scales the x,
* and y axes by the given values. * y and z axes by the given values.
*/ */
void cogl_scale (float x, void cogl_scale (float x,
float y); float y,
float z);
/** /**
* cogl_translate: * cogl_translate:

View File

@ -213,9 +213,9 @@ cogl_pop_matrix (void)
} }
void void
cogl_scale (float x, float y) cogl_scale (float x, float y, float z)
{ {
GE( glScalef (x, y, 1.0) ); GE( glScalef (x, y, z) );
} }
void void

View File

@ -130,9 +130,9 @@ cogl_pop_matrix (void)
} }
void void
cogl_scale (float x, float y) cogl_scale (float x, float y, float z)
{ {
GE( glScalef (x, y, 1.0) ); GE( glScalef (x, y, z) );
} }
void void