MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / enable

Method enable

Engine/source/postFx/postEffect.cpp:1571–1597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1569}
1570
1571void PostEffect::enable()
1572{
1573 // Don't add TexGen PostEffects to the PostEffectManager!
1574 if ( mRenderTime == PFXTexGenOnDemand )
1575 return;
1576
1577 // Ignore it if its already enabled.
1578 if ( mEnabled )
1579 return;
1580
1581 mEnabled = true;
1582
1583 // We cannot really enable the effect
1584 // until its been registed.
1585 if ( !isProperlyAdded() )
1586 return;
1587
1588 // If the enable callback returns 'false' then
1589 // leave the effect disabled.
1590 if ( !onEnabled_callback() )
1591 {
1592 mEnabled = false;
1593 return;
1594 }
1595
1596 PFXMGR->_addEffect( this );
1597}
1598
1599void PostEffect::disable()
1600{

Callers 3

_setIsEnabledMethod · 0.45
DefineEngineMethodFunction · 0.45
postEffect.cppFile · 0.45

Calls 1

_addEffectMethod · 0.80

Tested by

no test coverage detected