Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ACG::SceneGraph::GLSL Namespace Reference

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 ShaderPtrShader
 
typedef const ShaderPtrConstShader
 
typedef VertexShaderPtrVertexShader
 
typedef const VertexShaderPtrVertexConstShader
 
typedef FragmentShaderPtrFragmentShader
 
typedef const FragmentShaderPtrConstFragmentShader
 
typedef GeometryShaderPtrGeometryShader
 
typedef const GeometryShaderPtrConstGeometryShader
 
typedef ComputeShaderPtrComputeShader
 
typedef const ComputeShaderPtrConstComputeShader
 
typedef ProgramPtrProgram
 
typedef const ProgramPtrConstProgram
 
typedef UniformPoolPtrUniformPool
 
typedef const UniformPoolPtrConstUniformPool
 

Functions

GLSL::StringList ACGDLLEXPORT loadShader (const char *filename, const GLSL::StringList *macros=0, bool appendNewLineChar=true, GLSL::StringList *outIncludes=0)
 Loads the shader source. More...
 
GLSL::PtrVertexShader ACGDLLEXPORT loadVertexShader (const char *name, const GLSL::StringList *macros=0, bool verbose=true)
 Loads, compiles and installs a new vertex shader.
 
GLSL::PtrFragmentShader
ACGDLLEXPORT 
loadFragmentShader (const char *name, const GLSL::StringList *macros=0, bool verbose=true)
 Loads, compiles and installs a new vertex shader.
 
GLSL::PtrGeometryShader
ACGDLLEXPORT 
loadGeometryShader (const char *name, const GLSL::StringList *macros=0, bool verbose=true)
 Loads, compiles and installs a new vertex shader.
 
GLSL::PtrShader ACGDLLEXPORT loadTessControlShader (const char *name, const GLSL::StringList *macros=0, bool verbose=true)
 Loads, compiles and installs a new tessellation control shader.
 
GLSL::PtrShader ACGDLLEXPORT loadTessEvaluationShader (const char *name, const GLSL::StringList *macros=0, bool verbose=true)
 Loads, compiles and installs a new tessellation evaluation shader.
 
GLSL::PtrComputeShader ACGDLLEXPORT loadComputeShader (const char *name, const GLSL::StringList *macros=0, bool verbose=true)
 Loads, compiles and installs a new compute shader.
 
GLSL::PtrProgram ACGDLLEXPORT loadProgram (const char *vertexShaderFile, const char *fragmentShaderFile, const GLSL::StringList *macros=0, bool verbose=true)
 
GLSL::PtrProgram ACGDLLEXPORT loadProgram (const char *vertexShaderFile, const char *geometryShaderFile, const char *fragmentShaderFile, const GLSL::StringList *macros=0, bool verbose=true)
 
GLSL::PtrProgram ACGDLLEXPORT loadProgram (const char *vertexShaderFile, const char *tessControlShaderFile, const char *tessEvaluationShaderFile, const char *geometryShaderFile, const char *fragmentShaderFile, const GLSL::StringList *macros=0, bool verbose=true)
 
GLSL::PtrProgram ACGDLLEXPORT loadComputeProgram (const char *computeShaderFile, const GLSL::StringList *macros=0, bool verbose=true)
 

Detailed Description

This namespace contains all the classes and functions for handling GLSL shader and program objects.

Function Documentation

GLSL::PtrProgram ACGDLLEXPORT ACG::SceneGraph::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 1160 of file GLSLShader.cc.

GLSL::PtrProgram ACGDLLEXPORT ACG::SceneGraph::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 1155 of file GLSLShader.cc.

GLSL::PtrProgram ACGDLLEXPORT ACG::SceneGraph::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 1149 of file GLSLShader.cc.

GLSL::PtrProgram ACGDLLEXPORT ACG::SceneGraph::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 1082 of file GLSLShader.cc.

GLSL::StringList ACGDLLEXPORT ACG::SceneGraph::GLSL::loadShader ( const char *  filename,
const GLSL::StringList *  macros = 0,
bool  appendNewLineChar = true,
GLSL::StringList *  outIncludes = 0 
)

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.

Parameters
filenamefilename of shader
macros[in] preprocessor macros (optional)
appendNewLineCharshould each string in the StringList end on a '
'
outIncludes[out] additional files that were loaded to resolve #include directives.

Definition at line 927 of file GLSLShader.cc.