Fix instanced normalized mesh attributes

This commit is contained in:
Nikita Lisitsa 2020-09-25 17:19:36 +03:00
parent f7c2d5d554
commit 44f293c023

View file

@ -154,6 +154,12 @@ namespace psemek::gfx
static constexpr GLboolean normalized = gl::FALSE_;
};
template <typename T, std::size_t R, std::size_t C>
struct attrib_traits<geom::matrix<T, R, C>>
{
using attrib_type = geom::matrix<T, R, C>;
};
template <typename T>
struct attrib_traits<normalized<T>>
{
@ -167,7 +173,7 @@ namespace psemek::gfx
template <typename T>
struct attrib_traits<instanced<T>>
{
using attrib_type = T;
using attrib_type = typename attrib_traits<T>::attrib_type;
static constexpr GLint size = attrib_traits<T>::size;
static constexpr GLenum type = attrib_traits<T>::type;