OpenMW
|
#include <material.hpp>
Public Member Functions | |
MaterialGenerator (bool shaders) | |
void | setLayerList (const std::vector< LayerInfo > &layerList) |
bool | hasLayers () |
void | setBlendmapList (const std::vector< Ogre::TexturePtr > &blendmapList) |
const std::vector < Ogre::TexturePtr > & | getBlendmapList () |
void | setCompositeMap (const std::string &name) |
void | enableShadows (bool shadows) |
void | enableNormalMapping (bool normalMapping) |
void | enableParallaxMapping (bool parallaxMapping) |
void | enableSplitShadows (bool splitShadows) |
Ogre::MaterialPtr | generate (Ogre::MaterialPtr mat) |
Ogre::MaterialPtr | generateForCompositeMap (Ogre::MaterialPtr mat) |
Ogre::MaterialPtr | generateForCompositeMapRTT (Ogre::MaterialPtr mat) |
Private Member Functions | |
Ogre::MaterialPtr | create (Ogre::MaterialPtr mat, bool renderCompositeMap, bool displayCompositeMap) |
Private Attributes | |
std::vector< LayerInfo > | mLayerList |
std::vector< Ogre::TexturePtr > | mBlendmapList |
std::string | mCompositeMap |
bool | mShaders |
bool | mShadows |
bool | mSplitShadows |
bool | mNormalMapping |
bool | mParallaxMapping |
Terrain::MaterialGenerator::MaterialGenerator | ( | bool | shaders | ) |
layerList | layer textures |
blendmapList | blend textures |
shaders | Whether to use shaders. With a shader, blendmap packing can be used (4 channels instead of one), so if this parameter is true, then the supplied blend maps are expected to be packed. |
Ogre::MaterialPtr Terrain::MaterialGenerator::create | ( | Ogre::MaterialPtr | mat, |
bool | renderCompositeMap, | ||
bool | displayCompositeMap | ||
) | [private] |
void Terrain::MaterialGenerator::enableNormalMapping | ( | bool | normalMapping | ) | [inline] |
void Terrain::MaterialGenerator::enableParallaxMapping | ( | bool | parallaxMapping | ) | [inline] |
void Terrain::MaterialGenerator::enableShadows | ( | bool | shadows | ) | [inline] |
void Terrain::MaterialGenerator::enableSplitShadows | ( | bool | splitShadows | ) | [inline] |
Ogre::MaterialPtr Terrain::MaterialGenerator::generate | ( | Ogre::MaterialPtr | mat | ) |
Creates a material suitable for displaying a chunk of terrain using alpha-blending.
mat | Material that will be replaced by the generated material. May be empty as well, in which case a new material is created. |
Ogre::MaterialPtr Terrain::MaterialGenerator::generateForCompositeMap | ( | Ogre::MaterialPtr | mat | ) |
Creates a material suitable for displaying a chunk of terrain using a ready-made composite map.
mat | Material that will be replaced by the generated material. May be empty as well, in which case a new material is created. |
Ogre::MaterialPtr Terrain::MaterialGenerator::generateForCompositeMapRTT | ( | Ogre::MaterialPtr | mat | ) |
Creates a material suitable for rendering composite maps, i.e. for "baking" several layer textures into one. The main difference compared to a normal material is that no shading is applied at this point.
mat | Material that will be replaced by the generated material. May be empty as well, in which case a new material is created. |
const std::vector<Ogre::TexturePtr>& Terrain::MaterialGenerator::getBlendmapList | ( | ) | [inline] |
bool Terrain::MaterialGenerator::hasLayers | ( | ) | [inline] |
void Terrain::MaterialGenerator::setBlendmapList | ( | const std::vector< Ogre::TexturePtr > & | blendmapList | ) | [inline] |
void Terrain::MaterialGenerator::setCompositeMap | ( | const std::string & | name | ) | [inline] |
void Terrain::MaterialGenerator::setLayerList | ( | const std::vector< LayerInfo > & | layerList | ) | [inline] |
std::vector<Ogre::TexturePtr> Terrain::MaterialGenerator::mBlendmapList [private] |
std::string Terrain::MaterialGenerator::mCompositeMap [private] |
std::vector<LayerInfo> Terrain::MaterialGenerator::mLayerList [private] |
bool Terrain::MaterialGenerator::mNormalMapping [private] |
bool Terrain::MaterialGenerator::mParallaxMapping [private] |
bool Terrain::MaterialGenerator::mShaders [private] |
bool Terrain::MaterialGenerator::mShadows [private] |
bool Terrain::MaterialGenerator::mSplitShadows [private] |