![]() |
Base class that defines the interface for graphics shaders. More...
#include <SurgSim/Graphics/Shader.h>
Public Member Functions | |
virtual | ~Shader ()=0 |
Destructor. More... | |
virtual bool | hasVertexShader () const =0 |
Returns true if the vertex shader has been set, otherwise false. More... | |
virtual void | clearVertexShader ()=0 |
Removes the vertex shader, returning that portion of the shader program to fixed-function. More... | |
virtual bool | loadVertexShaderSource (const std::string &filePath)=0 |
Loads the vertex shader source code from a file. More... | |
virtual void | setVertexShaderSource (const std::string &source)=0 |
Set the vertex shader source code. More... | |
virtual bool | getVertexShaderSource (std::string *source) const =0 |
Gets the vertex shader source code. More... | |
virtual bool | hasGeometryShader () const =0 |
Returns true if the geometry shader has been set, otherwise false. More... | |
virtual void | clearGeometryShader ()=0 |
Removes the geometry shader, returning that portion of the shader program to fixed-function. More... | |
virtual bool | loadGeometryShaderSource (const std::string &filePath)=0 |
Loads the geometry shader source code from a file. More... | |
virtual void | setGeometryShaderSource (const std::string &source)=0 |
Set the geometry shader source code. More... | |
virtual bool | getGeometryShaderSource (std::string *source) const =0 |
Gets the geometry shader source code. More... | |
virtual bool | hasFragmentShader () const =0 |
Returns true if the fragment shader has been set, otherwise false. More... | |
virtual void | clearFragmentShader ()=0 |
Removes the fragment shader, returning that portion of the shader program to fixed-function. More... | |
virtual bool | loadFragmentShaderSource (const std::string &filePath)=0 |
Loads the fragment shader source code from a file. More... | |
virtual void | setFragmentShaderSource (const std::string &source)=0 |
Set the fragment shader source code. More... | |
virtual bool | getFragmentShaderSource (std::string *source) const =0 |
Gets the fragment shader source code. More... | |
virtual void | clear () |
Clears the entire shader, returning to fixed-function pipeline. More... | |
virtual void | setGlobalScope (bool val)=0 |
When this is set to true, this shader should be used instead of other shaders that might apply, depending on the hierarchy that is set out. More... | |
virtual bool | isGlobalScope () const =0 |
Query if this shader is of global scope. More... | |
Base class that defines the interface for graphics shaders.
Shaders are the programs executed on the GPU to render the scene geometry.
|
inlinepure virtual |
Destructor.
|
inlinevirtual |
Clears the entire shader, returning to fixed-function pipeline.
|
pure virtual |
Removes the fragment shader, returning that portion of the shader program to fixed-function.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Removes the geometry shader, returning that portion of the shader program to fixed-function.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Removes the vertex shader, returning that portion of the shader program to fixed-function.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Gets the fragment shader source code.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Gets the geometry shader source code.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Gets the vertex shader source code.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Returns true if the fragment shader has been set, otherwise false.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Returns true if the geometry shader has been set, otherwise false.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Returns true if the vertex shader has been set, otherwise false.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Query if this shader is of global scope.
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Loads the fragment shader source code from a file.
filePath | Path to file containing shader source code |
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Loads the geometry shader source code from a file.
filePath | Path to file containing shader source code |
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Loads the vertex shader source code from a file.
filePath | Path to file containing shader source code |
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Set the fragment shader source code.
source | Shader source code |
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Set the geometry shader source code.
source | Shader source code |
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
When this is set to true, this shader should be used instead of other shaders that might apply, depending on the hierarchy that is set out.
E.g if this shader is on a camera, the shaders that occur in a group attached to that camera will be overridden. This will usually be used in conjunction with
val | If true the shader should override shaders in lower levels. |
Implemented in SurgSim::Graphics::OsgShader.
|
pure virtual |
Set the vertex shader source code.
source | Shader source code |
Implemented in SurgSim::Graphics::OsgShader.