Add generic_color::as_color_Xf

This commit is contained in:
Nikita Lisitsa 2020-10-23 17:05:02 +03:00
parent 440fa3777e
commit ea13bba49a

View file

@ -52,6 +52,16 @@ namespace psemek::gfx
return to_coloru8(c);
}
auto as_color_3f() const
{
return color_3f{c[0], c[1], c[2]};
}
auto as_color_4f() const
{
return c;
}
operator color_rgb() const
{
return as_color_rgb();
@ -64,7 +74,7 @@ namespace psemek::gfx
operator color_3f() const
{
return color_3f{c[0], c[1], c[2]};
return as_color_3f();
}
operator color_4f() const