Developer Documentation
ACG::SceneGraph::ACG::ShaderProgGenerator Class Reference

Public Member Functions

 ShaderProgGenerator (const ShaderGenDesc *_desc)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< unsigned int > &_modifierIDs)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< unsigned int > *_modifierIDs)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const unsigned int *_modifierIDs, unsigned int _numModifiers)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, ShaderModifier *const *_modifiers, unsigned int _numModifiers)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< ShaderModifier * > &_modifiers)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< ShaderModifier * > *_modifiers)
 
void saveVertexShToFile (const char *_fileName)
 
void saveGeometryShToFile (const char *_fileName)
 
void saveFragmentShToFile (const char *_fileName)
 
const QStringList & getVertexShaderCode ()
 Returns generated vertex shader code.
 
const QStringList & getTessControlShaderCode ()
 Returns generated vertex shader code.
 
const QStringList & getTessEvaluationShaderCode ()
 Returns generated tessellation control shader code.
 
const QStringList & getGeometryShaderCode ()
 Returns generated tessellation evaluation shader code.
 
const QStringList & getFragmentShaderCode ()
 Returns generated fragment shader code.
 
int getNumActiveModifiers () const
 Get the number of active modifiers.
 
ShaderModifiergetActiveModifier (int _i)
 Get active modfiers for this program.
 
bool hasGeometryShader () const
 check whether there is a geometry shader present
 
bool hasTessControlShader () const
 check whether there is a tess-control shader present
 
bool hasTessEvaluationShader () const
 check whether there is a tess-evaluation shader present
 
void generateShaders ()
 Generates the shader code.
 
 ShaderProgGenerator (const ShaderGenDesc *_desc)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< unsigned int > &_modifierIDs)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< unsigned int > *_modifierIDs)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const unsigned int *_modifierIDs, unsigned int _numModifiers)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, ShaderModifier *const *_modifiers, unsigned int _numModifiers)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< ShaderModifier * > &_modifiers)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< ShaderModifier * > *_modifiers)
 
void saveVertexShToFile (const char *_fileName)
 
void saveGeometryShToFile (const char *_fileName)
 
void saveFragmentShToFile (const char *_fileName)
 
const QStringList & getVertexShaderCode ()
 Returns generated vertex shader code.
 
const QStringList & getTessControlShaderCode ()
 Returns generated vertex shader code.
 
const QStringList & getTessEvaluationShaderCode ()
 Returns generated tessellation control shader code.
 
const QStringList & getGeometryShaderCode ()
 Returns generated tessellation evaluation shader code.
 
const QStringList & getFragmentShaderCode ()
 Returns generated fragment shader code.
 
int getNumActiveModifiers () const
 Get the number of active modifiers.
 
ShaderModifiergetActiveModifier (int _i)
 Get active modfiers for this program.
 
bool hasGeometryShader () const
 check whether there is a geometry shader present
 
bool hasTessControlShader () const
 check whether there is a tess-control shader present
 
bool hasTessEvaluationShader () const
 check whether there is a tess-evaluation shader present
 
void generateShaders ()
 Generates the shader code.
 
 ShaderProgGenerator (const ShaderGenDesc *_desc)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< unsigned int > &_modifierIDs)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< unsigned int > *_modifierIDs)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const unsigned int *_modifierIDs, unsigned int _numModifiers)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, ShaderModifier *const *_modifiers, unsigned int _numModifiers)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< ShaderModifier * > &_modifiers)
 
 ShaderProgGenerator (const ShaderGenDesc *_desc, const std::vector< ShaderModifier * > *_modifiers)
 
void saveVertexShToFile (const char *_fileName)
 
void saveGeometryShToFile (const char *_fileName)
 
void saveFragmentShToFile (const char *_fileName)
 
const QStringList & getVertexShaderCode ()
 Returns generated vertex shader code.
 
const QStringList & getTessControlShaderCode ()
 Returns generated vertex shader code.
 
const QStringList & getTessEvaluationShaderCode ()
 Returns generated tessellation control shader code.
 
const QStringList & getGeometryShaderCode ()
 Returns generated tessellation evaluation shader code.
 
const QStringList & getFragmentShaderCode ()
 Returns generated fragment shader code.
 
int getNumActiveModifiers () const
 Get the number of active modifiers.
 
ShaderModifiergetActiveModifier (int _i)
 Get active modfiers for this program.
 
bool hasGeometryShader () const
 check whether there is a geometry shader present
 
bool hasTessControlShader () const
 check whether there is a tess-control shader present
 
bool hasTessEvaluationShader () const
 check whether there is a tess-evaluation shader present
 
void generateShaders ()
 Generates the shader code.
 

Static Public Member Functions

static void setShaderDir (QString _dir)
 
static QString getShaderDir ()
 
static unsigned int registerModifier (ShaderModifier *_modifier)
 Shader modifiers have to be registered before they can be used. They also must remain allocated for the rest of the applications runtime. Use a combination of modifier-IDs in the constructor of ShaderProgGen to active them. More...
 
static bool loadStringListFromFile (QString _fileName, QStringList *_out)
 Load a text file as string list. More...
 
static QString getAbsFilePath (QString _fileName)
 Convert a filename to an absolute filename. More...
 
static void setShaderDir (QString _dir)
 
static QString getShaderDir ()
 
static unsigned int registerModifier (ShaderModifier *_modifier)
 Shader modifiers have to be registered before they can be used. They also must remain allocated for the rest of the applications runtime. Use a combination of modifier-IDs in the constructor of ShaderProgGen to active them. More...
 
static bool loadStringListFromFile (QString _fileName, QStringList *_out)
 Load a text file as string list. More...
 
static QString getAbsFilePath (QString _fileName)
 Convert a filename to an absolute filename. More...
 
static void setShaderDir (QString _dir)
 
static QString getShaderDir ()
 
static unsigned int registerModifier (ShaderModifier *_modifier)
 Shader modifiers have to be registered before they can be used. They also must remain allocated for the rest of the applications runtime. Use a combination of modifier-IDs in the constructor of ShaderProgGen to active them. More...
 
static bool loadStringListFromFile (QString _fileName, QStringList *_out)
 Load a text file as string list. More...
 
static QString getAbsFilePath (QString _fileName)
 Convert a filename to an absolute filename. More...
 

Private Member Functions

void loadShaderTemplateFromFile ()
 Loads external shader templates.
 
void scanShaderTemplate (QStringList &_templateSrc, QString _templateFilename, QStringList *_outLayoutDirectives=0)
 Scans loaded shader template for requested inputs, glsl version or includes.
 
void init (const ShaderGenDesc *_desc, ShaderModifier *const *_modifiers, unsigned int _numActiveMods)
 Called in constructor.
 
void init (const ShaderGenDesc *_desc, const unsigned int *_modifiers, unsigned int _numActiveMods)
 
void buildVertexShader ()
 
void buildTessControlShader ()
 
void buildTessEvalShader ()
 
void buildGeometryShader ()
 
void buildFragmentShader ()
 
void addVertexBeginCode (QStringList *_code)
 
void addVertexEndCode (QStringList *_code)
 
void addFragmentBeginCode (QStringList *_code)
 
void addFragmentEndCode (QStringList *_code)
 
void addLightingFunctions (QStringList *_code)
 Adds lighting definition functions. More...
 
void addLightingCode (QStringList *_code)
 Adds lighting function calls to code.
 
void modifyLightingCode (QStringList *_code, ShaderModifier *_modifier)
 Calls lighting modifier for each light.
 
void addTexGenCode (QStringList *_code, bool _fragmentShader)
 Add texture coordinate generation code.
 
int checkForIncludes (QString _str, ShaderGenerator *_gen, QString _includePath)
 
int checkForIncludes (QString _str, QStringList *_outImport, QString _includePath)
 
void initGenDefines (ShaderGenerator *_gen)
 provide generated defines to shader
 
void loadShaderTemplateFromFile ()
 Loads external shader templates.
 
void scanShaderTemplate (QStringList &_templateSrc, QString _templateFilename, QStringList *_outLayoutDirectives=0)
 Scans loaded shader template for requested inputs, glsl version or includes.
 
void init (const ShaderGenDesc *_desc, ShaderModifier *const *_modifiers, unsigned int _numActiveMods)
 Called in constructor.
 
void init (const ShaderGenDesc *_desc, const unsigned int *_modifiers, unsigned int _numActiveMods)
 
void buildVertexShader ()
 
void buildTessControlShader ()
 
void buildTessEvalShader ()
 
void buildGeometryShader ()
 
void buildFragmentShader ()
 
void addVertexBeginCode (QStringList *_code)
 
void addVertexEndCode (QStringList *_code)
 
void addFragmentBeginCode (QStringList *_code)
 
void addFragmentEndCode (QStringList *_code)
 
void addLightingFunctions (QStringList *_code)
 Adds lighting definition functions. More...
 
void addLightingCode (QStringList *_code)
 Adds lighting function calls to code.
 
void modifyLightingCode (QStringList *_code, ShaderModifier *_modifier)
 Calls lighting modifier for each light.
 
void addTexGenCode (QStringList *_code, bool _fragmentShader)
 Add texture coordinate generation code.
 
int checkForIncludes (QString _str, ShaderGenerator *_gen, QString _includePath)
 
int checkForIncludes (QString _str, QStringList *_outImport, QString _includePath)
 
void initGenDefines (ShaderGenerator *_gen)
 provide generated defines to shader
 
void loadShaderTemplateFromFile ()
 Loads external shader templates.
 
void scanShaderTemplate (QStringList &_templateSrc, QString _templateFilename, QStringList *_outLayoutDirectives=0)
 Scans loaded shader template for requested inputs, glsl version or includes.
 
void init (const ShaderGenDesc *_desc, ShaderModifier *const *_modifiers, unsigned int _numActiveMods)
 Called in constructor.
 
void init (const ShaderGenDesc *_desc, const unsigned int *_modifiers, unsigned int _numActiveMods)
 
void buildVertexShader ()
 
void buildTessControlShader ()
 
void buildTessEvalShader ()
 
void buildGeometryShader ()
 
void buildFragmentShader ()
 
void addVertexBeginCode (QStringList *_code)
 
void addVertexEndCode (QStringList *_code)
 
void addFragmentBeginCode (QStringList *_code)
 
void addFragmentEndCode (QStringList *_code)
 
void addLightingFunctions (QStringList *_code)
 Adds lighting definition functions. More...
 
void addLightingCode (QStringList *_code)
 Adds lighting function calls to code.
 
void modifyLightingCode (QStringList *_code, ShaderModifier *_modifier)
 Calls lighting modifier for each light.
 
void addTexGenCode (QStringList *_code, bool _fragmentShader)
 Add texture coordinate generation code.
 
int checkForIncludes (QString _str, ShaderGenerator *_gen, QString _includePath)
 
int checkForIncludes (QString _str, QStringList *_outImport, QString _includePath)
 
void initGenDefines (ShaderGenerator *_gen)
 provide generated defines to shader
 

Static Private Member Functions

static QString getPathName (QString _strFileName)
 returns path to _strFileName without last slash
 
static void loadLightingFunctions ()
 
static QString getPathName (QString _strFileName)
 returns path to _strFileName without last slash
 
static void loadLightingFunctions ()
 
static QString getPathName (QString _strFileName)
 returns path to _strFileName without last slash
 
static void loadLightingFunctions ()
 

Private Attributes

ShaderGeneratorvertex_
 
ShaderGeneratortessControl_
 
ShaderGeneratortessEval_
 
ShaderGeneratorgeometry_
 
ShaderGeneratorfragment_
 
QStringList vertexTemplate_
 
QStringList tessControlTemplate_
 
QStringList tessEvalTemplate_
 
QStringList geometryTemplate_
 
QStringList fragmentTemplate_
 
ShaderGenDesc desc_
 
std::vector< ShaderModifier * > activeMods_
 
QString vertexShaderFile_
 path + filename to shader templates
 
QString tessControlShaderFile_
 
QString tessEvalShaderFile_
 
QString geometryShaderFile_
 
QString fragmentShaderFile_
 
QStringList tessControlLayout_
 layout() directives scanned from loaded templates
 
QStringList tessEvalLayout_
 
ShaderGenerator::DefaultIODesc ioDesc_
 default IO descriptor for the vertex shader
 
bool renormalizeLighting_
 renormalize before lighting, default false, can be activated via "#define SG_REQUEST_RENORMALIZE"
 

Static Private Attributes

static int numRegisteredModifiers_
 registered shader modifier
 
static std::vector< ShaderModifier * > registeredModifiers_
 
static QString shaderDir_
 
static QStringList lightingCode_
 

Detailed Description

ShaderProgGenerator is responsible for generating a matching pair of vertex and fragment shaders.

Definition at line 1158 of file MeshNode2T.cc.

Constructor & Destructor Documentation

ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc)
Parameters
_descdescription-set of shader properties.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< unsigned int > &  _modifierIDs 
)
Parameters
_descdescription-set of shader properties.
_modifierIDsarray of modifier-IDs that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< unsigned int > *  _modifierIDs 
)
Parameters
_descdescription-set of shader properties.
_modifierIDsarray of modifier-IDs that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const unsigned int *  _modifierIDs,
unsigned int  _numModifiers 
)
Parameters
_descdescription-set of shader properties.
_modifierIDsarray of modifier-IDs that should be used for the generation.
_numModifiersnumber of modifiers in _modifierIDs
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
ShaderModifier *const *  _modifiers,
unsigned int  _numModifiers 
)
Parameters
_descdescription-set of shader properties.
_modifiersarray of modifiers that should be used for the generation.
_numModifiersnumber of modifiers in _modifierIDs
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< ShaderModifier * > &  _modifiers 
)
Parameters
_descdescription-set of shader properties.
_modifiersarray of modifiers that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< ShaderModifier * > *  _modifiers 
)
Parameters
_descdescription-set of shader properties.
_modifiersarray of modifiers that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc)
Parameters
_descdescription-set of shader properties.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< unsigned int > &  _modifierIDs 
)
Parameters
_descdescription-set of shader properties.
_modifierIDsarray of modifier-IDs that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< unsigned int > *  _modifierIDs 
)
Parameters
_descdescription-set of shader properties.
_modifierIDsarray of modifier-IDs that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const unsigned int *  _modifierIDs,
unsigned int  _numModifiers 
)
Parameters
_descdescription-set of shader properties.
_modifierIDsarray of modifier-IDs that should be used for the generation.
_numModifiersnumber of modifiers in _modifierIDs
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
ShaderModifier *const *  _modifiers,
unsigned int  _numModifiers 
)
Parameters
_descdescription-set of shader properties.
_modifiersarray of modifiers that should be used for the generation.
_numModifiersnumber of modifiers in _modifierIDs
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< ShaderModifier * > &  _modifiers 
)
Parameters
_descdescription-set of shader properties.
_modifiersarray of modifiers that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< ShaderModifier * > *  _modifiers 
)
Parameters
_descdescription-set of shader properties.
_modifiersarray of modifiers that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc)
Parameters
_descdescription-set of shader properties.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< unsigned int > &  _modifierIDs 
)
Parameters
_descdescription-set of shader properties.
_modifierIDsarray of modifier-IDs that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< unsigned int > *  _modifierIDs 
)
Parameters
_descdescription-set of shader properties.
_modifierIDsarray of modifier-IDs that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const unsigned int *  _modifierIDs,
unsigned int  _numModifiers 
)
Parameters
_descdescription-set of shader properties.
_modifierIDsarray of modifier-IDs that should be used for the generation.
_numModifiersnumber of modifiers in _modifierIDs
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
ShaderModifier *const *  _modifiers,
unsigned int  _numModifiers 
)
Parameters
_descdescription-set of shader properties.
_modifiersarray of modifiers that should be used for the generation.
_numModifiersnumber of modifiers in _modifierIDs
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< ShaderModifier * > &  _modifiers 
)
Parameters
_descdescription-set of shader properties.
_modifiersarray of modifiers that should be used for the generation.
ACG::SceneGraph::ACG::ShaderProgGenerator::ShaderProgGenerator ( const ShaderGenDesc _desc,
const std::vector< ShaderModifier * > *  _modifiers 
)
Parameters
_descdescription-set of shader properties.
_modifiersarray of modifiers that should be used for the generation.

Member Function Documentation

void ACG::SceneGraph::ACG::ShaderProgGenerator::addLightingFunctions ( QStringList *  _code)
private

Adds lighting definition functions.

LitPointLight() ...

void ACG::SceneGraph::ACG::ShaderProgGenerator::addLightingFunctions ( QStringList *  _code)
private

Adds lighting definition functions.

LitPointLight() ...

void ACG::SceneGraph::ACG::ShaderProgGenerator::addLightingFunctions ( QStringList *  _code)
private

Adds lighting definition functions.

LitPointLight() ...

int ACG::SceneGraph::ACG::ShaderProgGenerator::checkForIncludes ( QString  _str,
ShaderGenerator _gen,
QString  _includePath 
)
private

checks if _str is an include directive eventually imports the included file to the specified generator

int ACG::SceneGraph::ACG::ShaderProgGenerator::checkForIncludes ( QString  _str,
ShaderGenerator _gen,
QString  _includePath 
)
private

checks if _str is an include directive eventually imports the included file to the specified generator

int ACG::SceneGraph::ACG::ShaderProgGenerator::checkForIncludes ( QString  _str,
ShaderGenerator _gen,
QString  _includePath 
)
private

checks if _str is an include directive eventually imports the included file to the specified generator

int ACG::SceneGraph::ACG::ShaderProgGenerator::checkForIncludes ( QString  _str,
QStringList *  _outImport,
QString  _includePath 
)
private

checks if _str is an include directive eventually imports the included file to the specified stringlist

int ACG::SceneGraph::ACG::ShaderProgGenerator::checkForIncludes ( QString  _str,
QStringList *  _outImport,
QString  _includePath 
)
private

checks if _str is an include directive eventually imports the included file to the specified stringlist

int ACG::SceneGraph::ACG::ShaderProgGenerator::checkForIncludes ( QString  _str,
QStringList *  _outImport,
QString  _includePath 
)
private

checks if _str is an include directive eventually imports the included file to the specified stringlist

static QString ACG::SceneGraph::ACG::ShaderProgGenerator::getAbsFilePath ( QString  _fileName)
static

Convert a filename to an absolute filename.

Parameters
_fileNamerelative (from shader dir) or absolute file name
static QString ACG::SceneGraph::ACG::ShaderProgGenerator::getAbsFilePath ( QString  _fileName)
static

Convert a filename to an absolute filename.

Parameters
_fileNamerelative (from shader dir) or absolute file name
static QString ACG::SceneGraph::ACG::ShaderProgGenerator::getAbsFilePath ( QString  _fileName)
static

Convert a filename to an absolute filename.

Parameters
_fileNamerelative (from shader dir) or absolute file name
static QString ACG::SceneGraph::ACG::ShaderProgGenerator::getShaderDir ( )
static

Return shader directory path as previosly specified by user

static QString ACG::SceneGraph::ACG::ShaderProgGenerator::getShaderDir ( )
static

Return shader directory path as previosly specified by user

static QString ACG::SceneGraph::ACG::ShaderProgGenerator::getShaderDir ( )
static

Return shader directory path as previosly specified by user

static bool ACG::SceneGraph::ACG::ShaderProgGenerator::loadStringListFromFile ( QString  _fileName,
QStringList *  _out 
)
static

Load a text file as string list.

Parameters
_fileNamerelative (from shader dir) or absolute file name
_outlines from text file
Returns
true on success, false otherwise
static bool ACG::SceneGraph::ACG::ShaderProgGenerator::loadStringListFromFile ( QString  _fileName,
QStringList *  _out 
)
static

Load a text file as string list.

Parameters
_fileNamerelative (from shader dir) or absolute file name
_outlines from text file
Returns
true on success, false otherwise
static bool ACG::SceneGraph::ACG::ShaderProgGenerator::loadStringListFromFile ( QString  _fileName,
QStringList *  _out 
)
static

Load a text file as string list.

Parameters
_fileNamerelative (from shader dir) or absolute file name
_outlines from text file
Returns
true on success, false otherwise
static unsigned int ACG::SceneGraph::ACG::ShaderProgGenerator::registerModifier ( ShaderModifier _modifier)
static

Shader modifiers have to be registered before they can be used. They also must remain allocated for the rest of the applications runtime. Use a combination of modifier-IDs in the constructor of ShaderProgGen to active them.

Parameters
_modifieraddress of a modifier implementation
Returns
modifier ID
static unsigned int ACG::SceneGraph::ACG::ShaderProgGenerator::registerModifier ( ShaderModifier _modifier)
static

Shader modifiers have to be registered before they can be used. They also must remain allocated for the rest of the applications runtime. Use a combination of modifier-IDs in the constructor of ShaderProgGen to active them.

Parameters
_modifieraddress of a modifier implementation
Returns
modifier ID
static unsigned int ACG::SceneGraph::ACG::ShaderProgGenerator::registerModifier ( ShaderModifier _modifier)
static

Shader modifiers have to be registered before they can be used. They also must remain allocated for the rest of the applications runtime. Use a combination of modifier-IDs in the constructor of ShaderProgGen to active them.

Parameters
_modifieraddress of a modifier implementation
Returns
modifier ID
static void ACG::SceneGraph::ACG::ShaderProgGenerator::setShaderDir ( QString  _dir)
static

The shader directory has to be defined first before making use of the generator! For example: setShaderDir(OpenFlipper::Options::shaderDirStr())

static void ACG::SceneGraph::ACG::ShaderProgGenerator::setShaderDir ( QString  _dir)
static

The shader directory has to be defined first before making use of the generator! For example: setShaderDir(OpenFlipper::Options::shaderDirStr())

static void ACG::SceneGraph::ACG::ShaderProgGenerator::setShaderDir ( QString  _dir)
static

The shader directory has to be defined first before making use of the generator! For example: setShaderDir(OpenFlipper::Options::shaderDirStr())


The documentation for this class was generated from the following file: