mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:23:53 +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) :
|
||||
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;
|
||||
|
|
|
@ -10,13 +10,10 @@ 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
|
||||
}
|
||||
}
|
||||
pass render_scene
|
||||
{
|
||||
// Renders everything except water
|
||||
|
@ -58,13 +55,10 @@ compositor gbufferFinalizer
|
|||
input none
|
||||
shadows off
|
||||
pass clear
|
||||
{
|
||||
clear
|
||||
{
|
||||
buffers colour
|
||||
colour_value 0 0 0 0
|
||||
}
|
||||
}
|
||||
pass render_quad
|
||||
{
|
||||
material RenderSceneNoDepth
|
||||
|
@ -81,9 +75,6 @@ compositor gbufferFinalizer
|
|||
input none
|
||||
pass clear
|
||||
{
|
||||
clear
|
||||
{
|
||||
}
|
||||
}
|
||||
pass render_quad
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue