ogre 1.8 final release compability fixes

actorid
scrawl 13 years ago
parent 173820d29b
commit 8f667580bb

@ -22,30 +22,30 @@ namespace MWRender
TerrainManager::TerrainManager(Ogre::SceneManager* mgr, RenderingManager* rend) :
mTerrainGroup(TerrainGroup(mgr, Terrain::ALIGN_X_Z, mLandSize, mWorldSize)), mRendering(rend)
{
mTerrainGlobals = OGRE_NEW TerrainGlobalOptions();
TerrainMaterialGeneratorPtr matGen;
TerrainMaterialGeneratorB* matGenP = new TerrainMaterialGeneratorB();
matGen.bind(matGenP);
mTerrainGlobals.setDefaultMaterialGenerator(matGen);
mTerrainGlobals->setDefaultMaterialGenerator(matGen);
TerrainMaterialGenerator::Profile* const activeProfile =
mTerrainGlobals.getDefaultMaterialGenerator()
mTerrainGlobals->getDefaultMaterialGenerator()
->getActiveProfile();
mActiveProfile = static_cast<TerrainMaterialGeneratorB::SM2Profile*>(activeProfile);
//The pixel error should be as high as possible without it being noticed
//as it governs how fast mesh quality decreases.
mTerrainGlobals.setMaxPixelError(8);
mTerrainGlobals->setMaxPixelError(8);
mTerrainGlobals.setLayerBlendMapSize(32);
mTerrainGlobals.setDefaultGlobalColourMapSize(65);
mTerrainGlobals->setLayerBlendMapSize(32);
mTerrainGlobals->setDefaultGlobalColourMapSize(65);
//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,
//this seemed the distance where it wasn't too noticeable
mTerrainGlobals.setCompositeMapDistance(mWorldSize*2);
mTerrainGlobals->setCompositeMapDistance(mWorldSize*2);
mActiveProfile->setLightmapEnabled(false);
mActiveProfile->setLayerSpecularMappingEnabled(false);
@ -92,14 +92,14 @@ namespace MWRender
void TerrainManager::setDiffuse(const ColourValue& diffuse)
{
mTerrainGlobals.setCompositeMapDiffuse(diffuse);
mTerrainGlobals->setCompositeMapDiffuse(diffuse);
}
//----------------------------------------------------------------------------------------------
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 cellRemoved(MWWorld::Ptr::CellStore* store);
private:
Ogre::TerrainGlobalOptions mTerrainGlobals;
Ogre::TerrainGlobalOptions* mTerrainGlobals;
Ogre::TerrainGroup mTerrainGroup;
RenderingManager* mRendering;

@ -11,11 +11,8 @@ compositor gbuffer
input none
pass clear
{
clear
{
// make sure to set this to the viewport background color from outside
colour_value 0 0 0 1
}
// make sure to set this to the viewport background color from outside
colour_value 0 0 0 1
}
pass render_scene
{
@ -59,11 +56,8 @@ compositor gbufferFinalizer
shadows off
pass clear
{
clear
{
buffers colour
colour_value 0 0 0 0
}
buffers colour
colour_value 0 0 0 0
}
pass render_quad
{
@ -81,9 +75,6 @@ compositor gbufferFinalizer
input none
pass clear
{
clear
{
}
}
pass render_quad
{

Loading…
Cancel
Save