-----------------------------------------------------------------------
| 158 | } |
| 159 | //----------------------------------------------------------------------- |
| 160 | void ResourceGroupManager::initialiseAllResourceGroups( bool changeLocaleTemporarily ) |
| 161 | { |
| 162 | OGRE_LOCK_AUTO_MUTEX; |
| 163 | |
| 164 | ScopedCLocale scopedCLocale( changeLocaleTemporarily ); |
| 165 | |
| 166 | // Intialise all declared resource groups |
| 167 | for( ResourceGroupMap::value_type &rge : mResourceGroupMap ) |
| 168 | { |
| 169 | ResourceGroup *grp = rge.second; |
| 170 | OGRE_LOCK_MUTEX( grp->OGRE_AUTO_MUTEX_NAME ); // lock group mutex |
| 171 | if( grp->groupStatus == ResourceGroup::UNINITIALSED ) |
| 172 | { |
| 173 | // in the process of initialising |
| 174 | grp->groupStatus = ResourceGroup::INITIALISING; |
| 175 | // Set current group |
| 176 | mCurrentGroup = grp; |
| 177 | parseResourceGroupScripts( grp ); |
| 178 | LogManager::getSingleton().logMessage( "Creating resources for group " + rge.first ); |
| 179 | createDeclaredResources( grp ); |
| 180 | grp->groupStatus = ResourceGroup::INITIALISED; |
| 181 | LogManager::getSingleton().logMessage( "All done" ); |
| 182 | // Reset current group |
| 183 | mCurrentGroup = 0; |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | //----------------------------------------------------------------------- |
| 188 | void ResourceGroupManager::prepareResourceGroup( const String &name, bool prepareMainResources ) |
| 189 | { |
no test coverage detected