![]() |
VR-Forces 4.7 Class Documentation
|
A convenience class to represent an OpenGL Shader Program. More...
Public Member Functions | |
| DtGlProgram (const std::string &name, const DtShaderVector &shaders) | |
| create a shader with a given name, from a list of input shaders | |
| ~DtGlProgram () | |
| destroy the shader | |
| void | bind () |
| make this shader the currently bound shader for use in OpenGL | |
| void | unbind () |
| unbind the shader and use the default program of 0 | |
| bool | isValid () const |
| A valid shader program is one that has valid shaders and they link together without error. | |
| unsigned int | id () const |
| the OpenGL id of the internal shader program | |
Static Public Member Functions | |
| static bool | createProgram (const std::string &name, const VectorUnsignedInts &shaders, unsigned int &id) |
| static API functions | |
Protected Attributes | |
| unsigned | myProgramID |
| bool | myIsValid |
| const DtShaderVector | myShaders |
Private Member Functions | |
| DtGlProgram () | |
| private default constructor | |
| DtGlProgram (const DtGlProgram &) | |
| prevent copy-construction | |
| DtGlProgram & | operator= (const DtGlProgram &) |
| prevent assignment | |
A convenience class to represent an OpenGL Shader Program.
|
private |
private default constructor
|
private |
prevent copy-construction
| makVrv::DtGlProgram::DtGlProgram | ( | const std::string & | name, |
| const DtShaderVector & | shaders | ||
| ) |
create a shader with a given name, from a list of input shaders
| makVrv::DtGlProgram::~DtGlProgram | ( | ) |
destroy the shader
|
private |
prevent assignment
|
static |
static API functions
Creates an OpenGL program from a list of OpenGL shader ids. id is the new shader program id Returns True is the creation is successful
| void makVrv::DtGlProgram::bind | ( | ) |
make this shader the currently bound shader for use in OpenGL
| void makVrv::DtGlProgram::unbind | ( | ) |
unbind the shader and use the default program of 0
| bool makVrv::DtGlProgram::isValid | ( | ) | const |
A valid shader program is one that has valid shaders and they link together without error.
|
protected |
|
protected |
|
protected |