ShaderSchema class creates ShaderDesc definitions stored in the registry.
More...
#include <ShaderSchema.h>
|
static const SchemaDescription * | find (const char *schema_name) |
| Find a SchemaDescription by schema name and optional source-type - NOT the plugin .so filename!
|
|
static Schema * | create (const char *schema_name) |
|
std::unique_ptr< ShaderSchemaHandle, void(*)(ShaderSchemaHandle *)> | _pImpl |
|
ShaderSchema class creates ShaderDesc definitions stored in the registry.
◆ ShaderSchema()
usg::ShaderSchema::ShaderSchema |
( |
const SchemaDescription & |
pluginDescription, |
|
|
const ShaderPropertyList & |
properties, |
|
|
const fdk::KeyValueMap & |
metadata = fdk::KeyValueMap() |
|
) |
| |
The shader class name is taken from the ShaderSchemaDescription::schemaName(), so the subclass must pass its ShaderSchemaDescription.
◆ baseTypeName()
const Token & usg::ShaderSchema::baseTypeName |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ asShaderSchema()
◆ asCoShader()
◆ asSurfaceShader()
◆ asLightShader()
◆ sourceCode() [1/2]
virtual const std::string & usg::ShaderSchema::sourceCode |
( |
const Token & |
sourceType | ) |
const |
|
virtual |
Return the implementation code string for a specific sourceType when the shader is the single shader in a material network. Subclass should have already declared the type in its list of supported types, so if there are multiple sources the type string should be checked.
◆ sourceCode() [2/2]
virtual void usg::ShaderSchema::sourceCode |
( |
ShaderSource & |
shaderSource | ) |
const |
|
virtual |
Creates the source code for the shader for a specific target (e.g. glslfx) using the ShaderSource generator previously created via shaderSourceGenerator(). If a ShaderSource generator was not created by the shader for the requested source type then this method is never called. Default implementation does nothing.