| 1545 | } |
| 1546 | |
| 1547 | void GFXTextureManager::_onFileChanged( const Torque::Path &path ) |
| 1548 | { |
| 1549 | String pathNoExt = Torque::Path::Join( path.getRoot(), ':', path.getPath() ); |
| 1550 | pathNoExt = Torque::Path::Join( pathNoExt, '/', path.getFileName() ); |
| 1551 | |
| 1552 | // See if we've got it loaded. |
| 1553 | GFXTextureObject *obj = hashFind( pathNoExt ); |
| 1554 | if ( !obj || path != obj->getPath() ) |
| 1555 | return; |
| 1556 | |
| 1557 | Con::errorf( "[GFXTextureManager::_onFileChanged] : File changed [%s]", path.getFullPath().c_str() ); |
| 1558 | |
| 1559 | const U32 scalePower = getTextureDownscalePower( obj->mProfile ); |
| 1560 | |
| 1561 | if ( sDDSExt.equal( path.getExtension(), String::NoCase) ) |
| 1562 | { |
| 1563 | Resource<DDSFile> dds = DDSFile::load( path, scalePower ); |
| 1564 | if ( dds ) |
| 1565 | _createTexture( dds, obj->mProfile, false, obj ); |
| 1566 | } |
| 1567 | else |
| 1568 | { |
| 1569 | Resource<GBitmap> bmp = GBitmap::load( path ); |
| 1570 | if( bmp ) |
| 1571 | _createTexture( bmp, obj->mTextureLookupName, obj->mProfile, false, obj ); |
| 1572 | } |
| 1573 | } |
| 1574 | |
| 1575 | void GFXTextureManager::reloadTextures() |
| 1576 | { |
nothing calls this directly
no test coverage detected