forked from organicmaps/organicmaps-tmp
added conversion from colorf to vec4
This commit is contained in:
parent
b8aa11c60d
commit
9e24a2868e
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../geometry/point2d.hpp"
|
||||
#include "../../drape/color.hpp"
|
||||
|
||||
namespace glsl_types
|
||||
{
|
||||
|
@ -80,6 +81,9 @@ struct vec4
|
|||
vec4(float X, float Y = 0.0f, float Z = 0.0f, float W = 0.0f)
|
||||
: x(X), y(Y), z(Z), w(W) {}
|
||||
|
||||
vec4(dp::ColorF const & clr)
|
||||
: x(clr.m_r), y(clr.m_g), z(clr.m_b), w(clr.m_a) {}
|
||||
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
|
|
Loading…
Add table
Reference in a new issue