13 #ifndef OGLPLUS_DATA_TYPE_1107121519_HPP
14 #define OGLPLUS_DATA_TYPE_1107121519_HPP
17 #include <type_traits>
22 template <
typename GLtype>
35 #include <oglplus/enums/data_type.ipp>
38 #if !OGLPLUS_NO_ENUM_VALUE_NAMES
39 #include <oglplus/enums/data_type_names.ipp>
42 #if !OGLPLUS_ENUM_VALUE_RANGES
43 #include <oglplus/enums/data_type_range.ipp>
51 struct DataTypeCT<GLbyte>
52 :
public std::integral_constant<DataType, DataType::Byte>
56 struct DataTypeCT<GLshort>
57 :
public std::integral_constant<DataType, DataType::Short>
61 struct DataTypeCT<GLint>
62 :
public std::integral_constant<DataType, DataType::Int>
66 struct DataTypeCT<GLubyte>
67 :
public std::integral_constant<DataType, DataType::UnsignedByte>
71 struct DataTypeCT<GLushort>
72 :
public std::integral_constant<DataType, DataType::UnsignedShort>
76 struct DataTypeCT<GLuint>
77 :
public std::integral_constant<DataType, DataType::UnsignedInt>
81 struct DataTypeCT<GLfloat>
82 :
public std::integral_constant<DataType, DataType::Float>
87 struct DataTypeCT<GLdouble>
88 :
public std::integral_constant<DataType, DataType::Double>
96 return DataType(DataTypeCT<T>::value);
101 template <
typename T>
102 std::true_type _get_is_gl_data_type(
T*,
typename DataTypeCT<T>::type* =
nullptr);
103 std::false_type _get_is_gl_data_type(...);
105 template <
typename T>
106 struct _is_gl_data_type
108 typedef decltype(_get_is_gl_data_type((
T*)0)) type;
114 template <typename
T>
116 : public aux::_is_gl_data_type<
T>::type
124 #include <oglplus/enums/sl_data_type.ipp>
127 #if !OGLPLUS_NO_ENUM_VALUE_NAMES
128 #include <oglplus/enums/sl_data_type_names.ipp>
131 #if !OGLPLUS_ENUM_VALUE_RANGES
132 #include <oglplus/enums/sl_data_type_range.ipp>
137 #endif // include guard
DataType
OpenGL data type enumeration.
Definition: data_type.hpp:34
A tag template used mainly for data-type-based function overload dispatching.
Definition: data_type.hpp:23
Enumeration-related declarations.
SLDataType
OpenGL Shading Language data type enumeration.
Definition: data_type.hpp:123
DataType GetDataType(void)
Returns the DataType for the specified type T.
Definition: data_type.hpp:94