MCPcopy Create free account
hub / github.com/carbonengine/trinity / ReleaseResources

Method ReleaseResources

trinity/Tr2LightManager.cpp:641–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

639}
640
641void Tr2LightManager::ReleaseResources( TriStorage s )
642{
643 if( s & m_perFrameData.GetMemoryClass() )
644 {
645 m_perFrameData = Tr2ConstantBufferAL();
646 }
647
648 // light manager does not release all sorts of buffers/effects. raytracing manager on the other hand does.
649 // probably because raytracing manager expects to get destroyed, unlike light manager, which is a singleton...?
650
651 if( ( s & TRISTORAGE_ALL ) == TRISTORAGE_ALL )
652 {
653 m_Raytracing.m_perFrameData = Tr2ConstantBufferAL();
654 }
655}
656
657bool Tr2LightManager::OnPrepareResources()
658{

Callers

nothing calls this directly

Calls 2

Tr2ConstantBufferALClass · 0.50
GetMemoryClassMethod · 0.45

Tested by

no test coverage detected