|
Coin3D is Free Software, published under the BSD 3-clause license. |
https://bitbucket.org/Coin3D/ http://www.kongsberg.com/kogt/ |
The SoShaderGenerator class is used for simplifying the process of generating shader scripts. More...
#include </misc/SoShaderGenerator.h>
Public Member Functions | |
| SoShaderGenerator (void) | |
| ~SoShaderGenerator () | |
| void | reset (const SbBool freeoldstrings) |
| void | setVersion (const SbString &str) |
| void | addDefine (const SbString &str, const SbBool checkexists) |
| void | addDeclaration (const SbString &str, const SbBool checkexists) |
| void | addFunction (const SbString &str, const SbBool checkexists) |
| void | addNamedFunction (const SbName &name, const SbBool checkexists) |
| void | addMainStatement (const SbString &str) |
| const SbString & | getShaderProgram (void) |
The SoShaderGenerator class is used for simplifying the process of generating shader scripts.
Currently only GLSL scripts are supported.
| SoShaderGenerator::SoShaderGenerator | ( | void | ) |
Constructor.
| SoShaderGenerator::~SoShaderGenerator | ( | ) |
Destructor.
| void SoShaderGenerator::addDefine | ( | const SbString & | str, |
| const SbBool | checkexists | ||
| ) |
Adds a define to the shader program.
| void SoShaderGenerator::addDeclaration | ( | const SbString & | str, |
| const SbBool | checkexists | ||
| ) |
Adds a declaration (varying or uniform) to the script.
| void SoShaderGenerator::addFunction | ( | const SbString & | str, |
| const SbBool | checkexists | ||
| ) |
Adds a function to the script.
| void SoShaderGenerator::addNamedFunction | ( | const SbName & | name, |
| const SbBool | checkexists | ||
| ) |
Adds a named function to the script.
| void SoShaderGenerator::addMainStatement | ( | const SbString & | str | ) |
Add a statment to the main function.
| const SbString & SoShaderGenerator::getShaderProgram | ( | void | ) |
Returns the complete shader program.