|
|
| GenContext (ShaderGeneratorPtr sg) |
| | Constructor.
|
| |
|
ShaderGenerator & | getShaderGenerator () |
| | Return shader generatior.
|
| |
|
GenOptions & | getOptions () |
| | Return shader generation options.
|
| |
|
const GenOptions & | getOptions () const |
| | Return shader generation options.
|
| |
|
TypeDesc | getTypeDesc (const string &name) const |
| | Return a TypeDesc for the given type name.
|
| |
|
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 | 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.
|
| |
| void | removeInputSuffix (const ShaderInput *input) |
| | Remove an input suffix to be used for the input in this context.
|
| |
| void | getInputSuffix (const ShaderInput *input, string &suffix) const |
| | Get an input suffix to be used for the input in this context.
|
| |
| void | addOutputSuffix (const ShaderOutput *output, const string &suffix) |
| | Add an output suffix to be used for the output in this context.
|
| |
| void | removeOutputSuffix (const ShaderOutput *output) |
| | Remove an output suffix to be used for the output in this context.
|
| |
| void | getOutputSuffix (const ShaderOutput *output, string &suffix) const |
| | Get an output suffix to be used for the output in this context.
|
| |
|
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.