13 #ifndef OGLPLUS_NAMED_STRING_1202231207_HPP
14 #define OGLPLUS_NAMED_STRING_1202231207_HPP
16 #if OGLPLUS_DOCUMENTATION_ONLY || GL_ARB_shading_language_include
40 OGLPLUS_GLFUNC(NamedStringARB)(
47 OGLPLUS_CHECK_SIMPLE(NamedStringARB);
54 OGLPLUS_GLFUNC(GetNamedStringivARB)(
57 GL_NAMED_STRING_LENGTH_ARB,
60 OGLPLUS_CHECK_SIMPLE(GetNamedStringivARB);
63 OGLPLUS_GLFUNC(GetNamedStringARB)(
70 OGLPLUS_CHECK_SIMPLE(GetNamedStringARB);
71 return std::move(result);
78 OGLPLUS_GLFUNC(DeleteNamedStringARB)(
82 OGLPLUS_CHECK_SIMPLE(DeleteNamedStringARB);
89 OGLPLUS_GLFUNC(GetNamedStringivARB)(
92 GL_NAMED_STRING_TYPE_ARB,
95 OGLPLUS_CHECK_SIMPLE(GetNamedStringivARB);
102 GLboolean result = OGLPLUS_GLFUNC(IsNamedStringARB)(
106 OGLPLUS_CHECK_SIMPLE(IsNamedStringARB);
107 return result == GL_TRUE;
113 Set(type, _name, value);
124 : _name(std::move(tmp._name))
132 ): _name(std::move(name))
173 #endif // GL_ARB_shading_language_include
175 #endif // include guard
const Char * c_str(void) const
Returns the null-terminated c-string.
Definition: ref_tpl.hpp:200
void Set(NamedStringType type, const StrCRef &value)
Sets the value of the specified type in this NamedString.
Definition: named_string.hpp:111
NamedString(NamedString &&tmp)
Move-construction.
Definition: named_string.hpp:123
Specialization of NamedString for ShaderInclude type.
Definition: named_string.hpp:148
static void Delete(const StrCRef &name)
Deletes the value stored under name.
Definition: named_string.hpp:76
String type definition and related functions.
static NamedStringType Type(const StrCRef &name)
Gets the type of the named string stored under name.
Definition: named_string.hpp:86
ShaderInclude(String &&name, const StrCRef &value)
Create a shader include with the specified name and value.
Definition: named_string.hpp:153
~NamedString(void)
Delete this named string.
Definition: named_string.hpp:138
std::size_t size(void) const
Return the size (length) string.
Definition: ref_tpl.hpp:149
String const reference wrapper template.
Definition: ref_tpl.hpp:72
Helper macro for optional checking of availability of GL function.
static String Get(const StrCRef &name)
Gets the value stored under name.
Definition: named_string.hpp:51
void Set(const StrCRef &value)
Set a new value for this shader include.
Definition: named_string.hpp:165
::std::basic_string< GLchar > String
String class.
Definition: def.hpp:36
static bool IsA(const StrCRef &name)
Checks if name is a stored string.
Definition: named_string.hpp:100
String Get(void) const
Sets the value of this NamedString.
Definition: named_string.hpp:117
NamedString type specifier enumeration.
NamedStringType
Enumeration of named string type specifiers.
Definition: named_string_type.hpp:25
Wrapper for GL NamedStrings.
Definition: named_string.hpp:26
static void Set(NamedStringType type, const StrCRef &name, const StrCRef &value)
Store the value, of the specified type under name.
Definition: named_string.hpp:34
NamedString(NamedStringType type, String &&name, const StrCRef &value)
Store a string value of the specified type under name.
Definition: named_string.hpp:128