OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::TerrainMaterialGeneratorA::SM2Profile Class Reference

Shader model 2 profile target. More...

#include <OgreTerrainMaterialGeneratorA.h>

+ Inheritance diagram for Ogre::TerrainMaterialGeneratorA::SM2Profile:
+ Collaboration diagram for Ogre::TerrainMaterialGeneratorA::SM2Profile:

Classes

class  ShaderHelper
 Interface definition for helper class to generate shaders. More...
 
class  ShaderHelperCg
 Utility class to help with generating shaders for Cg / HLSL. More...
 
class  ShaderHelperGLSL
 Utility class to help with generating shaders for GLSL. More...
 
class  ShaderHelperGLSLES
 Utility class to help with generating shaders for GLSL ES. More...
 
class  ShaderHelperHLSL
 

Public Member Functions

 SM2Profile (TerrainMaterialGenerator *parent, const String &name, const String &desc)
 
virtual ~SM2Profile ()
 
String _getShaderLanguage () const
 
bool _isSM3Available () const
 Internal. More...
 
bool _isSM4Available () const
 
MaterialPtr generate (const Terrain *terrain)
 Generate / reuse a material for the terrain. More...
 
MaterialPtr generateForCompositeMap (const Terrain *terrain)
 Generate / reuse a material for the terrain. More...
 
const StringgetDescription () const
 Get the description of this profile. More...
 
uint8 getMaxLayers (const Terrain *terrain) const
 Get the number of layers supported. More...
 
const StringgetName () const
 Get the name of this profile. More...
 
TerrainMaterialGeneratorgetParent () const
 Get the generator which owns this profile. More...
 
bool getReceiveDynamicShadowsDepth () const
 Whether to use depth shadows (default false). More...
 
bool getReceiveDynamicShadowsEnabled () const
 Whether to support dynamic texture shadows received from other objects, on the terrain (default true). More...
 
bool getReceiveDynamicShadowsLowLod () const
 Whether to use shadows on low LOD material rendering (when using composite map) (default false). More...
 
PSSMShadowCameraSetupgetReceiveDynamicShadowsPSSM () const
 Whether to use PSSM support dynamic texture shadows, and if so the settings to use (default 0). More...
 
bool isCompositeMapEnabled () const
 Whether to use the composite map to provide a lower LOD technique in the distance (default true). More...
 
bool isGlobalColourMapEnabled () const
 Whether to support a global colour map over the terrain in the shader, if it's present (default true). More...
 
bool isLayerNormalMappingEnabled () const
 Whether to support normal mapping per layer in the shader (default true). More...
 
bool isLayerParallaxMappingEnabled () const
 Whether to support parallax mapping per layer in the shader (default true). More...
 
bool isLayerSpecularMappingEnabled () const
 Whether to support specular mapping per layer in the shader (default true). More...
 
bool isLightmapEnabled () const
 Whether to support a light map over the terrain in the shader, if it's present (default true). More...
 
bool isVertexCompressionSupported () const
 Compressed vertex format supported? More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
void requestOptions (Terrain *terrain)
 Request the options needed from the terrain. More...
 
void setCompositeMapEnabled (bool enabled)
 Whether to use the composite map to provide a lower LOD technique in the distance (default true). More...
 
void setGlobalColourMapEnabled (bool enabled)
 Whether to support a global colour map over the terrain in the shader, if it's present (default true). More...
 
void setLayerNormalMappingEnabled (bool enabled)
 Whether to support normal mapping per layer in the shader (default true). More...
 
void setLayerParallaxMappingEnabled (bool enabled)
 Whether to support parallax mapping per layer in the shader (default true). More...
 
void setLayerSpecularMappingEnabled (bool enabled)
 Whether to support specular mapping per layer in the shader (default true). More...
 
void setLightmapEnabled (bool enabled)
 Whether to support a light map over the terrain in the shader, if it's present (default true). More...
 
void setReceiveDynamicShadowsDepth (bool enabled)
 Whether to use depth shadows (default false). More...
 
void setReceiveDynamicShadowsEnabled (bool enabled)
 Whether to support dynamic texture shadows received from other objects, on the terrain (default true). More...
 
void setReceiveDynamicShadowsLowLod (bool enabled)
 Whether to use shadows on low LOD material rendering (when using composite map) (default false). More...
 
void setReceiveDynamicShadowsPSSM (PSSMShadowCameraSetup *pssmSettings)
 Whether to use PSSM support dynamic texture shadows, and if so the settings to use (default 0). More...
 
virtual void updateCompositeMap (const Terrain *terrain, const Rect &rect)
 Update the composite map for a terrain. More...
 
void updateParams (const MaterialPtr &mat, const Terrain *terrain)
 Update params for a terrain. More...
 
void updateParamsForCompositeMap (const MaterialPtr &mat, const Terrain *terrain)
 Update params for a terrain. More...
 

Protected Types

typedef StringStream stringstream
 
enum  TechniqueType { HIGH_LOD, LOW_LOD, RENDER_COMPOSITE_MAP }
 

Protected Member Functions

void addTechnique (const MaterialPtr &mat, const Terrain *terrain, TechniqueType tt)
 
bool isShadowingEnabled (TechniqueType tt, const Terrain *terrain) const
 

Protected Attributes

bool mCompositeMapEnabled
 
bool mDepthShadows
 
String mDesc
 
bool mGlobalColourMapEnabled
 
bool mLayerNormalMappingEnabled
 
bool mLayerParallaxMappingEnabled
 
bool mLayerSpecularMappingEnabled
 
bool mLightmapEnabled
 
bool mLowLodShadows
 
String mName
 
TerrainMaterialGeneratormParent
 
PSSMShadowCameraSetupmPSSM
 
bool mReceiveDynamicShadows
 
ShaderHelpermShaderGen
 
String mShaderLanguage
 
bool mSM3Available
 
bool mSM4Available
 

Detailed Description

Shader model 2 profile target.

Definition at line 60 of file OgreTerrainMaterialGeneratorA.h.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
HIGH_LOD 
LOW_LOD 
RENDER_COMPOSITE_MAP 

Definition at line 153 of file OgreTerrainMaterialGeneratorA.h.

Constructor & Destructor Documentation

Ogre::TerrainMaterialGeneratorA::SM2Profile::SM2Profile ( TerrainMaterialGenerator parent,
const String name,
const String desc 
)
virtual Ogre::TerrainMaterialGeneratorA::SM2Profile::~SM2Profile ( )
virtual

Member Function Documentation

String Ogre::TerrainMaterialGeneratorA::SM2Profile::_getShaderLanguage ( ) const
inline

Definition at line 148 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::_isSM3Available ( ) const
inline

Internal.

Definition at line 146 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::_isSM4Available ( ) const
inline

Definition at line 147 of file OgreTerrainMaterialGeneratorA.h.

void Ogre::TerrainMaterialGeneratorA::SM2Profile::addTechnique ( const MaterialPtr mat,
const Terrain terrain,
TechniqueType  tt 
)
protected
MaterialPtr Ogre::TerrainMaterialGeneratorA::SM2Profile::generate ( const Terrain terrain)
virtual

Generate / reuse a material for the terrain.

Implements Ogre::TerrainMaterialGenerator::Profile.

MaterialPtr Ogre::TerrainMaterialGeneratorA::SM2Profile::generateForCompositeMap ( const Terrain terrain)
virtual

Generate / reuse a material for the terrain.

Implements Ogre::TerrainMaterialGenerator::Profile.

const String& Ogre::TerrainMaterialGenerator::Profile::getDescription ( void  ) const
inlineinherited

Get the description of this profile.

Definition at line 184 of file OgreTerrainMaterialGenerator.h.

uint8 Ogre::TerrainMaterialGeneratorA::SM2Profile::getMaxLayers ( const Terrain terrain) const
virtual

Get the number of layers supported.

Implements Ogre::TerrainMaterialGenerator::Profile.

const String& Ogre::TerrainMaterialGenerator::Profile::getName ( void  ) const
inlineinherited

Get the name of this profile.

Definition at line 182 of file OgreTerrainMaterialGenerator.h.

TerrainMaterialGenerator* Ogre::TerrainMaterialGenerator::Profile::getParent ( ) const
inlineinherited

Get the generator which owns this profile.

Definition at line 180 of file OgreTerrainMaterialGenerator.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::getReceiveDynamicShadowsDepth ( ) const
inline

Whether to use depth shadows (default false).

Definition at line 137 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::getReceiveDynamicShadowsEnabled ( ) const
inline

Whether to support dynamic texture shadows received from other objects, on the terrain (default true).

Definition at line 118 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::getReceiveDynamicShadowsLowLod ( ) const
inline

Whether to use shadows on low LOD material rendering (when using composite map) (default false).

Definition at line 143 of file OgreTerrainMaterialGeneratorA.h.

PSSMShadowCameraSetup* Ogre::TerrainMaterialGeneratorA::SM2Profile::getReceiveDynamicShadowsPSSM ( ) const
inline

Whether to use PSSM support dynamic texture shadows, and if so the settings to use (default 0).

Definition at line 131 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::isCompositeMapEnabled ( ) const
inline

Whether to use the composite map to provide a lower LOD technique in the distance (default true).

Definition at line 110 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::isGlobalColourMapEnabled ( ) const
inline

Whether to support a global colour map over the terrain in the shader, if it's present (default true).

Definition at line 94 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::isLayerNormalMappingEnabled ( ) const
inline

Whether to support normal mapping per layer in the shader (default true).

Definition at line 75 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::isLayerParallaxMappingEnabled ( ) const
inline

Whether to support parallax mapping per layer in the shader (default true).

Definition at line 81 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::isLayerSpecularMappingEnabled ( ) const
inline

Whether to support specular mapping per layer in the shader (default true).

Definition at line 87 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::isLightmapEnabled ( ) const
inline

Whether to support a light map over the terrain in the shader, if it's present (default true).

Definition at line 102 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::isShadowingEnabled ( TechniqueType  tt,
const Terrain terrain 
) const
protected
bool Ogre::TerrainMaterialGeneratorA::SM2Profile::isVertexCompressionSupported ( ) const
virtual

Compressed vertex format supported?

Implements Ogre::TerrainMaterialGenerator::Profile.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

void Ogre::TerrainMaterialGeneratorA::SM2Profile::requestOptions ( Terrain terrain)
virtual

Request the options needed from the terrain.

Implements Ogre::TerrainMaterialGenerator::Profile.

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setCompositeMapEnabled ( bool  enabled)

Whether to use the composite map to provide a lower LOD technique in the distance (default true).

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setGlobalColourMapEnabled ( bool  enabled)

Whether to support a global colour map over the terrain in the shader, if it's present (default true).

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setLayerNormalMappingEnabled ( bool  enabled)

Whether to support normal mapping per layer in the shader (default true).

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setLayerParallaxMappingEnabled ( bool  enabled)

Whether to support parallax mapping per layer in the shader (default true).

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setLayerSpecularMappingEnabled ( bool  enabled)

Whether to support specular mapping per layer in the shader (default true).

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setLightmapEnabled ( bool  enabled)
virtual

Whether to support a light map over the terrain in the shader, if it's present (default true).

Implements Ogre::TerrainMaterialGenerator::Profile.

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setReceiveDynamicShadowsDepth ( bool  enabled)

Whether to use depth shadows (default false).

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setReceiveDynamicShadowsEnabled ( bool  enabled)

Whether to support dynamic texture shadows received from other objects, on the terrain (default true).

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setReceiveDynamicShadowsLowLod ( bool  enabled)

Whether to use shadows on low LOD material rendering (when using composite map) (default false).

void Ogre::TerrainMaterialGeneratorA::SM2Profile::setReceiveDynamicShadowsPSSM ( PSSMShadowCameraSetup pssmSettings)

Whether to use PSSM support dynamic texture shadows, and if so the settings to use (default 0).

virtual void Ogre::TerrainMaterialGenerator::Profile::updateCompositeMap ( const Terrain terrain,
const Rect rect 
)
virtualinherited

Update the composite map for a terrain.

Referenced by Ogre::TerrainMaterialGenerator::updateCompositeMap().

void Ogre::TerrainMaterialGeneratorA::SM2Profile::updateParams ( const MaterialPtr mat,
const Terrain terrain 
)
virtual

Update params for a terrain.

Implements Ogre::TerrainMaterialGenerator::Profile.

void Ogre::TerrainMaterialGeneratorA::SM2Profile::updateParamsForCompositeMap ( const MaterialPtr mat,
const Terrain terrain 
)
virtual

Update params for a terrain.

Implements Ogre::TerrainMaterialGenerator::Profile.

Member Data Documentation

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mCompositeMapEnabled
protected

Definition at line 274 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mDepthShadows
protected

Definition at line 277 of file OgreTerrainMaterialGeneratorA.h.

String Ogre::TerrainMaterialGenerator::Profile::mDesc
protectedinherited

Definition at line 172 of file OgreTerrainMaterialGenerator.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mGlobalColourMapEnabled
protected

Definition at line 272 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mLayerNormalMappingEnabled
protected

Definition at line 269 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mLayerParallaxMappingEnabled
protected

Definition at line 270 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mLayerSpecularMappingEnabled
protected

Definition at line 271 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mLightmapEnabled
protected

Definition at line 273 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mLowLodShadows
protected

Definition at line 278 of file OgreTerrainMaterialGeneratorA.h.

String Ogre::TerrainMaterialGenerator::Profile::mName
protectedinherited

Definition at line 171 of file OgreTerrainMaterialGenerator.h.

TerrainMaterialGenerator* Ogre::TerrainMaterialGenerator::Profile::mParent
protectedinherited

Definition at line 170 of file OgreTerrainMaterialGenerator.h.

PSSMShadowCameraSetup* Ogre::TerrainMaterialGeneratorA::SM2Profile::mPSSM
protected

Definition at line 276 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mReceiveDynamicShadows
protected

Definition at line 275 of file OgreTerrainMaterialGeneratorA.h.

ShaderHelper* Ogre::TerrainMaterialGeneratorA::SM2Profile::mShaderGen
protected

Definition at line 268 of file OgreTerrainMaterialGeneratorA.h.

String Ogre::TerrainMaterialGeneratorA::SM2Profile::mShaderLanguage
protected

Definition at line 281 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mSM3Available
protected

Definition at line 279 of file OgreTerrainMaterialGeneratorA.h.

bool Ogre::TerrainMaterialGeneratorA::SM2Profile::mSM4Available
protected

Definition at line 280 of file OgreTerrainMaterialGeneratorA.h.


The documentation for this class was generated from the following file: