diff options
Diffstat (limited to 'include/YAGE/vertex.hpp')
-rw-r--r-- | include/YAGE/vertex.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/YAGE/vertex.hpp b/include/YAGE/vertex.hpp index 5826aeee..bbf8a7d3 100644 --- a/include/YAGE/vertex.hpp +++ b/include/YAGE/vertex.hpp @@ -10,6 +10,13 @@ struct Position { float x; float y; + + Position() + {} + + Position(float x_, float y_) : + x(x_), y(y_) + {} }; struct Color @@ -18,12 +25,26 @@ struct Color GLubyte g; GLubyte b; GLubyte a; + + Color() + {} + + Color(GLubyte r_, GLubyte g_, GLubyte b_, GLubyte a_) : + r(r_), g(g_), b(b_), a(a_) + {} }; struct UV { float u; float v; + + UV() + {} + + UV(float u_, float v_) : + u(u_), v(v_) + {} }; struct Vertex @@ -32,6 +53,13 @@ struct Vertex Color color; UV uv; + Vertex() + {} + + Vertex(const Position &position_, const Color &color_, const UV &uv_) : + position(position_), color(color_), uv(uv_) + {} + void setPosition(float x, float y) { position.x = x; |