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

Method DestroyOwnTexture

trinity/Resources/TriTextureRes.cpp:1224–1242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1222}
1223
1224void TriTextureRes::DestroyOwnTexture()
1225{
1226 if( m_lodEnabled )
1227 {
1228 if( m_ownTexture.IsValid() )
1229 {
1230 Tr2TextureLodManager::Instance().GpuTextureDestroyed( m_ownTexture.GetDesc() );
1231 }
1232 if( m_loadedBitmap )
1233 {
1234 Tr2TextureLodManager::Instance().CpuTextureDestroyed( *m_loadedBitmap );
1235 m_loadedBitmap = nullptr;
1236 }
1237 m_lodEnabled = false;
1238 m_hadLodRequests = false;
1239 }
1240 m_ownTexture = Tr2TextureAL();
1241 SetTexture( m_ownTexture );
1242}
1243
1244bool TriTextureRes::HadLodRequests() const
1245{

Callers

nothing calls this directly

Calls 4

GpuTextureDestroyedMethod · 0.80
CpuTextureDestroyedMethod · 0.80
Tr2TextureALClass · 0.50
IsValidMethod · 0.45

Tested by

no test coverage detected