renamed setting, automatically disable MRT when unsupported

actorid
scrawl 13 years ago
parent add4ebe445
commit f49131e1b8

@ -37,6 +37,12 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
// Load resources
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
// disable MRT if it is unsupported
const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities();
if (caps->getNumMultiRenderTargets() < 2
|| (!caps->isShaderProfileSupported("fp40") && !caps->isShaderProfileSupported("ps_3_0")))
Settings::Manager::setBool("multiple render targets", "Render", false);
if (Settings::Manager::getBool("multiple render targets", "Render"))
{
CompositorManager::getSingleton().addCompositor(mRendering.getViewport(), "gbuffer");

@ -52,7 +52,7 @@ Water::Water (Ogre::Camera *camera, SkyManager* sky, const ESM::Cell* cell) :
// Create rendertarget for reflection
int rttsize = Settings::Manager::getInt("rtt size", "Water");
if (Settings::Manager::getBool("reflection", "Water"))
if (Settings::Manager::getBool("shader", "Water") && Settings::Manager::getBool("multiple render targets", "Render"))
{
TexturePtr tex = TextureManager::getSingleton().createManual("WaterReflection",
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TEX_TYPE_2D, rttsize, rttsize, 0, PF_R8G8B8, TU_RENDERTARGET);

@ -44,7 +44,7 @@ num lights = 8
[Water]
reflection = false
shader = false
rtt size = 256

Loading…
Cancel
Save