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

Method deleteTexture

Engine/source/gfx/gfxTextureManager.cpp:1379–1406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1377}
1378
1379void GFXTextureManager::deleteTexture( GFXTextureObject *texture )
1380{
1381 if ( mTextureManagerState == GFXTextureManager::Dead )
1382 return;
1383
1384 #ifdef DEBUG_SPEW
1385 Platform::outputDebugString( "[GFXTextureManager] deleteTexture '%s'",
1386 texture->mTextureLookupName.c_str()
1387 );
1388 #endif
1389
1390 if( mListHead == texture )
1391 mListHead = texture->mNext;
1392 if( mListTail == texture )
1393 mListTail = texture->mPrev;
1394
1395 hashRemove( texture );
1396
1397 // If we have a path for the texture then
1398 // remove change notifications for it.
1399 Path texPath = texture->getPath();
1400 if ( !texPath.isEmpty() )
1401 FS::RemoveChangeNotification( texPath, this, &GFXTextureManager::_onFileChanged );
1402
1403 GFXTextureProfile::updateStatsForDeletion(texture);
1404
1405 freeTexture( texture );
1406}
1407
1408void GFXTextureManager::_validateTexParams( const U32 width, const U32 height,
1409 const GFXTextureProfile *profile,

Callers 1

killMethod · 0.80

Calls 4

RemoveChangeNotificationFunction · 0.85
c_strMethod · 0.45
getPathMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected