Reduce innecesary changes on Render Target textures.

This commit is contained in:
LuisAntonRebollo 2014-11-08 02:02:30 +01:00
parent c354f59b72
commit c0b2e6536b
7 changed files with 29 additions and 9 deletions

View file

@ -539,9 +539,10 @@ void PlaneReflector::updateReflection( const ReflectParams &params )
if ( texResize ||
reflectTex.isNull() ||
reflectTex->getFormat() != REFLECTMGR->getReflectFormat() )
{
reflectTex = REFLECTMGR->allocRenderTarget( texSize );
GFXTexHandle depthBuff = LightShadowMap::_getDepthTarget( texSize.x, texSize.y );
depthBuff = LightShadowMap::_getDepthTarget( texSize.x, texSize.y );
}
// store current matrices
GFXTransformSaver saver;

View file

@ -224,7 +224,7 @@ protected:
public:
GFXTextureTargetRef reflectTarget;
GFXTexHandle reflectTex;
GFXTexHandle reflectTex, depthBuff;;
PlaneF refplane;
bool objectSpace;
};