Changeset 35 for code/branches/tutorial/Tutorial/src/ExampleApplication.h
- Timestamp:
- Oct 11, 2007, 10:35:49 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial/Tutorial/src/ExampleApplication.h
r30 r35 26 26 #include "ExampleFrameListener.h" 27 27 28 #if 029 28 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 30 29 #include <CoreFoundation/CoreFoundation.h> … … 53 52 } 54 53 #endif 55 #endif56 54 57 55 using namespace Ogre; … … 71 69 // On windows files are searched for in the current working directory, on OS X however 72 70 // you must provide the full path, the helper function macBundlePath does this for us. 71 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 72 mResourcePath = macBundlePath() + "/Contents/Resources/"; 73 #else 73 74 mResourcePath = ""; 75 #endif 74 76 } 75 77 /// Standard destructor … … 219 221 typeName = i->first; 220 222 archName = i->second; 223 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 224 // OS X does not set the working directory relative to the app, 225 // In order to make things portable on OS X we need to provide 226 // the loading with it's own bundle path location 227 ResourceGroupManager::getSingleton().addResourceLocation( 228 String(macBundlePath() + "/" + archName), typeName, secName); 229 #else 221 230 ResourceGroupManager::getSingleton().addResourceLocation( 222 231 archName, typeName, secName); 232 #endif 223 233 } 224 234 }
Note: See TracChangeset
for help on using the changeset viewer.