|
|
@ -27,6 +27,8 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
|
|
|
|
mTerrainManager = new TerrainManager(mRendering.getScene(),
|
|
|
|
mTerrainManager = new TerrainManager(mRendering.getScene(),
|
|
|
|
environment);
|
|
|
|
environment);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mWater = 0;
|
|
|
|
|
|
|
|
|
|
|
|
//The fog type must be set before any terrain objects are created as if the
|
|
|
|
//The fog type must be set before any terrain objects are created as if the
|
|
|
|
//fog type is set to FOG_NONE then the initially created terrain won't have any fog
|
|
|
|
//fog type is set to FOG_NONE then the initially created terrain won't have any fog
|
|
|
|
configureFog(1, ColourValue(1,1,1));
|
|
|
|
configureFog(1, ColourValue(1,1,1));
|
|
|
@ -39,8 +41,7 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
|
|
|
|
|
|
|
|
|
|
|
|
// disable MRT if it is unsupported
|
|
|
|
// disable MRT if it is unsupported
|
|
|
|
const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities();
|
|
|
|
const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities();
|
|
|
|
if (caps->getNumMultiRenderTargets() < 2
|
|
|
|
if (caps->getNumMultiRenderTargets() < 2)
|
|
|
|
|| (!caps->isShaderProfileSupported("fp40") && !caps->isShaderProfileSupported("ps_3_0")))
|
|
|
|
|
|
|
|
Settings::Manager::setBool("multiple render targets", "Render", false);
|
|
|
|
Settings::Manager::setBool("multiple render targets", "Render", false);
|
|
|
|
|
|
|
|
|
|
|
|
if (Settings::Manager::getBool("multiple render targets", "Render"))
|
|
|
|
if (Settings::Manager::getBool("multiple render targets", "Render"))
|
|
|
@ -73,8 +74,6 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
|
|
|
|
|
|
|
|
|
|
|
|
mOcclusionQuery = new OcclusionQuery(&mRendering, mSkyManager->getSunNode());
|
|
|
|
mOcclusionQuery = new OcclusionQuery(&mRendering, mSkyManager->getSunNode());
|
|
|
|
|
|
|
|
|
|
|
|
mWater = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mPlayer = new MWRender::Player (mRendering.getCamera(), playerNode);
|
|
|
|
mPlayer = new MWRender::Player (mRendering.getCamera(), playerNode);
|
|
|
|
mSun = 0;
|
|
|
|
mSun = 0;
|
|
|
|
|
|
|
|
|
|
|
@ -311,6 +310,8 @@ void RenderingManager::configureFog(const float density, const Ogre::ColourValue
|
|
|
|
CompositorInstance* inst = CompositorManager::getSingleton().getCompositorChain(mRendering.getViewport())->getCompositor("gbuffer");
|
|
|
|
CompositorInstance* inst = CompositorManager::getSingleton().getCompositorChain(mRendering.getViewport())->getCompositor("gbuffer");
|
|
|
|
if (inst != 0)
|
|
|
|
if (inst != 0)
|
|
|
|
inst->getCompositor()->getTechnique(0)->getTargetPass(0)->getPass(0)->setClearColour(colour);
|
|
|
|
inst->getCompositor()->getTechnique(0)->getTargetPass(0)->getPass(0)->setClearColour(colour);
|
|
|
|
|
|
|
|
if (mWater)
|
|
|
|
|
|
|
|
mWater->setViewportBackground(colour);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|