From a33ae35e9487913454e87797425307375dc8aefb Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 13 Apr 2012 13:28:31 +0200 Subject: [PATCH] some fixes --- apps/openmw/mwrender/renderingmanager.cpp | 3 ++- apps/openmw/mwrender/terrainmaterial.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index ee60407b2..984b7ddc9 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -56,6 +56,8 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities(); if (caps->getNumMultiRenderTargets() < 2) Settings::Manager::setBool("shader", "Water", false); + if (!caps->isShaderProfileSupported("fp40") && !caps->isShaderProfileSupported("ps_4_0")) + Settings::Manager::setBool("enabled", "Shadows", false); // note that the order is important here if (useMRT()) @@ -108,7 +110,6 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const RenderingManager::~RenderingManager () { - //TODO: destroy mSun? delete mPlayer; delete mSkyManager; delete mDebugging; diff --git a/apps/openmw/mwrender/terrainmaterial.cpp b/apps/openmw/mwrender/terrainmaterial.cpp index 57bea5388..c69ed3a61 100644 --- a/apps/openmw/mwrender/terrainmaterial.cpp +++ b/apps/openmw/mwrender/terrainmaterial.cpp @@ -1339,7 +1339,13 @@ namespace Ogre // diffuse lighting for (int i=0; igetNumberOfLightsSupported(); ++i) + { + // shadows only for first light (directional) + if (i==0) outStream << " outputCol.rgb += litRes"<isLayerSpecularMappingEnabled())