From 44f293c0239e211f006618f90ee13fb52e277263 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Fri, 25 Sep 2020 17:19:36 +0300 Subject: [PATCH] Fix instanced normalized mesh attributes --- libs/gfx/include/psemek/gfx/mesh.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/gfx/include/psemek/gfx/mesh.hpp b/libs/gfx/include/psemek/gfx/mesh.hpp index 13a7af77..8cd44622 100644 --- a/libs/gfx/include/psemek/gfx/mesh.hpp +++ b/libs/gfx/include/psemek/gfx/mesh.hpp @@ -154,6 +154,12 @@ namespace psemek::gfx static constexpr GLboolean normalized = gl::FALSE_; }; + template + struct attrib_traits> + { + using attrib_type = geom::matrix; + }; + template struct attrib_traits> { @@ -167,7 +173,7 @@ namespace psemek::gfx template struct attrib_traits> { - using attrib_type = T; + using attrib_type = typename attrib_traits::attrib_type; static constexpr GLint size = attrib_traits::size; static constexpr GLenum type = attrib_traits::type;