Support std::array mesh attributes
This commit is contained in:
parent
2d6b947809
commit
30744dadeb
1 changed files with 10 additions and 0 deletions
|
|
@ -105,6 +105,16 @@ namespace psemek::gfx
|
||||||
static constexpr GLboolean normalized = gl::FALSE_;
|
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>
|
template <typename T, std::size_t N>
|
||||||
struct attrib_traits<geom::vector<T, N>>
|
struct attrib_traits<geom::vector<T, N>>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue