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

Method reloadTextures

Engine/source/gfx/gfxTextureManager.cpp:1575–1602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1573}
1574
1575void GFXTextureManager::reloadTextures()
1576{
1577 GFXTextureObject *tex = mListHead;
1578
1579 while ( tex != NULL )
1580 {
1581 const Torque::Path path( tex->mPath );
1582 if ( !path.isEmpty() )
1583 {
1584 const U32 scalePower = getTextureDownscalePower( tex->mProfile );
1585
1586 if ( sDDSExt.equal( path.getExtension(), String::NoCase ) )
1587 {
1588 Resource<DDSFile> dds = DDSFile::load( path, scalePower );
1589 if ( dds )
1590 _createTexture( dds, tex->mProfile, false, tex );
1591 }
1592 else
1593 {
1594 Resource<GBitmap> bmp = GBitmap::load( path );
1595 if( bmp )
1596 _createTexture( bmp, tex->mTextureLookupName, tex->mProfile, false, tex );
1597 }
1598 }
1599
1600 tex = tex->mNext;
1601 }
1602}
1603
1604DefineEngineFunction( flushTextureCache, void, (),,
1605 "Releases all textures and resurrects the texture manager.\n"

Callers 1

Calls 4

loadFunction · 0.85
isEmptyMethod · 0.45
equalMethod · 0.45
getExtensionMethod · 0.45

Tested by

no test coverage detected