#include <ShaderAssembler.hpp>
Definition at line 42 of file ShaderAssembler.hpp.
jop::ShaderAssembler::ShaderAssembler |
( |
| ) |
|
Default constructor.
Reads the uber shader from the resource dll
jop::ShaderAssembler::~ShaderAssembler |
( |
| ) |
|
|
override |
static void jop::ShaderAssembler::addPlugin |
( |
const std::string & |
name, |
|
|
const std::string & |
source |
|
) |
| |
|
static |
Add a single plugin.
- Parameters
-
name | Name of the plugin |
source | The source code for the plugin |
- See also
- addPlugins()
static void jop::ShaderAssembler::addPlugins |
( |
const std::string & |
source | ) |
|
|
static |
Add multiple plugins from single string.
Parses through the string and searches for plugins and adds them to memory.
Different plugins are defined as follows:
/// #plugin <PluginName>
///
/// some GLSL code...
///
/// #pluginend
///
Multiple plugins can be defined in a single source.
\param source The plugin source
\see addPlugin()
static void jop::ShaderAssembler::clearPlugins |
( |
| ) |
|
|
static |
Clear all plugins from memory.
Get a shader with the given attribute combination.
- Parameters
-
materialAttribs | The material attributes |
drawableAttribs | The drawable attributes |
- Returns
- Reference to the shader
static const ShaderMap& jop::ShaderAssembler::getShaderMap |
( |
| ) |
|
|
static |
Get the shader map.
- Returns
- Reference to the internal shader map
static void jop::ShaderAssembler::preprocess |
( |
const std::vector< const char * > & |
input, |
|
|
std::string & |
output |
|
) |
| |
|
static |
Pre-processes shaders source code and adds necessary plugins before compilation.
- Parameters
-
input | Shaders source code |
output | Preprocessed source code |
static void jop::ShaderAssembler::removePlugin |
( |
const std::string & |
name | ) |
|
|
static |
Removes plugin with given name from memory.
- Parameters
-
static void jop::ShaderAssembler::setShaderSource |
( |
const Shader::Type |
type, |
|
|
const std::string & |
source |
|
) |
| |
|
static |
Set a shader source.
This can be used to override the default über shader.
- Parameters
-
type | The shader type |
source | The shader source |
The documentation for this class was generated from the following file: