mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Reduce innecesary changes on Render Target textures.
This commit is contained in:
parent
c354f59b72
commit
c0b2e6536b
7 changed files with 29 additions and 9 deletions
|
|
@ -166,11 +166,16 @@ bool RenderTexTargetBinManager::_updateTargets()
|
|||
|
||||
for( U32 j = 0; j < mNumRenderTargets; j++ )
|
||||
{
|
||||
// try reuse of old color texture
|
||||
if( mTargetChainTextures[i][j].getWidthHeight() != mTargetSize
|
||||
|| mTargetChainTextures[i][j].getFormat() != mTargetFormat)
|
||||
{
|
||||
ret &= mTargetChainTextures[i][j].set( mTargetSize.x, mTargetSize.y, mTargetFormat,
|
||||
&GFXDefaultRenderTargetProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ),
|
||||
1, GFXTextureManager::AA_MATCH_BACKBUFFER );
|
||||
|
||||
mTargetChain[i]->attachTexture( GFXTextureTarget::RenderSlot(GFXTextureTarget::Color0 + j), mTargetChainTextures[i][j] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue