| 1146 | } |
| 1147 | |
| 1148 | void GFXTextureManager::_onFileChanged( const Torque::Path &path ) |
| 1149 | { |
| 1150 | String pathNoExt = Torque::Path::Join( path.getRoot(), ':', path.getPath() ); |
| 1151 | pathNoExt = Torque::Path::Join( pathNoExt, '/', path.getFileName() ); |
| 1152 | |
| 1153 | // See if we've got it loaded. |
| 1154 | GFXTextureObject *obj = hashFind( pathNoExt ); |
| 1155 | if ( !obj || path != obj->getPath() ) |
| 1156 | return; |
| 1157 | |
| 1158 | Con::errorf( "[GFXTextureManager::_onFileChanged] : File changed [%s]", path.getFullPath().c_str() ); |
| 1159 | |
| 1160 | const U32 scalePower = getTextureDownscalePower( obj->mProfile ); |
| 1161 | |
| 1162 | if ( sDDSExt.equal( path.getExtension(), String::NoCase) ) |
| 1163 | { |
| 1164 | Resource<DDSFile> dds = DDSFile::load( path, scalePower ); |
| 1165 | if ( dds ) |
| 1166 | _createTexture( dds, obj->mProfile, false, obj ); |
| 1167 | } |
| 1168 | else |
| 1169 | { |
| 1170 | Resource<GBitmap> bmp = GBitmap::load( path ); |
| 1171 | if( bmp ) |
| 1172 | _createTexture( bmp, obj->mTextureLookupName, obj->mProfile, false, obj ); |
| 1173 | } |
| 1174 | } |
| 1175 | |
| 1176 | void GFXTextureManager::reloadTextures() |
| 1177 | { |
nothing calls this directly
no test coverage detected