Support std::array mesh attributes

This commit is contained in:
Nikita Lisitsa 2020-08-30 08:45:11 +03:00
parent 2d6b947809
commit 30744dadeb

View file

@ -105,6 +105,16 @@ namespace psemek::gfx
static constexpr GLboolean normalized = gl::FALSE_;
};
template <typename T, std::size_t N>
struct attrib_traits<std::array<T, N>>
{
using attrib_type = std::array<T, N>;
static constexpr GLint size = N;
static constexpr GLenum type = attrib_traits<T>::type;
static constexpr GLboolean normalized = gl::FALSE_;
};
template <typename T, std::size_t N>
struct attrib_traits<geom::vector<T, N>>
{