Basic Renderer
|
The underlying data of a shader is generated. More...
#include <ShaderDataGenerator.h>
Inherits IShaderData.
Public Types | |
typedef std::unordered_map< std::string, std::string > | TextureMap |
typedef std::unordered_map< std::string, std::string > | CubeRelflectionMap |
typedef std::unordered_map< std::string, vmml::Vector3f > | Vector3Map |
typedef std::unordered_map< std::string, GLfloat > | ScalarMap |
Public Member Functions | |
ShaderDataGenerator () | |
Constructor. More... | |
ShaderDataGenerator (GLuint maxLights, bool ambientLighting, const MaterialData &materialData, bool variableNumberOfLights, bool isText) | |
Constructor. More... | |
ShaderDataGenerator (const ShaderGeneratorSettings &shaderGeneratorSettings) | |
Constructor. More... | |
virtual | ~ShaderDataGenerator () |
Virtual destructor. More... | |
ShaderDataGenerator & | create (const ShaderGeneratorSettings &shaderGeneratorSettings) |
Constructor. More... | |
std::string | getVertShaderSrc () const |
Gets the source code of the vertex shader as a string. More... | |
std::string | getFragShaderSrc () const |
Gets the source code of the fragment shader as a string. More... | |
GLuint | getMaxLights () const |
Get the maximum number of lights. More... | |
bool | supportsVariableNumberOfLights () const |
Returns true if the number of lights is variable in the shader. More... | |
bool | supportsAmbientLighting () const |
Returns true if the shader supports ambient lighting. More... | |
bool | supportsDiffuseLighting () const |
Returns true if the shader supports diffuse lighting. More... | |
bool | supportsSpecularLighting () const |
Returns true if the shader supports specular lighting. More... | |
bool | supportsCubicReflectionMap () const |
Returns true if the shader supports a cubic reflection map. More... | |
bool | isValid () const |
Returns true if the shader is valid. More... | |
Public Member Functions inherited from IShaderData | |
virtual | ~IShaderData () |
Virtual destructor. More... | |
The underlying data of a shader is generated.
typedef std::unordered_map<std::string, std::string> ShaderDataGenerator::CubeRelflectionMap |
typedef std::unordered_map<std::string, GLfloat> ShaderDataGenerator::ScalarMap |
typedef std::unordered_map<std::string, std::string> ShaderDataGenerator::TextureMap |
typedef std::unordered_map<std::string, vmml::Vector3f> ShaderDataGenerator::Vector3Map |
ShaderDataGenerator::ShaderDataGenerator | ( | ) |
Constructor.
ShaderDataGenerator::ShaderDataGenerator | ( | GLuint | maxLights, |
bool | ambientLighting, | ||
const MaterialData & | materialData, | ||
bool | variableNumberOfLights, | ||
bool | isText | ||
) |
Constructor.
[in] | maxLights | The maximum number of light sources to be used |
[in] | ambientLighting | Set true if the shader should support ambient lighting |
[in] | materialData | All necessary information for the shader is read from the material data |
[in] | variableNumberOfLights | Set true if the number of lights may vary, otherwise the number of lights has to be the same as specified as maximum number of lights |
[in] | isText | Set true if the shader should be used for displaying text |
ShaderDataGenerator::ShaderDataGenerator | ( | const ShaderGeneratorSettings & | shaderGeneratorSettings | ) |
Constructor.
[in] | shaderGeneratorSettings | The settings defining the abilities the generated shader should have |
|
inlinevirtual |
Virtual destructor.
ShaderDataGenerator & ShaderDataGenerator::create | ( | const ShaderGeneratorSettings & | shaderGeneratorSettings | ) |
Constructor.
[in] | shaderGeneratorSettings | The settings defining the abilities the generated shader should have |
|
inlinevirtual |
Gets the source code of the fragment shader as a string.
Implements IShaderData.
|
inlinevirtual |
Get the maximum number of lights.
Implements IShaderData.
|
inlinevirtual |
Gets the source code of the vertex shader as a string.
Implements IShaderData.
|
inlinevirtual |
Returns true if the shader is valid.
Implements IShaderData.
|
inlinevirtual |
Returns true if the shader supports ambient lighting.
Implements IShaderData.
|
inlinevirtual |
Returns true if the shader supports a cubic reflection map.
Implements IShaderData.
|
inlinevirtual |
Returns true if the shader supports diffuse lighting.
Implements IShaderData.
|
inlinevirtual |
Returns true if the shader supports specular lighting.
Implements IShaderData.
|
inlinevirtual |
Returns true if the number of lights is variable in the shader.
Implements IShaderData.