Support quaternion attribs
This commit is contained in:
parent
9baa91b7e3
commit
05cffcdc73
1 changed files with 11 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
#include <psemek/geom/vector.hpp>
|
#include <psemek/geom/vector.hpp>
|
||||||
#include <psemek/geom/point.hpp>
|
#include <psemek/geom/point.hpp>
|
||||||
#include <psemek/geom/matrix.hpp>
|
#include <psemek/geom/matrix.hpp>
|
||||||
|
#include <psemek/geom/quaternion.hpp>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
@ -202,6 +203,16 @@ namespace psemek::gfx
|
||||||
using attrib_type = geom::matrix<T, R, C>;
|
using attrib_type = geom::matrix<T, R, C>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct attrib_traits<geom::quaternion<T>>
|
||||||
|
{
|
||||||
|
using attrib_type = geom::quaternion<T>;
|
||||||
|
|
||||||
|
static constexpr GLint size = 4;
|
||||||
|
static constexpr GLenum type = attrib_traits<T>::type;
|
||||||
|
static constexpr GLboolean normalized = gl::FALSE;
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct attrib_traits<normalized<T>>
|
struct attrib_traits<normalized<T>>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue