Make sure render textures are inactive when in a cell without water

actorid
scrawl 12 years ago
parent 867b22ce19
commit 002830e13b

@ -99,4 +99,9 @@ namespace MWRender
}
}
void Refraction::setActive(bool active)
{
mRenderTarget->setActive(active);
}
}

@ -25,6 +25,7 @@ namespace MWRender
void preRenderTargetUpdate(const Ogre::RenderTargetEvent& evt);
void postRenderTargetUpdate(const Ogre::RenderTargetEvent& evt);
void setUnderwater(bool underwater) {mIsUnderwater = underwater;}
void setActive (bool active);
void renderQueueStarted (Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &skipThisInvocation);
void renderQueueEnded (Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &repeatThisInvocation);

@ -372,9 +372,9 @@ void Water::updateVisible()
{
mWater->setVisible(mToggled && mActive);
if (mReflection)
{
mReflection->setActive(mToggled && mActive);
}
if (mRefraction)
mRefraction->setActive(mToggled && mActive);
}
void Water::update(float dt, Ogre::Vector3 player)
@ -424,6 +424,8 @@ void Water::applyRTT()
mRefraction = new Refraction(mCamera);
mRefraction->setHeight(mTop);
}
updateVisible();
}
void Water::applyVisibilityMask()

Loading…
Cancel
Save