From afe623ba793f9f4c51f94abe6464020d22387c9d Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 6 Apr 2017 16:16:59 +0100 Subject: Improved files --- include/YAGE/vertex.hpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include/YAGE/vertex.hpp') 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; -- cgit