|
|
| 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) |
| | Add to the search path used for finding source code.
|
| |
|
void | registerSourceCodeSearchPath (const FileSearchPath &path) |
| | Add to the search path used for finding source code.
|
| |
|
FilePath | resolveSourceFile (const FilePath &filename) const |
| | Resolve a file using the registered search paths.
|
| |
|
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 | 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...
|
| |
A context class for shader generation.
Used for thread local storage of data needed during shader generation.