Fix for Issue #124 for CustomMaterial Refraction

This commit is contained in:
DavidWyand-GG 2012-11-08 16:00:52 -05:00
parent aa3a6d52ff
commit 0047842b33
3 changed files with 11 additions and 4 deletions

View file

@ -236,7 +236,7 @@ GFXTexHandle ReflectionManager::allocRenderTarget( const Point2I &size )
avar("%s() - mReflectTex (line %d)", __FUNCTION__, __LINE__) );
}
GFXTextureObject* ReflectionManager::getRefractTex()
GFXTextureObject* ReflectionManager::getRefractTex( bool forceUpdate )
{
GFXTarget *target = GFX->getActiveRenderTarget();
GFXFormat targetFormat = target->getFormat();
@ -261,7 +261,7 @@ GFXTextureObject* ReflectionManager::getRefractTex()
mUpdateRefract = true;
}
if ( mUpdateRefract )
if ( forceUpdate || mUpdateRefract )
{
target->resolveTo( mRefractTex );
mUpdateRefract = false;