mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Cleanup when deactivating light manager instead of reinitializing
This commit is contained in:
parent
c702ba0f12
commit
f50d46dffc
|
|
@ -589,6 +589,8 @@ bool RenderParticleMgr::_initShader()
|
|||
|
||||
void RenderParticleMgr::_onLMActivate( const char*, bool activate )
|
||||
{
|
||||
if ( activate )
|
||||
{
|
||||
RenderPassManager *rpm = getRenderPass();
|
||||
if ( !rpm )
|
||||
return;
|
||||
|
|
@ -621,11 +623,17 @@ void RenderParticleMgr::_onLMActivate( const char*, bool activate )
|
|||
mEdgeTarget = NamedTexTarget::find( "edge" );
|
||||
|
||||
// Setup the shader
|
||||
if ( activate )
|
||||
_initShader();
|
||||
|
||||
if ( mScreenQuadVertBuff.isNull() )
|
||||
_initGFXResources();
|
||||
}
|
||||
else
|
||||
{
|
||||
mStencilClearSB = NULL;
|
||||
mScreenQuadPrimBuff = NULL;
|
||||
mScreenQuadVertBuff = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
GFXStateBlockRef RenderParticleMgr::_getOffscreenStateBlock(ParticleRenderInst *ri)
|
||||
|
|
|
|||
Loading…
Reference in a new issue