diff --git a/clutter/cogl/cogl-material.h b/clutter/cogl/cogl-material.h index c77b09100..95a474831 100644 --- a/clutter/cogl/cogl-material.h +++ b/clutter/cogl/cogl-material.h @@ -109,7 +109,7 @@ void cogl_material_set_color (CoglHandle material, const CoglColor *color); * * This is the basic color of the material, used when no lighting is enabled. * - * The default value is (1.0, 1.0, 1.0, 1.0) + * The default value is (0xff, 0xff, 0xff, 0xff) * * Since 1.0 */ @@ -134,7 +134,7 @@ void cogl_material_set_color4ub (CoglHandle material, * Since 1.0 */ void cogl_material_set_color4f (CoglHandle material, - float red, + float red, float green, float blue, float alpha); diff --git a/clutter/cogl/common/cogl-material.c b/clutter/cogl/common/cogl-material.c index 2c7df33c8..c456cac6a 100644 --- a/clutter/cogl/common/cogl-material.c +++ b/clutter/cogl/common/cogl-material.c @@ -193,6 +193,18 @@ cogl_material_set_color4ub (CoglHandle handle, cogl_material_set_color (handle, &color); } +void +cogl_material_set_color4f (CoglHandle handle, + float red, + float green, + float blue, + float alpha) +{ + CoglColor color; + cogl_color_set_from_4f (&color, red, green, blue, alpha); + cogl_material_set_color (handle, &color); +} + void cogl_material_get_ambient (CoglHandle handle, CoglColor *ambient)