|
|
|
|
@ -1145,19 +1145,39 @@ template<std::size_t cols> struct SizedVectorAttribute {
|
|
|
|
|
}; |
|
|
|
|
template<> struct SizedAttribute<1, 1>: SizedVectorAttribute<1> { |
|
|
|
|
enum class Components: GLint { One = 1 }; |
|
|
|
|
constexpr static Components DefaultComponents = Components::One; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
Components DefaultComponents = Components::One; |
|
|
|
|
}; |
|
|
|
|
template<> struct SizedAttribute<1, 2>: SizedVectorAttribute<1> { |
|
|
|
|
enum class Components: GLint { One = 1, Two = 2 }; |
|
|
|
|
constexpr static Components DefaultComponents = Components::Two; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
Components DefaultComponents = Components::Two; |
|
|
|
|
}; |
|
|
|
|
template<> struct SizedAttribute<1, 3>: SizedVectorAttribute<1> { |
|
|
|
|
enum class Components: GLint { One = 1, Two = 2, Three = 3 }; |
|
|
|
|
constexpr static Components DefaultComponents = Components::Three; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
Components DefaultComponents = Components::Three; |
|
|
|
|
}; |
|
|
|
|
template<> struct SizedAttribute<1, 4>: SizedVectorAttribute<1> { |
|
|
|
|
enum class Components: GLint { One = 1, Two = 2, Three = 3, Four = 4 }; |
|
|
|
|
constexpr static Components DefaultComponents = Components::Four; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
Components DefaultComponents = Components::Four; |
|
|
|
|
}; |
|
|
|
|
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedAttribute<1, 1>::Components value); |
|
|
|
|
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedAttribute<1, 2>::Components value); |
|
|
|
|
@ -1168,15 +1188,30 @@ Debug MAGNUM_EXPORT operator<<(Debug debug, SizedAttribute<1, 4>::Components val
|
|
|
|
|
template<std::size_t rows> struct SizedMatrixAttribute; |
|
|
|
|
template<> struct SizedMatrixAttribute<2> { |
|
|
|
|
enum class Components: GLint { Two = 2 }; |
|
|
|
|
constexpr static Components DefaultComponents = Components::Two; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
Components DefaultComponents = Components::Two; |
|
|
|
|
}; |
|
|
|
|
template<> struct SizedMatrixAttribute<3> { |
|
|
|
|
enum class Components: GLint { Three = 3 }; |
|
|
|
|
constexpr static Components DefaultComponents = Components::Three; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
Components DefaultComponents = Components::Three; |
|
|
|
|
}; |
|
|
|
|
template<> struct SizedMatrixAttribute<4> { |
|
|
|
|
enum class Components: GLint { Four = 4 }; |
|
|
|
|
constexpr static Components DefaultComponents = Components::Four; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
Components DefaultComponents = Components::Four; |
|
|
|
|
}; |
|
|
|
|
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedMatrixAttribute<2>::Components value); |
|
|
|
|
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedMatrixAttribute<3>::Components value); |
|
|
|
|
@ -1219,7 +1254,12 @@ struct FloatAttribute {
|
|
|
|
|
Double = GL_DOUBLE |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
constexpr static DataType DefaultDataType = DataType::Float; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
DataType DefaultDataType = DataType::Float; |
|
|
|
|
|
|
|
|
|
enum class DataOption: UnsignedByte { |
|
|
|
|
Normalized = 1 << 0 |
|
|
|
|
@ -1246,7 +1286,12 @@ struct IntAttribute {
|
|
|
|
|
UnsignedInt = GL_UNSIGNED_INT, |
|
|
|
|
Int = GL_INT |
|
|
|
|
}; |
|
|
|
|
constexpr static DataType DefaultDataType = DataType::Int; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
DataType DefaultDataType = DataType::Int; |
|
|
|
|
|
|
|
|
|
enum class DataOption: UnsignedByte {}; |
|
|
|
|
typedef Corrade::Containers::EnumSet<DataOption, UnsignedByte> DataOptions; |
|
|
|
|
@ -1261,7 +1306,12 @@ struct UnsignedIntAttribute {
|
|
|
|
|
typedef UnsignedInt Type; |
|
|
|
|
|
|
|
|
|
typedef IntAttribute::DataType DataType; |
|
|
|
|
constexpr static DataType DefaultDataType = DataType::UnsignedInt; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
DataType DefaultDataType = DataType::UnsignedInt; |
|
|
|
|
|
|
|
|
|
typedef IntAttribute::DataOption DataOption; |
|
|
|
|
typedef Corrade::Containers::EnumSet<DataOption, UnsignedByte> DataOptions; |
|
|
|
|
@ -1280,7 +1330,12 @@ struct DoubleAttribute {
|
|
|
|
|
enum class DataType: GLenum { |
|
|
|
|
Double = GL_DOUBLE |
|
|
|
|
}; |
|
|
|
|
constexpr static DataType DefaultDataType = DataType::Double; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
DataType DefaultDataType = DataType::Double; |
|
|
|
|
|
|
|
|
|
enum class DataOption: UnsignedByte {}; |
|
|
|
|
typedef Corrade::Containers::EnumSet<DataOption, UnsignedByte> DataOptions; |
|
|
|
|
@ -1305,7 +1360,12 @@ template<> struct Attribute<Math::Vector<4, Float>> {
|
|
|
|
|
BGRA = GL_BGRA |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
constexpr static Components DefaultComponents = Components::Four; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
Components DefaultComponents = Components::Four; |
|
|
|
|
|
|
|
|
|
enum class DataType: GLenum { |
|
|
|
|
UnsignedByte = GL_UNSIGNED_BYTE, |
|
|
|
|
@ -1330,7 +1390,12 @@ template<> struct Attribute<Math::Vector<4, Float>> {
|
|
|
|
|
Int2101010Rev = GL_INT_2_10_10_10_REV |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
constexpr static DataType DefaultDataType = DataType::Float; |
|
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
constexpr static |
|
|
|
|
#else |
|
|
|
|
static const |
|
|
|
|
#endif |
|
|
|
|
DataType DefaultDataType = DataType::Float; |
|
|
|
|
|
|
|
|
|
enum class DataOption: UnsignedByte { |
|
|
|
|
Normalized = 1 << 0 |
|
|
|
|
|