Changeset 35
- Timestamp:
- Oct 11, 2007, 10:35:49 AM (17 years ago)
- Location:
- code/branches/tutorial/Tutorial/src
- Files:
-
- 3 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 } -
code/branches/tutorial/Tutorial/src/ExampleFrameListener.h
r30 r35 50 50 { 51 51 protected: 52 53 52 void updateStats(void) 54 53 { … … 84 83 guiDbg->setCaption(mDebugText); 85 84 } 86 catch(...) { }85 catch(...) { /* ignore */ } 87 86 } 88 87 -
code/branches/tutorial/Tutorial/src/main.cpp
r30 r35 58 58 }; 59 59 60 //#if OGRE_PLATFORM == OGRE_PLATFORM_WIN3261 //#define WIN32_LEAN_AND_MEAN62 //#include "windows.h"60 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 61 #define WIN32_LEAN_AND_MEAN 62 #include "windows.h" 63 63 64 //INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )65 //#else64 INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT ) 65 #else 66 66 int main(int argc, char **argv) 67 //#endif67 #endif 68 68 { 69 69 // Create application object … … 73 73 app.go(); 74 74 } catch( Exception& e ) { 75 //#if OGRE_PLATFORM == OGRE_PLATFORM_WIN3276 //MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);77 //#else75 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 76 MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL); 77 #else 78 78 fprintf(stderr, "An exception has occurred: %s\n", 79 79 e.getFullDescription().c_str()); 80 //#endif80 #endif 81 81 } 82 82
Note: See TracChangeset
for help on using the changeset viewer.