mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #1928 from lukaspj/particle-manager-lmactivate-cleanup
Cleanup when deactivating light manager instead of reinitializing
This commit is contained in:
commit
ac19e0e84c
|
|
@ -588,6 +588,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 )
|
||||||
|
|
@ -621,12 +623,18 @@ 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…
Reference in a new issue