Go to the documentation of this file.    1 #ifndef OGLPLUS_GL_API_PROG_VAR_LOC_HPP 
    9 #define OGLPLUS_GL_API_PROG_VAR_LOC_HPP 
   14 namespace eagine::oglp {
 
   18 template <
identifier_t TagId>
 
   34         return _location >= 0;
 
   39     explicit constexpr 
operator bool() const noexcept {
 
   44     constexpr 
auto location() const noexcept -> int_type {
 
   48     constexpr 
auto index() const noexcept -> uint_type {
 
   50 #ifdef GL_INVALID_INDEX 
   51             return GL_INVALID_INDEX;
 
   54         return uint_type(_location);
 
   58     explicit constexpr 
operator int_type() const noexcept {
 
   65         return a._location == b._location;
 
   71         return a._location != b._location;
 
   77         return a._location < b._location;
 
   81     int_type _location{-1};
 
  174 #endif // OGLPLUS_GL_API_PROG_VAR_LOC_HPP 
 
constexpr friend auto operator!=(prog_var_location a, prog_var_location b) noexcept
Nonequality comparison (compares the location numeric value).
Definition: prog_var_loc.hpp:70
 
#define EAGINE_ID_V(NAME)
Macro for constructing instances of eagine::identifier_t.
Definition: identifier.hpp:359
 
GLint int_type
Signed integer type.
Definition: config.hpp:70
 
GLuint uint_type
Unsigned integer type.
Definition: config.hpp:73
 
auto is_active() const noexcept -> bool
Indicates if this instance wraps an active program variable.
Definition: prog_var_loc.hpp:33
 
constexpr friend auto operator<(prog_var_location a, prog_var_location b) noexcept
Less-than comparison (compares the location numeric value).
Definition: prog_var_loc.hpp:76
 
constexpr friend auto operator==(prog_var_location a, prog_var_location b) noexcept
Equality comparison (compares the location numeric value).
Definition: prog_var_loc.hpp:64
 
constexpr prog_var_location() noexcept=default
Default constructor.
 
constexpr auto location() const noexcept -> int_type
Returns the location value.
Definition: prog_var_loc.hpp:44
 
Class wrapping GL shader program variable location.
Definition: prog_var_loc.hpp:19
 
constexpr prog_var_location(int_type init) noexcept
Explicit location initialization.
Definition: prog_var_loc.hpp:29