| 1573 | } |
| 1574 | |
| 1575 | void 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 | |
| 1604 | DefineEngineFunction( flushTextureCache, void, (),, |
| 1605 | "Releases all textures and resurrects the texture manager.\n" |
no test coverage detected