1 #ifndef OPENMW_COMPONENTS_SHADERVISITOR_H
2 #define OPENMW_COMPONENTS_SHADERVISITOR_H
4 #include <osg/NodeVisitor>
48 virtual void apply(osg::Node& node);
50 virtual void apply(osg::Drawable& drawable);
51 virtual void apply(osg::Geometry& geometry);
53 void applyStateSet(osg::ref_ptr<osg::StateSet> stateset, osg::Node& node);
int mVertexColorMode
Definition: shadervisitor.hpp:86
void setNormalHeightMapPattern(const std::string &pattern)
Definition: shadervisitor.cpp:390
std::string mDefaultFsTemplate
Definition: shadervisitor.hpp:96
void setNormalMapPattern(const std::string &pattern)
Definition: shadervisitor.cpp:385
void setForceShaders(bool force)
Definition: shadervisitor.cpp:55
void pushRequirements()
Definition: shadervisitor.cpp:239
void createProgram(const ShaderRequirements &reqs, osg::Node &node)
Definition: shadervisitor.cpp:249
bool mAutoUseNormalMaps
Definition: shadervisitor.hpp:64
bool mForcePerPixelLighting
Definition: shadervisitor.hpp:61
void applyStateSet(osg::ref_ptr< osg::StateSet > stateset, osg::Node &node)
Definition: shadervisitor.cpp:102
std::string mNormalMapPattern
Definition: shadervisitor.hpp:65
std::vector< ShaderRequirements > mRequirements
Definition: shadervisitor.hpp:93
bool mForceShaders
Definition: shadervisitor.hpp:59
std::map< int, std::string > mTextures
Definition: shadervisitor.hpp:80
void setForcePerPixelLighting(bool force)
Definition: shadervisitor.cpp:65
bool mColorMaterial
Definition: shadervisitor.hpp:84
void setAllowedToModifyStateSets(bool allowed)
Definition: shadervisitor.cpp:375
virtual void apply(osg::Node &node)
Definition: shadervisitor.cpp:70
Adjusts the given subgraph to render using shaders.
Definition: shadervisitor.hpp:17
ShaderVisitor(ShaderManager &shaderManager, Resource::ImageManager &imageManager, const std::string &defaultVsTemplate, const std::string &defaultFsTemplate)
Definition: shadervisitor.cpp:39
bool mShaderRequired
Definition: shadervisitor.hpp:82
void setClampLighting(bool clamp)
Set whether lighting is clamped for visual compatibility with the fixed function pipeline.
Definition: shadervisitor.cpp:60
ShaderRequirements()
Definition: shadervisitor.cpp:24
Handles loading/caching of Images.
Definition: imagemanager.hpp:23
~ShaderRequirements()
Definition: shadervisitor.cpp:34
bool mNormalHeight
Definition: shadervisitor.hpp:88
Resource::ImageManager & mImageManager
Definition: shadervisitor.hpp:72
Definition: shadervisitor.hpp:74
void setAutoUseSpecularMaps(bool use)
Definition: shadervisitor.cpp:395
void popRequirements()
Definition: shadervisitor.cpp:244
std::string mSpecularMapPattern
Definition: shadervisitor.hpp:69
std::string mNormalHeightMapPattern
Definition: shadervisitor.hpp:66
void setSpecularMapPattern(const std::string &pattern)
Definition: shadervisitor.cpp:400
int mTexStageRequiringTangents
Definition: shadervisitor.hpp:91
Reads shader template files and turns them into a concrete shader, based on a list of define's...
Definition: shadermanager.hpp:18
std::string mDefaultVsTemplate
Definition: shadervisitor.hpp:95
bool mClampLighting
Definition: shadervisitor.hpp:60
bool mMaterialOverridden
Definition: shadervisitor.hpp:87
ShaderManager & mShaderManager
Definition: shadervisitor.hpp:71
void setAutoUseNormalMaps(bool use)
Automatically use normal maps if a file with suitable name exists (see normal map pattern)...
Definition: shadervisitor.cpp:380
bool mAllowedToModifyStateSets
Definition: shadervisitor.hpp:62
bool mAutoUseSpecularMaps
Definition: shadervisitor.hpp:68