OGRE
1.11.6
Object-Oriented Graphics Rendering Engine
|
A TerrainMaterialGenerator which can cope with normal mapped, specular mapped terrain. More...
#include <OgreTerrainMaterialGeneratorA.h>
Classes | |
class | SM2Profile |
Shader model 2 profile target. More... | |
Public Types | |
typedef std::vector< Profile * > | ProfileList |
List of profiles - NB should be ordered in descending complexity. More... | |
Public Member Functions | |
TerrainMaterialGeneratorA () | |
virtual | ~TerrainMaterialGeneratorA () |
Texture * | _getCompositeMapRTT () |
void | _markChanged () |
Internal method - indicates that a change has been made that would require material regeneration. More... | |
virtual void | _renderCompositeMap (size_t size, const Rect &rect, const MaterialPtr &mat, const TexturePtr &destCompositeMap) |
Helper method to render a composite map. More... | |
virtual bool | canGenerateUsingDeclaration (const TerrainLayerDeclaration &decl) |
Whether this generator can generate a material for a given declaration. More... | |
virtual MaterialPtr | generate (const Terrain *terrain) |
Generate a material for the given terrain using the active profile. More... | |
virtual MaterialPtr | generateForCompositeMap (const Terrain *terrain) |
Generate a material for the given composite map of the terrain using the active profile. More... | |
Profile * | getActiveProfile () const |
Get the active profile. More... | |
unsigned long long int | getChangeCount () const |
Returns the number of times the generator has undergone a change which would require materials to be regenerated. More... | |
virtual unsigned int | getDebugLevel () const |
Get the debug level of the material. More... | |
virtual const TerrainLayerDeclaration & | getLayerDeclaration () const |
Get the layer declaration that this material generator operates with. More... | |
virtual uint8 | getMaxLayers (const Terrain *terrain) const |
Get the maximum number of layers supported with the given terrain. More... | |
virtual const ProfileList & | getProfiles () const |
Get the list of profiles that this generator supports. More... | |
virtual bool | isVertexCompressionSupported () const |
Return whether this material generator supports using a compressed vertex format. More... | |
virtual void | requestOptions (Terrain *terrain) |
Triggers the generator to request the options that it needs. More... | |
virtual void | setActiveProfile (const String &name) |
Set the active profile by name. More... | |
virtual void | setActiveProfile (Profile *p) |
Set the active Profile. More... | |
virtual void | setDebugLevel (unsigned int dbg) |
Set the debug level of the material. More... | |
virtual void | setLightmapEnabled (bool enabled) |
Whether to support a light map over the terrain in the shader, if it's present (default true). More... | |
virtual void | updateCompositeMap (const Terrain *terrain, const Rect &rect) |
Update the composite map for a terrain. More... | |
virtual void | updateParams (const MaterialPtr &mat, const Terrain *terrain) |
Update parameters for the given terrain using the active profile. More... | |
virtual void | updateParamsForCompositeMap (const MaterialPtr &mat, const Terrain *terrain) |
Update parameters for the given terrain composite map using the active profile. More... | |
A TerrainMaterialGenerator which can cope with normal mapped, specular mapped terrain.
|
inherited |
List of profiles - NB should be ordered in descending complexity.
Ogre::TerrainMaterialGeneratorA::TerrainMaterialGeneratorA | ( | ) |
|
virtual |
|
inlinevirtualinherited |
Get the list of profiles that this generator supports.
|
inlinevirtualinherited |
Set the active profile by name.
|
inlinevirtualinherited |
Set the active Profile.
|
inlineinherited |
Get the active profile.
|
inlineinherited |
Internal method - indicates that a change has been made that would require material regeneration.
|
inlineinherited |
Returns the number of times the generator has undergone a change which would require materials to be regenerated.
|
inlinevirtualinherited |
Get the layer declaration that this material generator operates with.
|
inlinevirtualinherited |
Whether this generator can generate a material for a given declaration.
By default this only returns true if the declaration is equal to the standard one returned from getLayerDeclaration, but if a subclass wants to be flexible to generate materials for other declarations too, it can specify here.
|
inlinevirtualinherited |
Return whether this material generator supports using a compressed vertex format.
This is only possible when using shaders.
|
inlinevirtualinherited |
Triggers the generator to request the options that it needs.
References Ogre::TerrainMaterialGenerator::Profile::requestOptions().
|
inlinevirtualinherited |
Generate a material for the given terrain using the active profile.
References Ogre::TerrainMaterialGenerator::Profile::generate().
|
inlinevirtualinherited |
Generate a material for the given composite map of the terrain using the active profile.
References Ogre::TerrainMaterialGenerator::Profile::generateForCompositeMap().
|
inlinevirtualinherited |
Whether to support a light map over the terrain in the shader, if it's present (default true).
References Ogre::TerrainMaterialGenerator::Profile::setLightmapEnabled().
|
inlinevirtualinherited |
Get the maximum number of layers supported with the given terrain.
References Ogre::TerrainMaterialGenerator::Profile::getMaxLayers().
|
inlinevirtualinherited |
Update the composite map for a terrain.
The composite map for a terrain must match what the terrain should look like at distance. This method will only be called in the render thread so the generator is free to render into a texture to support this, so long as the results are blitted into the Terrain's own composite map afterwards.
References Ogre::TerrainMaterialGenerator::Profile::updateCompositeMap().
|
inlinevirtualinherited |
Update parameters for the given terrain using the active profile.
References Ogre::TerrainMaterialGenerator::Profile::updateParams().
|
inlinevirtualinherited |
Update parameters for the given terrain composite map using the active profile.
References Ogre::TerrainMaterialGenerator::Profile::updateParamsForCompositeMap().
|
inlinevirtualinherited |
Set the debug level of the material.
|
inlinevirtualinherited |
Get the debug level of the material.
|
virtualinherited |
Helper method to render a composite map.
size | The requested composite map size |
rect | The region of the composite map to update, in image space |
mat | The material to use to render the map |
destCompositeMap | A TexturePtr for the composite map to be written into |
|
inlineinherited |