13 #ifndef OGLPLUS_PROGRAM_RESOURCE_1208301144_HPP
14 #define OGLPLUS_PROGRAM_RESOURCE_1208301144_HPP
20 #include <oglplus/detail/program.hpp>
24 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_3
61 OGLPLUS_GLFUNC(GetProgramResourceiv)(
72 GLint GetParam(GLenum property)
const
75 QueryParams(property, 1,
nullptr, &res);
84 bool HasProp(GLenum property)
const
87 QueryParams(GLenum(property), 1,
nullptr, &res);
88 return OGLPLUS_GLFUNC(GetError)() == GL_NO_ERROR;
92 aux::ProgramInterfaceContext& context,
103 return GetParam(GLenum(property));
113 return GetParam(GLenum(property)) == GL_TRUE;
123 return HasProp(GLenum(property));
151 return HasProp(GL_TYPE);
173 return GetParam(GL_LOCATION);
184 return GetParam(GL_LOCATION_INDEX);
195 return GetParam(GL_ARRAY_SIZE);
198 GLenum ReferencedByProperty(
ShaderType type)
const;
213 return GetParam(ReferencedByProperty(shader_type)) == GL_TRUE;
224 return GetParam(GL_IS_PER_PATCH) == GL_TRUE;
230 #endif // GL_VERSION_4_3
234 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
235 #include <oglplus/program_resource.ipp>
236 #endif // OGLPLUS_LINK_LIBRARY
238 #endif // include guard
ShaderType
The type of a Shader.
Definition: shader_type.hpp:26
Information about a single active program resource.
Definition: program_resource.hpp:46
ProgramInterface Interface(void) const
Returns the interface of the resource.
Definition: program_resource.hpp:127
bool HasType(void) const
Returns true if the resource has a type.
Definition: program_resource.hpp:149
bool IsPerPatch(void) const
Returns true if the resource is per-patch (if applicable)
Definition: program_resource.hpp:222
SLDataType Type(void) const
Returns the data type of the resource (if applicable)
Definition: program_resource.hpp:160
GLint GetIntParam(ProgramResourceProperty property) const
Gets the value of a single property (as an GLint)
Definition: program_resource.hpp:101
Declaration of OGLplus object-related error.
bool GetBoolParam(ProgramResourceProperty property) const
Gets the value of a single property (as a boolean value)
Definition: program_resource.hpp:111
bool ReferencedBy(ShaderType shader_type) const
Returns true if the resource is_referenced by shader (if applicable)
Definition: program_resource.hpp:211
GLint LocationIndex(void) const
Returns the program resource location index (if applicable)
Definition: program_resource.hpp:182
GLint ArraySize(void) const
Returns the array size of the resource (if applicable)
Definition: program_resource.hpp:193
ProgramInterface
Program interface enumeration.
Definition: program_interface.hpp:33
GLuint Index(void) const
Returns the index of the resource.
Definition: program_resource.hpp:143
OpenGL program interface enumeration.
Data type-related declarations.
const String & Name(void) const
Returns the name of the resource.
Definition: program_resource.hpp:137
::std::basic_string< GLchar > String
String class.
Definition: def.hpp:36
Exception class for general OpenGL errors.
Definition: basic.hpp:43
GLint Location(void) const
Returns the program resource location (if applicable)
Definition: program_resource.hpp:171
SLDataType
OpenGL Shading Language data type enumeration.
Definition: data_type.hpp:123
bool Has(ProgramResourceProperty property) const
Checks if this resource has the specified property.
Definition: program_resource.hpp:121
ProgramResourceProperty
Program resource property enumeration.
Definition: program_interface.hpp:55