17 #ifndef _MATERIALGENERATOR_HH_
18 #define _MATERIALGENERATOR_HH_
20 #include <OgreMaterial.h>
21 #include <OgreStringVector.h>
42 public:
typedef uint32_t
Perm;
52 public:
const Ogre::MaterialPtr &GetMaterial(
Perm permutation);
61 public:
virtual ~
Impl();
62 public:
virtual Ogre::GpuProgramPtr GenerateVertexShader(
63 Perm _permutation) = 0;
64 public:
virtual Ogre::GpuProgramPtr GenerateFragmentShader(
65 Perm _permutation) = 0;
66 public:
virtual Ogre::MaterialPtr GenerateTemplateMaterial(
67 Perm permutation) = 0;
71 protected:
const Ogre::GpuProgramPtr &GetVertexShader(
Perm _perm);
72 protected:
const Ogre::GpuProgramPtr &GetFragmentShader(
Perm _perm);
73 protected:
const Ogre::MaterialPtr &GetTemplateMaterial(
Perm _perm);
92 protected:
typedef std::map<Perm, Ogre::GpuProgramPtr>
ProgramMap;
93 protected:
typedef std::map<Perm, Ogre::MaterialPtr>
MaterialMap;
Perm matMask
Mask of permutation bits that influence template material choice.
Definition: MaterialGenerator.hh:87
std::map< Perm, Ogre::MaterialPtr > MaterialMap
Definition: MaterialGenerator.hh:93
Implementation class that takes care of actual generation or lookup of the various constituent parts ...
Definition: MaterialGenerator.hh:59
Perm vsMask
Mask of permutation bits that influence vertex shader choice.
Definition: MaterialGenerator.hh:81
ProgramMap vs
Definition: MaterialGenerator.hh:95
std::string schemeName
Definition: MaterialGenerator.hh:75
MaterialMap templateMat
Definition: MaterialGenerator.hh:96
Perm fsMask
Mask of permutation bits that influence fragment shader choice.
Definition: MaterialGenerator.hh:84
Impl * impl
Generator.
Definition: MaterialGenerator.hh:90
std::map< Perm, Ogre::GpuProgramPtr > ProgramMap
Definition: MaterialGenerator.hh:92
Caching, on-the-fly material generator.
Definition: MaterialGenerator.hh:39
Ogre::String materialBaseName
Base name of materials generated by this.
Definition: MaterialGenerator.hh:78
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
uint32_t Perm
Bitfield used to signify a material permutations.
Definition: MaterialGenerator.hh:42