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

Method ReleaseResources

trinity/Sprite2d/Tr2Sprite2dDisplayList.cpp:38–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void Tr2Sprite2dDisplayList::ReleaseResources( TriStorage s )
39{
40 if( vertexBuffer.IsValid() )
41 {
42 CCP_STATS_ADD( displayListVertexBufferSize, -double( vertexBuffer.GetSize() ) );
43 vertexBuffer = Tr2BufferAL();
44 }
45 if( indexBuffer.IsValid() )
46 {
47 CCP_STATS_ADD( displayListIndexBufferSize, -double( indexBuffer.GetSize() ) );
48 indexBuffer = Tr2BufferAL();
49 }
50 entries.clear();
51
52 m_owner->SetDirty();
53}
54
55bool Tr2Sprite2dDisplayList::OnPrepareResources()
56{

Callers

nothing calls this directly

Calls 4

Tr2BufferALClass · 0.50
IsValidMethod · 0.45
GetSizeMethod · 0.45
SetDirtyMethod · 0.45

Tested by

no test coverage detected