mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 10:23:56 +00:00
ogre 1.8 final release compability fixes
This commit is contained in:
parent
173820d29b
commit
8f667580bb
3 changed files with 15 additions and 24 deletions
|
@ -22,30 +22,30 @@ namespace MWRender
|
||||||
TerrainManager::TerrainManager(Ogre::SceneManager* mgr, RenderingManager* rend) :
|
TerrainManager::TerrainManager(Ogre::SceneManager* mgr, RenderingManager* rend) :
|
||||||
mTerrainGroup(TerrainGroup(mgr, Terrain::ALIGN_X_Z, mLandSize, mWorldSize)), mRendering(rend)
|
mTerrainGroup(TerrainGroup(mgr, Terrain::ALIGN_X_Z, mLandSize, mWorldSize)), mRendering(rend)
|
||||||
{
|
{
|
||||||
|
mTerrainGlobals = OGRE_NEW TerrainGlobalOptions();
|
||||||
TerrainMaterialGeneratorPtr matGen;
|
TerrainMaterialGeneratorPtr matGen;
|
||||||
TerrainMaterialGeneratorB* matGenP = new TerrainMaterialGeneratorB();
|
TerrainMaterialGeneratorB* matGenP = new TerrainMaterialGeneratorB();
|
||||||
matGen.bind(matGenP);
|
matGen.bind(matGenP);
|
||||||
mTerrainGlobals.setDefaultMaterialGenerator(matGen);
|
mTerrainGlobals->setDefaultMaterialGenerator(matGen);
|
||||||
|
|
||||||
TerrainMaterialGenerator::Profile* const activeProfile =
|
TerrainMaterialGenerator::Profile* const activeProfile =
|
||||||
mTerrainGlobals.getDefaultMaterialGenerator()
|
mTerrainGlobals->getDefaultMaterialGenerator()
|
||||||
->getActiveProfile();
|
->getActiveProfile();
|
||||||
mActiveProfile = static_cast<TerrainMaterialGeneratorB::SM2Profile*>(activeProfile);
|
mActiveProfile = static_cast<TerrainMaterialGeneratorB::SM2Profile*>(activeProfile);
|
||||||
|
|
||||||
//The pixel error should be as high as possible without it being noticed
|
//The pixel error should be as high as possible without it being noticed
|
||||||
//as it governs how fast mesh quality decreases.
|
//as it governs how fast mesh quality decreases.
|
||||||
mTerrainGlobals.setMaxPixelError(8);
|
mTerrainGlobals->setMaxPixelError(8);
|
||||||
|
|
||||||
mTerrainGlobals.setLayerBlendMapSize(32);
|
mTerrainGlobals->setLayerBlendMapSize(32);
|
||||||
mTerrainGlobals.setDefaultGlobalColourMapSize(65);
|
mTerrainGlobals->setDefaultGlobalColourMapSize(65);
|
||||||
|
|
||||||
//10 (default) didn't seem to be quite enough
|
//10 (default) didn't seem to be quite enough
|
||||||
mTerrainGlobals.setSkirtSize(128);
|
mTerrainGlobals->setSkirtSize(128);
|
||||||
|
|
||||||
//due to the sudden flick between composite and non composite textures,
|
//due to the sudden flick between composite and non composite textures,
|
||||||
//this seemed the distance where it wasn't too noticeable
|
//this seemed the distance where it wasn't too noticeable
|
||||||
mTerrainGlobals.setCompositeMapDistance(mWorldSize*2);
|
mTerrainGlobals->setCompositeMapDistance(mWorldSize*2);
|
||||||
|
|
||||||
mActiveProfile->setLightmapEnabled(false);
|
mActiveProfile->setLightmapEnabled(false);
|
||||||
mActiveProfile->setLayerSpecularMappingEnabled(false);
|
mActiveProfile->setLayerSpecularMappingEnabled(false);
|
||||||
|
@ -92,14 +92,14 @@ namespace MWRender
|
||||||
|
|
||||||
void TerrainManager::setDiffuse(const ColourValue& diffuse)
|
void TerrainManager::setDiffuse(const ColourValue& diffuse)
|
||||||
{
|
{
|
||||||
mTerrainGlobals.setCompositeMapDiffuse(diffuse);
|
mTerrainGlobals->setCompositeMapDiffuse(diffuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void TerrainManager::setAmbient(const ColourValue& ambient)
|
void TerrainManager::setAmbient(const ColourValue& ambient)
|
||||||
{
|
{
|
||||||
mTerrainGlobals.setCompositeMapAmbient(ambient);
|
mTerrainGlobals->setCompositeMapAmbient(ambient);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace MWRender{
|
||||||
void cellAdded(MWWorld::Ptr::CellStore* store);
|
void cellAdded(MWWorld::Ptr::CellStore* store);
|
||||||
void cellRemoved(MWWorld::Ptr::CellStore* store);
|
void cellRemoved(MWWorld::Ptr::CellStore* store);
|
||||||
private:
|
private:
|
||||||
Ogre::TerrainGlobalOptions mTerrainGlobals;
|
Ogre::TerrainGlobalOptions* mTerrainGlobals;
|
||||||
Ogre::TerrainGroup mTerrainGroup;
|
Ogre::TerrainGroup mTerrainGroup;
|
||||||
|
|
||||||
RenderingManager* mRendering;
|
RenderingManager* mRendering;
|
||||||
|
|
|
@ -10,13 +10,10 @@ compositor gbuffer
|
||||||
{
|
{
|
||||||
input none
|
input none
|
||||||
pass clear
|
pass clear
|
||||||
{
|
|
||||||
clear
|
|
||||||
{
|
{
|
||||||
// make sure to set this to the viewport background color from outside
|
// make sure to set this to the viewport background color from outside
|
||||||
colour_value 0 0 0 1
|
colour_value 0 0 0 1
|
||||||
}
|
}
|
||||||
}
|
|
||||||
pass render_scene
|
pass render_scene
|
||||||
{
|
{
|
||||||
// Renders everything except water
|
// Renders everything except water
|
||||||
|
@ -58,13 +55,10 @@ compositor gbufferFinalizer
|
||||||
input none
|
input none
|
||||||
shadows off
|
shadows off
|
||||||
pass clear
|
pass clear
|
||||||
{
|
|
||||||
clear
|
|
||||||
{
|
{
|
||||||
buffers colour
|
buffers colour
|
||||||
colour_value 0 0 0 0
|
colour_value 0 0 0 0
|
||||||
}
|
}
|
||||||
}
|
|
||||||
pass render_quad
|
pass render_quad
|
||||||
{
|
{
|
||||||
material RenderSceneNoDepth
|
material RenderSceneNoDepth
|
||||||
|
@ -81,9 +75,6 @@ compositor gbufferFinalizer
|
||||||
input none
|
input none
|
||||||
pass clear
|
pass clear
|
||||||
{
|
{
|
||||||
clear
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
pass render_quad
|
pass render_quad
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue