forked from organicmaps/organicmaps
remove self writed stuff for glsl types support
This commit is contained in:
parent
3090f06984
commit
7287f1391f
3 changed files with 0 additions and 135 deletions
|
@ -1,114 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "../geometry/point2d.hpp"
|
||||
#include "../../drape/color.hpp"
|
||||
|
||||
namespace glsl_types
|
||||
{
|
||||
|
||||
struct vec2
|
||||
{
|
||||
vec2() {}
|
||||
vec2(m2::PointF const & p)
|
||||
: x(p.x), y(p.y) {}
|
||||
|
||||
vec2(float X, float Y = 0.0f)
|
||||
: x(X), y(Y) {}
|
||||
|
||||
vec2 const & operator = (vec2 const & p);
|
||||
vec2 const & operator = (m2::PointF const & p);
|
||||
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
struct vec3
|
||||
{
|
||||
vec3() {}
|
||||
vec3(m2::PointF const & p, float Z)
|
||||
: x(p.x), y(p.y), z(Z) {}
|
||||
|
||||
vec3(float X, m2::PointF const & p)
|
||||
: x(X), y(p.x), z(p.y) {}
|
||||
|
||||
vec3(vec2 const & p, float Z)
|
||||
: x(p.x), y(p.y), z(Z) {}
|
||||
|
||||
vec3(float X, vec2 const & p)
|
||||
: x(X), y(p.x), z(p.y) {}
|
||||
|
||||
vec3(float X, float Y = 0.0f, float Z = 0.0f)
|
||||
: x(X), y(Y), z(Z) {}
|
||||
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
|
||||
struct vec4
|
||||
{
|
||||
vec4() {}
|
||||
vec4(m2::PointF const & p, m2::PointF const & t)
|
||||
: x(p.x), y(p.y), z(t.x), w(t.y) {}
|
||||
|
||||
vec4(m2::PointF const & p, float Z, float W)
|
||||
: x(p.x), y(p.y), z(Z), w(W) {}
|
||||
|
||||
vec4(float X, m2::PointF const & p, float W)
|
||||
: x(X), y(p.x), z(p.y), w(W) {}
|
||||
|
||||
vec4(float X, float Y, m2::PointF const & p)
|
||||
: x(X), y(Y), z(p.x), w(p.y) {}
|
||||
|
||||
vec4(vec2 const & p, vec2 const & t)
|
||||
: x(p.x), y(p.y), z(t.x), w(t.y) {}
|
||||
|
||||
vec4(vec2 const & p, float Z, float W)
|
||||
: x(p.x), y(p.y), z(Z), w(W) {}
|
||||
|
||||
vec4(float X, vec2 const & p, float W)
|
||||
: x(X), y(p.x), z(p.y), w(W) {}
|
||||
|
||||
vec4(float X, float Y, vec2 const & p)
|
||||
: x(X), y(Y), z(p.x), w(p.y) {}
|
||||
|
||||
vec4(float X, vec3 const & p)
|
||||
: x(X), y(p.x), z(p.y), w(p.z) {}
|
||||
|
||||
vec4(vec3 const & p, float W)
|
||||
: x(p.x), y(p.y), z(p.z), w(W) {}
|
||||
|
||||
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;
|
||||
float w;
|
||||
};
|
||||
|
||||
template <typename TVertex>
|
||||
struct Quad
|
||||
{
|
||||
Quad() {}
|
||||
Quad(TVertex const & v0, TVertex const & v1,
|
||||
TVertex const & v2, TVertex const & v3)
|
||||
{
|
||||
v[0] = v0;
|
||||
v[1] = v1;
|
||||
v[2] = v2;
|
||||
v[3] = v3;
|
||||
}
|
||||
|
||||
TVertex v[4];
|
||||
};
|
||||
|
||||
typedef Quad<float> Quad1;
|
||||
typedef Quad<vec2> Quad2;
|
||||
typedef Quad<vec3> Quad3;
|
||||
typedef Quad<vec4> Quad4;
|
||||
|
||||
}
|
|
@ -71,7 +71,6 @@ HEADERS += \
|
|||
text_shape.hpp \
|
||||
path_text_shape.hpp \
|
||||
path_symbol_shape.hpp \
|
||||
common_structures.hpp \
|
||||
fribidi.hpp \
|
||||
text_layout.hpp \
|
||||
intrusive_vector.hpp \
|
||||
|
|
|
@ -14,26 +14,6 @@ namespace dp
|
|||
namespace df
|
||||
{
|
||||
|
||||
/// Utils
|
||||
struct Point3D
|
||||
{
|
||||
float m_x;
|
||||
float m_y;
|
||||
float m_z;
|
||||
|
||||
Point3D(float x, float y, float z)
|
||||
: m_x(x)
|
||||
, m_y(y)
|
||||
, m_z(z)
|
||||
{}
|
||||
|
||||
static Point3D From2D(m2::PointF const & src, float thirdComponent = 0)
|
||||
{
|
||||
return Point3D(src.x, src.y, thirdComponent);
|
||||
}
|
||||
};
|
||||
///
|
||||
|
||||
class MapShape
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Reference in a new issue