Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 11, 2007, 10:35:49 AM (17 years ago)
Author:
nicolasc
Message:

reset all files to original state
included all win32/macosx ifdefs…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutorial/Tutorial/src/ExampleApplication.h

    r30 r35  
    2626#include "ExampleFrameListener.h"
    2727
    28 #if 0
    2928#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
    3029#include <CoreFoundation/CoreFoundation.h>
     
    5352}
    5453#endif
    55 #endif
    5654
    5755using namespace Ogre;
     
    7169                // On windows files are searched for in the current working directory, on OS X however
    7270                // 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
    7374                mResourcePath = "";
     75#endif
    7476    }
    7577    /// Standard destructor
     
    219221                typeName = i->first;
    220222                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
    221230                ResourceGroupManager::getSingleton().addResourceLocation(
    222231                    archName, typeName, secName);
     232#endif
    223233            }
    224234        }
Note: See TracChangeset for help on using the changeset viewer.