OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
material.hpp
Go to the documentation of this file.
1 #ifndef COMPONENTS_TERRAIN_MATERIAL_H
2 #define COMPONENTS_TERRAIN_MATERIAL_H
3 
4 #include <osg/StateSet>
5 
6 #include "defs.hpp"
7 
8 namespace osg
9 {
10  class Texture2D;
11 }
12 
13 namespace Shader
14 {
15  class ShaderManager;
16 }
17 
18 namespace Terrain
19 {
20 
21  struct TextureLayer
22  {
23  osg::ref_ptr<osg::Texture2D> mDiffuseMap;
24  osg::ref_ptr<osg::Texture2D> mNormalMap; // optional
25  bool mParallax;
26  bool mSpecular;
27  };
28 
29  std::vector<osg::ref_ptr<osg::StateSet> > createPasses(bool useShaders, bool forcePerPixelLighting, bool clampLighting, Shader::ShaderManager* shaderManager,
30  const std::vector<TextureLayer>& layers,
31  const std::vector<osg::ref_ptr<osg::Texture2D> >& blendmaps, int blendmapScale, float layerTileSize);
32 
33 }
34 
35 #endif
bool mParallax
Definition: material.hpp:25
bool mSpecular
Definition: material.hpp:26
osg::ref_ptr< osg::Texture2D > mDiffuseMap
Definition: material.hpp:23
std::vector< osg::ref_ptr< osg::StateSet > > createPasses(bool useShaders, bool forcePerPixelLighting, bool clampLighting, Shader::ShaderManager *shaderManager, const std::vector< TextureLayer > &layers, const std::vector< osg::ref_ptr< osg::Texture2D > > &blendmaps, int blendmapScale, float layerTileSize)
Definition: material.cpp:159
Definition: material.hpp:21
Reads shader template files and turns them into a concrete shader, based on a list of define's...
Definition: shadermanager.hpp:18
osg::ref_ptr< osg::Texture2D > mNormalMap
Definition: material.hpp:24