#include
<oglplus/limited_value.hpp>
LimitedCount
is a base class storing limited implementation-dependent
numeric values. It checks if the given numeric value is in the implementation-dependent
range of allowed values and throws an LimitError
exception if it is not.
Note | |
---|---|
Do not use this templates directly, use the derived types or the typedefs of instantiations instead. |
template <GLenum Query> class LimitedCount { public: template <typename Type> explicit operator Type(void) const; friend bool operator == (LimitedCount a, LimitedCount b); friend bool operator != (LimitedCount a, LimitedCount b); friend bool operator <= (LimitedCount a, LimitedCount b); friend bool operator < (LimitedCount a, LimitedCount b); friend bool operator >= (LimitedCount a, LimitedCount b); friend bool operator > (LimitedCount a, LimitedCount b); }; template <GLenum Query> GLuint LimitedCountMax(const LimitedCount<Query>& lim_count);
Explicit conversion of the internally stored value to a value of the
specified numeric |
|
Returns the maximum for the specified limited value type. |
Texture::Active(0); TextureUnitSelector tex_unit = 2; Texture::Active(tex_unit); Texture::Active(std::numeric_limits<GLuint>::max());
Implicit conversion of numeric value to TextureUnitSelector (derived from LimitedCount). |
|
Very probably will throw LimitError. |