mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
[cogl-material] Adds a cogl_material_set_color4f convenience function
This is simply a wrapper around cogl_color_set_from_4f and cogl_material_set_color. We already had a prototype for this, it was an oversight that it wasn't already implemented.
This commit is contained in:
parent
869a2b4167
commit
93c5769722
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user