|
Developer Documentation
|
This namespace contains all the classes and functions for handling GLSL shader and program objects. More...
Classes | |
| class | ComputeShader |
| GLSL compute shader. More... | |
| class | FragmentShader |
| GLSL fragment shader. More... | |
| class | GeometryShader |
| GLSL geometry shader. More... | |
| class | Program |
| GLSL program class. More... | |
| class | Shader |
| A generic shader base class. More... | |
| class | UniformPool |
| GLSL uniform pool. More... | |
| class | VertexShader |
| GLSL vertex shader. More... | |
Typedefs | |
| typedef std::list< std::string > | StringList |
| typedef Shader * | PtrShader |
| typedef const Shader * | PtrConstShader |
| typedef VertexShader * | PtrVertexShader |
| typedef const VertexShader * | PtrVertexConstShader |
| typedef FragmentShader * | PtrFragmentShader |
| typedef const FragmentShader * | PtrConstFragmentShader |
| typedef GeometryShader * | PtrGeometryShader |
| typedef const GeometryShader * | PtrConstGeometryShader |
| typedef ComputeShader * | PtrComputeShader |
| typedef const ComputeShader * | PtrConstComputeShader |
| typedef Program * | PtrProgram |
| typedef const Program * | PtrConstProgram |
| typedef UniformPool * | PtrUniformPool |
| typedef const UniformPool * | PtrConstUniformPool |
Functions | |
| void | loadShaderRec (const char *filename, bool appendNewLineChar, std::map< QString, int > &includeMap, GLSL::StringList &shaderSource) |
| Loads the shader source and all recursive includes. | |
| GLSL::StringList | loadShader (const char *filename, const GLSL::StringList *macros, bool appendNewLineChar, GLSL::StringList *outIncludes) |
| Loads the shader source. | |
| GLSL::PtrVertexShader | loadVertexShader (const char *name, const GLSL::StringList *macros, bool verbose) |
| Loads, compiles and installs a new vertex shader. | |
| GLSL::PtrFragmentShader | loadFragmentShader (const char *name, const GLSL::StringList *macros, bool verbose) |
| Loads, compiles and installs a new vertex shader. | |
| GLSL::PtrGeometryShader | loadGeometryShader (const char *name, const GLSL::StringList *macros, bool verbose) |
| Loads, compiles and installs a new vertex shader. | |
| GLSL::PtrShader | loadTessControlShader (const char *name, const GLSL::StringList *macros, bool verbose) |
| Loads, compiles and installs a new tessellation control shader. | |
| GLSL::PtrShader | loadTessEvaluationShader (const char *name, const GLSL::StringList *macros, bool verbose) |
| Loads, compiles and installs a new tessellation evaluation shader. | |
| GLSL::PtrComputeShader | loadComputeShader (const char *name, const GLSL::StringList *macros, bool verbose) |
| Loads, compiles and installs a new compute shader. | |
| GLSL::PtrProgram | loadProgram (const char *vertexShaderFile, const char *tessControlShaderFile, const char *tessEvaluationShaderFile, const char *geometryShaderFile, const char *fragmentShaderFile, const GLSL::StringList *macros, bool verbose) |
| GLSL::PtrProgram | loadProgram (const char *vertexShaderFile, const char *geometryShaderFile, const char *fragmentShaderFile, const GLSL::StringList *macros, bool verbose) |
| GLSL::PtrProgram | loadProgram (const char *vertexShaderFile, const char *fragmentShaderFile, const GLSL::StringList *macros, bool verbose) |
| GLSL::PtrProgram | loadComputeProgram (const char *computeShaderFile, const GLSL::StringList *macros, bool verbose) |
This namespace contains all the classes and functions for handling GLSL shader and program objects.
| typedef ComputeShader* GLSL::PtrComputeShader |
Definition at line 201 of file GLSLShader.hh.
| typedef const ComputeShader* GLSL::PtrConstComputeShader |
Definition at line 202 of file GLSLShader.hh.
| typedef const FragmentShader* GLSL::PtrConstFragmentShader |
Definition at line 118 of file GLSLShader.hh.
| typedef const GeometryShader* GLSL::PtrConstGeometryShader |
Definition at line 132 of file GLSLShader.hh.
| typedef const Program* GLSL::PtrConstProgram |
Definition at line 342 of file GLSLShader.hh.
| typedef const Shader* GLSL::PtrConstShader |
Definition at line 89 of file GLSLShader.hh.
| typedef const UniformPool* GLSL::PtrConstUniformPool |
Definition at line 213 of file UniformPool.hh.
| typedef FragmentShader* GLSL::PtrFragmentShader |
Definition at line 117 of file GLSLShader.hh.
| typedef GeometryShader* GLSL::PtrGeometryShader |
Definition at line 131 of file GLSLShader.hh.
| typedef Program* GLSL::PtrProgram |
Definition at line 341 of file GLSLShader.hh.
| typedef Shader* GLSL::PtrShader |
Definition at line 88 of file GLSLShader.hh.
| typedef UniformPool* GLSL::PtrUniformPool |
Definition at line 212 of file UniformPool.hh.
| typedef const VertexShader* GLSL::PtrVertexConstShader |
Definition at line 104 of file GLSLShader.hh.
| typedef VertexShader* GLSL::PtrVertexShader |
Definition at line 103 of file GLSLShader.hh.
| typedef std::list<std::string> GLSL::StringList |
Definition at line 67 of file GLSLShader.hh.
| GLSL::PtrProgram ACGDLLEXPORT GLSL::loadComputeProgram | ( | const char * | computeShaderFile, |
| const GLSL::StringList * | macros = 0, |
||
| bool | verbose = true |
||
| ) |
load glsl compute shader and create GLSL program if successful
Shader file paths for this function are assumed to be relative to the "Shader" directory as specified in ShaderProgGenerator::getShaderDir()
Definition at line 1154 of file GLSLShader.cc.
| GLSL::PtrComputeShader ACGDLLEXPORT GLSL::loadComputeShader | ( | const char * | name, |
| const GLSL::StringList * | macros, | ||
| bool | verbose | ||
| ) |
Loads, compiles and installs a new compute shader.
Definition at line 1057 of file GLSLShader.cc.
| GLSL::PtrFragmentShader ACGDLLEXPORT GLSL::loadFragmentShader | ( | const char * | name, |
| const GLSL::StringList * | macros, | ||
| bool | verbose | ||
| ) |
Loads, compiles and installs a new vertex shader.
Definition at line 983 of file GLSLShader.cc.
| GLSL::PtrGeometryShader ACGDLLEXPORT GLSL::loadGeometryShader | ( | const char * | name, |
| const GLSL::StringList * | macros, | ||
| bool | verbose | ||
| ) |
Loads, compiles and installs a new vertex shader.
Definition at line 1000 of file GLSLShader.cc.
| GLSL::PtrProgram ACGDLLEXPORT GLSL::loadProgram | ( | const char * | vertexShaderFile, |
| const char * | fragmentShaderFile, | ||
| const GLSL::StringList * | macros = 0, |
||
| bool | verbose = true |
||
| ) |
load shaders and create GLSL program if successful
Shader file paths for this function are assumed to be relative to the "Shader" directory as specified in ShaderProgGenerator::getShaderDir()
Definition at line 1149 of file GLSLShader.cc.
| GLSL::PtrProgram ACGDLLEXPORT GLSL::loadProgram | ( | const char * | vertexShaderFile, |
| const char * | geometryShaderFile, | ||
| const char * | fragmentShaderFile, | ||
| const GLSL::StringList * | macros = 0, |
||
| bool | verbose = true |
||
| ) |
load shaders and create GLSL program if successful
Shader file paths for this function are assumed to be relative to the "Shader" directory as specified in ShaderProgGenerator::getShaderDir()
Definition at line 1143 of file GLSLShader.cc.
| GLSL::PtrProgram ACGDLLEXPORT GLSL::loadProgram | ( | const char * | vertexShaderFile, |
| const char * | tessControlShaderFile, | ||
| const char * | tessEvaluationShaderFile, | ||
| const char * | geometryShaderFile, | ||
| const char * | fragmentShaderFile, | ||
| const GLSL::StringList * | macros = 0, |
||
| bool | verbose = true |
||
| ) |
load shaders and create GLSL program if successful
Shader file paths for this function are assumed to be relative to the "Shader" directory as specified in ShaderProgGenerator::getShaderDir()
Definition at line 1076 of file GLSLShader.cc.
| GLSL::StringList ACGDLLEXPORT GLSL::loadShader | ( | const char * | filename, |
| const GLSL::StringList * | macros, | ||
| bool | appendNewLineChar, | ||
| GLSL::StringList * | outIncludes | ||
| ) |
Loads the shader source.
The shader is assumed to be placed in ../shader relative to the executable's installation directory, if the path is a relative one. If it is determined that the path is absolute, the path is taken as is. Macros are inserted directly after the #version directive. According to glsl spec, only comments and white space are allowed before #version.
| filename | filename of shader |
| macros | [in] preprocessor macros (optional) |
| appendNewLineChar | should each string in the StringList end on a ' ' |
| outIncludes | [out] additional files that were loaded to resolve #include directives. |
Definition at line 921 of file GLSLShader.cc.
| void GLSL::loadShaderRec | ( | const char * | filename, |
| bool | appendNewLineChar, | ||
| std::map< QString, int > & | includeMap, | ||
| GLSL::StringList & | shaderSource | ||
| ) |
Loads the shader source and all recursive includes.
The shader is assumed to be placed in ../shader relative to the executable's installation directory, if the path is a relativ one. If it is determined that the path is absolute, the path is taken as is. Included files via the #include directive are recursively resolved. The include-map prevents getting stuck in an include loop.
Definition at line 855 of file GLSLShader.cc.
| GLSL::PtrShader ACGDLLEXPORT GLSL::loadTessControlShader | ( | const char * | name, |
| const GLSL::StringList * | macros, | ||
| bool | verbose | ||
| ) |
Loads, compiles and installs a new tessellation control shader.
Definition at line 1018 of file GLSLShader.cc.
| GLSL::PtrShader ACGDLLEXPORT GLSL::loadTessEvaluationShader | ( | const char * | name, |
| const GLSL::StringList * | macros, | ||
| bool | verbose | ||
| ) |
Loads, compiles and installs a new tessellation evaluation shader.
Definition at line 1037 of file GLSLShader.cc.
| GLSL::PtrVertexShader ACGDLLEXPORT GLSL::loadVertexShader | ( | const char * | name, |
| const GLSL::StringList * | macros, | ||
| bool | verbose | ||
| ) |
Loads, compiles and installs a new vertex shader.
Definition at line 969 of file GLSLShader.cc.