OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::ProgramResource Class Reference

Information about a single active program resource. More...

#include </home/chochlik/devel/oglplus/include/oglplus/program_resource.hpp>

Public Member Functions

GLint GetIntParam (ProgramResourceProperty property) const
 Gets the value of a single property (as an GLint) More...
 
bool GetBoolParam (ProgramResourceProperty property) const
 Gets the value of a single property (as a boolean value) More...
 
bool Has (ProgramResourceProperty property) const
 Checks if this resource has the specified property. More...
 
ProgramInterface Interface (void) const
 Returns the interface of the resource.
 
const StringName (void) const
 Returns the name of the resource. More...
 
GLuint Index (void) const
 Returns the index of the resource.
 
bool HasType (void) const
 Returns true if the resource has a type.
 
SLDataType Type (void) const
 Returns the data type of the resource (if applicable) More...
 
GLint Location (void) const
 Returns the program resource location (if applicable) More...
 
GLint LocationIndex (void) const
 Returns the program resource location index (if applicable) More...
 
GLint ArraySize (void) const
 Returns the array size of the resource (if applicable) More...
 
bool ReferencedBy (ShaderType shader_type) const
 Returns true if the resource is_referenced by shader (if applicable) More...
 
bool IsPerPatch (void) const
 Returns true if the resource is per-patch (if applicable) More...
 

Detailed Description

Information about a single active program resource.

See Also
Program
Program::ActiveResources()
ProgramInterface
Program prog;
...
ProgramInterface intf = ProgramInterface::ProgramInput;
for(auto range=prog.ActiveResources(intf); !range.Empty(); range.Next())
{
auto res = range.Front();
std::cout << res.Name() << std::endl;
std::cout << EnumValueName(res.Type()) << std::endl;
if(res.IsPerPatch())
std::cout << "Per-patch" << std::endl;
else std::cout << "Not per-patch << std::endl;
}

Member Function Documentation

GLint oglplus::ProgramResource::ArraySize ( void  ) const

Returns the array size of the resource (if applicable)

Related OpenGL symbols:
glGetProgramResource GL_ARRAY_SIZE
bool oglplus::ProgramResource::GetBoolParam ( ProgramResourceProperty  property) const

Gets the value of a single property (as a boolean value)

Related OpenGL symbols:
glGetProgramResource
GLint oglplus::ProgramResource::GetIntParam ( ProgramResourceProperty  property) const

Gets the value of a single property (as an GLint)

Related OpenGL symbols:
glGetProgramResource
bool oglplus::ProgramResource::Has ( ProgramResourceProperty  property) const

Checks if this resource has the specified property.

Related OpenGL symbols:
glGetProgramResource
bool oglplus::ProgramResource::IsPerPatch ( void  ) const

Returns true if the resource is per-patch (if applicable)

Related OpenGL symbols:
glGetProgramResource GL_IS_PER_PATCH
GLint oglplus::ProgramResource::Location ( void  ) const

Returns the program resource location (if applicable)

Related OpenGL symbols:
glGetProgramResource GL_LOCATION
GLint oglplus::ProgramResource::LocationIndex ( void  ) const

Returns the program resource location index (if applicable)

Related OpenGL symbols:
glGetProgramResource GL_LOCATION_INDEX
const String& oglplus::ProgramResource::Name ( void  ) const

Returns the name of the resource.

Related OpenGL symbols:
glGetProgramResourceName
bool oglplus::ProgramResource::ReferencedBy ( ShaderType  shader_type) const

Returns true if the resource is_referenced by shader (if applicable)

Related OpenGL symbols:
glGetProgramResource GL_REFERENCED_BY_VERTEX_SHADER GL_REFERENCED_BY_TESS_CONTROL_SHADER GL_REFERENCED_BY_TESS_EVALUATION_SHADER GL_REFERENCED_BY_GEOMETRY_SHADER GL_REFERENCED_BY_FRAGMENT_SHADER GL_REFERENCED_BY_CONTROL_SHADER
SLDataType oglplus::ProgramResource::Type ( void  ) const

Returns the data type of the resource (if applicable)

Related OpenGL symbols:
glGetProgramResource GL_TYPE

The documentation for this class was generated from the following file:

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).