|
| GenContext (ShaderGeneratorPtr sg) |
| Constructor.
|
|
ShaderGenerator & | getShaderGenerator () |
| Return shader generatior.
|
|
GenOptions & | getOptions () |
| Return shader generation options.
|
|
const GenOptions & | getOptions () const |
| Return shader generation options.
|
|
void | registerSourceCodeSearchPath (const FilePath &path) |
| Register a user search path for finding source code during code generation.
|
|
void | registerSourceCodeSearchPath (const FileSearchPath &path) |
| Register a user search path for finding source code during code generation.
|
|
FilePath | resolveSourceFile (const FilePath &filename, const FilePath &localPath) const |
| Resolve a source code filename, first checking the given local path then checking any file paths registered by the user.
|
|
void | addReservedWords (const StringSet &names) |
| Add reserved words that should not be used as identifiers during code generation.
|
|
const StringSet & | getReservedWords () const |
| Return the set of reserved words that should not be used as identifiers during code generation.
|
|
void | addNodeImplementation (const string &name, ShaderNodeImplPtr impl) |
| Cache a shader node implementation.
|
|
ShaderNodeImplPtr | findNodeImplementation (const string &name) const |
| Find and return a cached shader node implementation, or return nullptr if no implementation is found.
|
|
void | getNodeImplementationNames (StringSet &names) |
| Get the names of all cached node implementations.
|
|
void | clearNodeImplementations () |
| Clear all cached shader node implementation.
|
|
void | pushClosureContext (ClosureContext *cct) |
| Push a new closure context to use for closure evaluation.
|
|
void | popClosureContext () |
| Pop the current closure context.
|
|
ClosureContext * | getClosureContext () |
| Return the current closure context.
|
|
void | pushParentNode (ConstNodePtr node) |
| Push a parent node onto the stack.
|
|
void | popParentNode () |
| Pop the current parent node from the stack.
|
|
const vector< ConstNodePtr > & | getParentNodes () |
| Return the current stack of parent nodes.
|
|
void | pushUserData (const string &name, GenUserDataPtr data) |
| Add user data to the context to make it available during shader generator.
|
|
void | popUserData (const string &name) |
| Remove user data from the context.
|
|
void | clearUserData () |
| Clear all user data from the context.
|
|
template<class T > |
std::shared_ptr< T > | getUserData (const string &name) |
| Return user data with given name, or nullptr if no data is found.
|
|
void | addInputSuffix (const ShaderInput *input, const string &suffix) |
| Add an input suffix to be used for the input in this context. More...
|
|
void | removeInputSuffix (const ShaderInput *input) |
| Remove an input suffix to be used for the input in this context. More...
|
|
void | getInputSuffix (const ShaderInput *input, string &suffix) const |
| Get an input suffix to be used for the input in this context. More...
|
|
void | addOutputSuffix (const ShaderOutput *output, const string &suffix) |
| Add an output suffix to be used for the output in this context. More...
|
|
void | removeOutputSuffix (const ShaderOutput *output) |
| Remove an output suffix to be used for the output in this context. More...
|
|
void | getOutputSuffix (const ShaderOutput *output, string &suffix) const |
| Get an output suffix to be used for the output in this context. More...
|
|
void | setApplicationVariableHandler (ApplicationVariableHandler handler) |
| Set handler for application variables.
|
|
ApplicationVariableHandler | getApplicationVariableHandler () const |
| Get handler for application variables.
|
|
A context class for shader generation.
Used for thread local storage of data needed during shader generation.