From 05cffcdc73bf1e62e1db1fe00568d800de1cfca6 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Sat, 13 Mar 2021 14:30:22 +0300 Subject: [PATCH] Support quaternion attribs --- libs/gfx/include/psemek/gfx/attribs.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libs/gfx/include/psemek/gfx/attribs.hpp b/libs/gfx/include/psemek/gfx/attribs.hpp index 2b4e2210..895cc3e3 100644 --- a/libs/gfx/include/psemek/gfx/attribs.hpp +++ b/libs/gfx/include/psemek/gfx/attribs.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -202,6 +203,16 @@ namespace psemek::gfx using attrib_type = geom::matrix; }; + template + struct attrib_traits> + { + using attrib_type = geom::quaternion; + + static constexpr GLint size = 4; + static constexpr GLenum type = attrib_traits::type; + static constexpr GLboolean normalized = gl::FALSE; + }; + template struct attrib_traits> {