summaryrefslogtreecommitdiff
path: root/gfx/models/vertex.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-02-24 19:29:27 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-02-24 19:29:27 +0000
commit2c6257a4460de7b0c75723aebf96cf265e078530 (patch)
treef1abacfc6f64b5718a7ef6398001655f0103bf04 /gfx/models/vertex.hpp
parentFixed up vector operator+ element (diff)
downloadilt-2c6257a4460de7b0c75723aebf96cf265e078530.tar.bz2
ilt-2c6257a4460de7b0c75723aebf96cf265e078530.tar.xz
ilt-2c6257a4460de7b0c75723aebf96cf265e078530.zip
Support for model colours mixed with textures
Diffstat (limited to 'gfx/models/vertex.hpp')
-rw-r--r--gfx/models/vertex.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/gfx/models/vertex.hpp b/gfx/models/vertex.hpp
index 095c82f..325aab1 100644
--- a/gfx/models/vertex.hpp
+++ b/gfx/models/vertex.hpp
@@ -4,12 +4,13 @@
class Vertex {
public:
- constexpr Vertex(glm::vec3 pos, glm::vec2 texCoord, glm::vec3 normal) :
- pos {std::move(pos)}, texCoord {std::move(texCoord)}, normal {std::move(normal)}
+ constexpr Vertex(glm::vec3 pos, glm::vec2 texCoord, glm::vec3 normal, glm::vec4 colour = {}) :
+ pos {std::move(pos)}, texCoord {std::move(texCoord)}, normal {std::move(normal)}, colour {std::move(colour)}
{
}
glm::vec3 pos;
glm::vec2 texCoord;
glm::vec3 normal;
+ glm::vec4 colour;
};