mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 06:49:55 +00:00
Only push the far clip plane out if the sky is enabled
This commit is contained in:
parent
f1278232d2
commit
82bbc69453
4 changed files with 8 additions and 8 deletions
|
@ -137,16 +137,16 @@ void OMW::Engine::go()
|
|||
// Used to control the player camera and position
|
||||
MWRender::PlayerPos player(scene.getCamera());
|
||||
|
||||
// Optionally enable the sky
|
||||
if (mEnableSky)
|
||||
mpSkyManager = MWRender::SkyManager::create(mOgre.getWindow(), scene.getCamera());
|
||||
|
||||
// This connects the cell data with the rendering scene.
|
||||
MWRender::InteriorCellRender rend(cell, scene);
|
||||
|
||||
// Load the cell and insert it into the renderer
|
||||
rend.show();
|
||||
|
||||
// Optionally enable the sky
|
||||
if (mEnableSky)
|
||||
mpSkyManager = MWRender::SkyManager::create(mOgre.getWindow(), scene.getCamera());
|
||||
|
||||
std::cout << "Setting up input system\n";
|
||||
|
||||
// Sets up the input system
|
||||
|
|
|
@ -141,7 +141,7 @@ void InteriorCellRender::configureFog()
|
|||
float low = 200;
|
||||
|
||||
scene.getMgr()->setFog (FOG_LINEAR, color, 0, low, high);
|
||||
scene.getCamera()->setFarClipDistance (high + 10 * 1000);
|
||||
scene.getCamera()->setFarClipDistance (high + 10);
|
||||
scene.getViewport()->setBackgroundColour (color);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ MWScene::MWScene(Render::OgreRenderer &_rend)
|
|||
|
||||
// Create the camera
|
||||
camera = sceneMgr->createCamera("PlayerCam");
|
||||
|
||||
camera->setNearClipDistance(5);
|
||||
|
||||
// Create one viewport, entire window
|
||||
|
@ -36,8 +35,6 @@ MWScene::MWScene(Render::OgreRenderer &_rend)
|
|||
// Set default mipmap level (NB some APIs ignore this)
|
||||
TextureManager::getSingleton().setDefaultNumMipmaps(5);
|
||||
|
||||
|
||||
|
||||
// Load resources
|
||||
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
|
||||
|
||||
|
|
|
@ -50,6 +50,9 @@ namespace MWRender
|
|||
// Disable fog since OpenMW is handling OGRE fog elsewhere
|
||||
mpCaelumSystem->setManageSceneFog(false);
|
||||
|
||||
// Change the camera far distance to make sure the sky is not clipped
|
||||
pCamera->setFarClipDistance(50000);
|
||||
|
||||
// Register Caelum as an OGRE listener
|
||||
pRenderWindow->addListener(mpCaelumSystem);
|
||||
Root::getSingletonPtr()->addFrameListener(mpCaelumSystem);
|
||||
|
|
Loading…
Reference in a new issue