mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Cleanup when deactivating light manager instead of reinitializing
This commit is contained in:
parent
c702ba0f12
commit
f50d46dffc
1 changed files with 37 additions and 29 deletions
|
|
@ -589,6 +589,8 @@ bool RenderParticleMgr::_initShader()
|
||||||
|
|
||||||
void RenderParticleMgr::_onLMActivate( const char*, bool activate )
|
void RenderParticleMgr::_onLMActivate( const char*, bool activate )
|
||||||
{
|
{
|
||||||
|
if ( activate )
|
||||||
|
{
|
||||||
RenderPassManager *rpm = getRenderPass();
|
RenderPassManager *rpm = getRenderPass();
|
||||||
if ( !rpm )
|
if ( !rpm )
|
||||||
return;
|
return;
|
||||||
|
|
@ -621,11 +623,17 @@ void RenderParticleMgr::_onLMActivate( const char*, bool activate )
|
||||||
mEdgeTarget = NamedTexTarget::find( "edge" );
|
mEdgeTarget = NamedTexTarget::find( "edge" );
|
||||||
|
|
||||||
// Setup the shader
|
// Setup the shader
|
||||||
if ( activate )
|
|
||||||
_initShader();
|
_initShader();
|
||||||
|
|
||||||
if ( mScreenQuadVertBuff.isNull() )
|
if ( mScreenQuadVertBuff.isNull() )
|
||||||
_initGFXResources();
|
_initGFXResources();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mStencilClearSB = NULL;
|
||||||
|
mScreenQuadPrimBuff = NULL;
|
||||||
|
mScreenQuadVertBuff = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GFXStateBlockRef RenderParticleMgr::_getOffscreenStateBlock(ParticleRenderInst *ri)
|
GFXStateBlockRef RenderParticleMgr::_getOffscreenStateBlock(ParticleRenderInst *ri)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue