|
|
|
|
@ -1093,24 +1093,24 @@ template<> struct Attribute<GLfloat> {
|
|
|
|
|
|
|
|
|
|
static const DataType DefaultDataType = DataType::Float; |
|
|
|
|
|
|
|
|
|
inline constexpr static GLint size(DataOptions) { return 1; } |
|
|
|
|
inline constexpr static GLint components(DataOptions) { return 1; } |
|
|
|
|
inline constexpr static std::size_t vectorCount() { return 1; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
CORRADE_ENUMSET_OPERATORS(Attribute<GLfloat>::DataOptions) |
|
|
|
|
|
|
|
|
|
template<std::size_t vectorSize> struct Attribute<Math::Vector<vectorSize, GLfloat>>: public Attribute<GLfloat> { |
|
|
|
|
inline constexpr static GLint size(DataOptions) { return vectorSize; } |
|
|
|
|
inline constexpr static GLint components(DataOptions) { return vectorSize; } |
|
|
|
|
inline constexpr static std::size_t vectorCount() { return 1; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<std::size_t cols, std::size_t rows> struct Attribute<Math::RectangularMatrix<cols, rows, GLfloat>>: public Attribute<GLfloat> { |
|
|
|
|
inline constexpr static GLint size(DataOptions) { return rows; } |
|
|
|
|
inline constexpr static GLint components(DataOptions) { return rows; } |
|
|
|
|
inline constexpr static std::size_t vectorCount() { return cols; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<std::size_t matrixSize> struct Attribute<Math::Matrix<matrixSize, GLfloat>>: public Attribute<GLfloat> { |
|
|
|
|
inline constexpr static GLint size(DataOptions) { return matrixSize; } |
|
|
|
|
inline constexpr static GLint components(DataOptions) { return matrixSize; } |
|
|
|
|
inline constexpr static std::size_t vectorCount() { return matrixSize; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
@ -1153,11 +1153,11 @@ template<> struct Attribute<Math::Vector<4, GLfloat>> {
|
|
|
|
|
static const DataType DefaultDataType = DataType::Float; |
|
|
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
inline constexpr static GLint size(DataOptions options) { |
|
|
|
|
inline constexpr static GLint components(DataOptions options) { |
|
|
|
|
return options & DataOption::BGRA ? GL_BGRA : 4; |
|
|
|
|
} |
|
|
|
|
#else |
|
|
|
|
inline constexpr static GLint size(DataOptions) { return 4; } |
|
|
|
|
inline constexpr static GLint components(DataOptions) { return 4; } |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
inline constexpr static std::size_t vectorCount() { return 1; } |
|
|
|
|
@ -1182,7 +1182,7 @@ template<> struct Attribute<GLint> {
|
|
|
|
|
|
|
|
|
|
static const DataType DefaultDataType = DataType::Int; |
|
|
|
|
|
|
|
|
|
inline constexpr static GLint size() { return 1; } |
|
|
|
|
inline constexpr static GLint components() { return 1; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<> struct Attribute<GLuint> { |
|
|
|
|
@ -1193,15 +1193,15 @@ template<> struct Attribute<GLuint> {
|
|
|
|
|
|
|
|
|
|
static const DataType DefaultDataType = DataType::UnsignedInt; |
|
|
|
|
|
|
|
|
|
inline constexpr static GLint size() { return 1; } |
|
|
|
|
inline constexpr static GLint components() { return 1; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<std::size_t size> struct Attribute<Math::Vector<size, GLint>>: public Attribute<GLint> { |
|
|
|
|
inline constexpr static GLint size() { return size; } |
|
|
|
|
inline constexpr static GLint components() { return size; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<std::size_t size> struct Attribute<Math::Vector<size, GLuint>>: public Attribute<GLuint> { |
|
|
|
|
inline constexpr static GLint size() { return size; } |
|
|
|
|
inline constexpr static GLint components() { return size; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
@ -1216,22 +1216,22 @@ template<> struct Attribute<GLdouble> {
|
|
|
|
|
|
|
|
|
|
static const DataType DefaultDataType = DataType::Double; |
|
|
|
|
|
|
|
|
|
inline constexpr static GLint size() { return 1; } |
|
|
|
|
inline constexpr static GLint components() { return 1; } |
|
|
|
|
inline constexpr static std::size_t vectorCount() { return 1; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<std::size_t cols, std::size_t rows> struct Attribute<Math::RectangularMatrix<cols, rows, GLdouble>>: public Attribute<GLdouble> { |
|
|
|
|
inline constexpr static GLint size() { return rows; } |
|
|
|
|
inline constexpr static GLint components() { return rows; } |
|
|
|
|
inline constexpr static std::size_t vectorCount() { return cols; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<std::size_t size> struct Attribute<Math::Matrix<size, GLdouble>>: public Attribute<GLdouble> { |
|
|
|
|
inline constexpr static GLint size() { return size; } |
|
|
|
|
inline constexpr static GLint components() { return size; } |
|
|
|
|
inline constexpr static std::size_t vectorCount() { return size; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<std::size_t size> struct Attribute<Math::Vector<size, GLdouble>>: public Attribute<GLdouble> { |
|
|
|
|
inline constexpr static GLint size() { return size; } |
|
|
|
|
inline constexpr static GLint components() { return size; } |
|
|
|
|
inline constexpr static std::size_t vectorCount() { return size; } |
|
|
|
|
}; |
|
|
|
|
#endif |
|
|
|
|
|