Adjusts the given subgraph to render using shaders.
More...
#include <shadervisitor.hpp>
Adjusts the given subgraph to render using shaders.
Shader::ShaderVisitor::ShaderVisitor |
( |
ShaderManager & |
shaderManager, |
|
|
Resource::ImageManager & |
imageManager, |
|
|
const std::string & |
defaultVsTemplate, |
|
|
const std::string & |
defaultFsTemplate |
|
) |
| |
void Shader::ShaderVisitor::apply |
( |
osg::Node & |
node | ) |
|
|
virtual |
void Shader::ShaderVisitor::apply |
( |
osg::Drawable & |
drawable | ) |
|
|
virtual |
void Shader::ShaderVisitor::apply |
( |
osg::Geometry & |
geometry | ) |
|
|
virtual |
void Shader::ShaderVisitor::applyStateSet |
( |
osg::ref_ptr< osg::StateSet > |
stateset, |
|
|
osg::Node & |
node |
|
) |
| |
void Shader::ShaderVisitor::createProgram |
( |
const ShaderRequirements & |
reqs, |
|
|
osg::Node & |
node |
|
) |
| |
|
private |
void Shader::ShaderVisitor::popRequirements |
( |
| ) |
|
void Shader::ShaderVisitor::pushRequirements |
( |
| ) |
|
void Shader::ShaderVisitor::setAllowedToModifyStateSets |
( |
bool |
allowed | ) |
|
Set if we are allowed to modify StateSets encountered in the graph (default true).
- If set to false, then instead of modifying, the StateSet will be cloned and this new StateSet will be assigned to the node.
- This option is useful when the ShaderVisitor is run on a "live" subgraph that may have already been submitted for rendering.
void Shader::ShaderVisitor::setAutoUseNormalMaps |
( |
bool |
use | ) |
|
Automatically use normal maps if a file with suitable name exists (see normal map pattern).
void Shader::ShaderVisitor::setAutoUseSpecularMaps |
( |
bool |
use | ) |
|
void Shader::ShaderVisitor::setClampLighting |
( |
bool |
clamp | ) |
|
Set whether lighting is clamped for visual compatibility with the fixed function pipeline.
void Shader::ShaderVisitor::setForcePerPixelLighting |
( |
bool |
force | ) |
|
By default, only bump mapped objects use per-pixel lighting. Setting force = true will cause all shaders to use per-pixel lighting, regardless of having a bump map.
void Shader::ShaderVisitor::setForceShaders |
( |
bool |
force | ) |
|
By default, only bump mapped objects will have a shader added to them. Setting force = true will cause all objects to render using shaders, regardless of having a bump map.
void Shader::ShaderVisitor::setNormalHeightMapPattern |
( |
const std::string & |
pattern | ) |
|
void Shader::ShaderVisitor::setNormalMapPattern |
( |
const std::string & |
pattern | ) |
|
void Shader::ShaderVisitor::setSpecularMapPattern |
( |
const std::string & |
pattern | ) |
|
bool Shader::ShaderVisitor::mAllowedToModifyStateSets |
|
private |
bool Shader::ShaderVisitor::mAutoUseNormalMaps |
|
private |
bool Shader::ShaderVisitor::mAutoUseSpecularMaps |
|
private |
bool Shader::ShaderVisitor::mClampLighting |
|
private |
std::string Shader::ShaderVisitor::mDefaultFsTemplate |
|
private |
std::string Shader::ShaderVisitor::mDefaultVsTemplate |
|
private |
bool Shader::ShaderVisitor::mForcePerPixelLighting |
|
private |
bool Shader::ShaderVisitor::mForceShaders |
|
private |
std::string Shader::ShaderVisitor::mNormalHeightMapPattern |
|
private |
std::string Shader::ShaderVisitor::mNormalMapPattern |
|
private |
std::string Shader::ShaderVisitor::mSpecularMapPattern |
|
private |
The documentation for this class was generated from the following files: