![]() |
VR-Forces 4.10 Class Documentation
|
A convenience class to represent an OpenGL Shader Program. More...
Public Member Functions | |
| DtGlProgram (const std::string &name, const DtShaderVector &shaders, bool multiview=false) | |
| create a shader with a given name, from a list of input shaders More... | |
| DtGlProgram (const std::string &name, unsigned int programId) | |
| create a container DtGlProgram This constructed object does not own the gl program More... | |
| virtual | ~DtGlProgram () |
| destroy the shader More... | |
| virtual void | bind () |
| make this shader the currently bound shader for use in OpenGL More... | |
| virtual void | unbind () |
| unbind the shader and use the default program of 0 More... | |
| virtual bool | isValid () const |
| A valid shader program is one that has valid shaders and they link together without error. More... | |
| virtual unsigned int | id () const |
| the OpenGL id of the internal shader program More... | |
| virtual int | uboSize (const std::string &name) const |
| get the size of the ubo if it exists, 0 otherwise More... | |
| virtual int | uboBinding (const std::string &name) const |
| get the binding of the ubo specified in the shader, -1 otherwise More... | |
| virtual int | uniformOffset (const std::string &uniformName) const |
| get the offset a constant within an UBO if it exists, -1 otherwise More... | |
| virtual int | uniformLocation (const std::string &uniformName) const |
| get the uniform location if it exists, -1 otherwise More... | |
| virtual const DtGlUbo * | ubo (const std::string &uboName) const |
| get UBO details by name More... | |
| virtual void | runComputeShader (unsigned int workSizeX, unsigned int workSizeY, bool bind) |
| run a compute shader. More... | |
| virtual void | runComputeShader (unsigned int workSizeX, unsigned int workSizeY, unsigned int workSizeZ, bool bind) |
| run a compute shader. More... | |
| virtual void | runComputeShader (const DtGlTexture *renderTexture, bool bind) |
| run a compute shader. More... | |
Static Public Member Functions | |
| static void | printGLSLInfoLog (unsigned int shader) |
| print info of shader or program More... | |
Protected Member Functions | |
| virtual void | introspect (void) const |
| do program introspection More... | |
| virtual bool | createProgram (const std::string &name, const VectorUnsignedInts &shaders) |
| internal More... | |
Protected Attributes | |
| unsigned | myProgramID |
| bool | myIsValid |
| bool | myMutableIntrospected |
| std::unordered_map < std::string, DtGlUbo * > | myMutableUbos |
| const bool | myOwns |
| const bool | myIsMultiview |
Private Member Functions | |
| DtGlProgram ()=delete | |
| private default constructor. not allowed More... | |
| DtGlProgram (const DtGlProgram &)=delete | |
| prevent copy-construction More... | |
| DtGlProgram & | operator= (const DtGlProgram &)=delete |
| prevent assignment More... | |
A convenience class to represent an OpenGL Shader Program.
| makVrv::DtGlProgram::DtGlProgram | ( | const std::string & | name, |
| const DtShaderVector & | shaders, | ||
| bool | multiview = false |
||
| ) |
create a shader with a given name, from a list of input shaders
create a container DtGlProgram This constructed object does not own the gl program
|
virtual |
destroy the shader
|
privatedelete |
private default constructor. not allowed
|
privatedelete |
prevent copy-construction
|
privatedelete |
prevent assignment
|
virtual |
make this shader the currently bound shader for use in OpenGL
|
virtual |
unbind the shader and use the default program of 0
|
virtual |
A valid shader program is one that has valid shaders and they link together without error.
the OpenGL id of the internal shader program
|
virtual |
get the size of the ubo if it exists, 0 otherwise
|
virtual |
get the binding of the ubo specified in the shader, -1 otherwise
|
virtual |
get the offset a constant within an UBO if it exists, -1 otherwise
|
virtual |
get the uniform location if it exists, -1 otherwise
|
virtual |
get UBO details by name
|
virtual |
run a compute shader.
workSizeX grid size in x dimension workSizeY grid size in y dimension bind whether to bind the program or not
|
virtual |
run a compute shader.
workSizeX grid size in x dimension workSizeY grid size in y dimension workSizeZ grid size in z dimension bind whether to bind the program or not
|
virtual |
run a compute shader.
renderTexture is the texture into which the compute shader will compute results to. work group size is implicit in the texture size bind whether to bind the program or not
print info of shader or program
|
protectedvirtual |
do program introspection
|
protectedvirtual |
internal
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |