diff --git a/examples/17.HelloWorld_Mobile/main.cpp b/examples/17.HelloWorld_Mobile/main.cpp index 2631e549..911e117c 100644 --- a/examples/17.HelloWorld_Mobile/main.cpp +++ b/examples/17.HelloWorld_Mobile/main.cpp @@ -7,8 +7,11 @@ #include -#if defined ( _IRR_WINDOWS_ ) +#ifdef _IRR_WINDOWS_ #include +#elif defined(_IRR_IPHONE_PLATFORM_) + #import + #import #endif using namespace irr; @@ -20,6 +23,19 @@ using namespace gui; #pragma comment(lib, "Irrlicht.lib") + +#ifdef _IRR_IPHONE_PLATFORM_ +@interface AppDelegate : UIResponder +{ + UIWindow* window; + IrrlichtDevice* device; +} + +@property (strong, nonatomic) UIWindow *window; + +@end +#endif + class EventReceiver_basic : public IEventReceiver { private: @@ -108,18 +124,27 @@ public: */ IrrlichtDevice *startup() { - //E_DRIVER_TYPE driverType = EDT_BURNINGSVIDEO; - E_DRIVER_TYPE driverType = EDT_OPENGL; - // create device IrrlichtDevice *device = 0; + +#ifdef _IRR_IPHONE_PLATFORM_ + AppDelegate* delegate = (AppDelegate*)[[UIApplication sharedApplication] delegate]; -#if defined (_IRR_USE_WINDOWS_CE_DEVICE_) + SIrrlichtCreationParameters param; + param.DriverType = EDT_OGLES2; + param.WindowSize = dimension2d(0,0); + param.WindowId = delegate.window; + param.Bits = 24; + param.ZBufferBits = 16; + param.AntiAlias = 0; + + device = createDeviceEx(param); +#elif defined(_IRR_USE_WINDOWS_CE_DEVICE_) // set to standard mobile fullscreen 240x320 - device = createDevice(driverType, dimension2d(240, 320), 16, true ); + device = createDevice(EDT_OPENGL, dimension2d(240, 320), 16, true ); #else // on PC. use window mode - device = createDevice(driverType, dimension2d(240, 320), 16, false ); + device = createDevice(EDT_OPENGL, dimension2d(240, 320), 16, false ); #endif if ( 0 == device ) return 0; @@ -127,6 +152,12 @@ IrrlichtDevice *startup() IVideoDriver* driver = device->getVideoDriver(); ISceneManager* smgr = device->getSceneManager(); IGUIEnvironment* guienv = device->getGUIEnvironment(); + +#ifdef _IRR_IPHONE_PLATFORM_ + stringc mediaPath = "media/"; +#else + stringc mediaPath = "../../media/"; +#endif // set the filesystem relative to the executable #if defined (_IRR_WINDOWS_) @@ -143,10 +174,14 @@ IrrlichtDevice *startup() IGUIStaticText *text = guienv->addStaticText(L"FPS: 25", rect(140,15,200,30), false, false, 0, 100 ); + +#ifndef _IRR_IPHONE_PLATFORM_ + // programmable quit button isn't allowed on iOS. guienv->addButton(core::rect(200,10,238,30), 0, 2, L"Quit"); +#endif // add irrlicht logo - guienv->addImage(driver->getTexture("../../media/irrlichtlogo3.png"), + guienv->addImage(driver->getTexture(mediaPath + "irrlichtlogo3.png"), core::position2d(0,-2)); return device; } @@ -155,8 +190,18 @@ IrrlichtDevice *startup() */ int run ( IrrlichtDevice *device ) { +#ifdef _IRR_IPHONE_PLATFORM_ + while (device) + { + NSAutoreleasePool* tPool = [[NSAutoreleasePool alloc] init]; + while(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.002f, TRUE) == kCFRunLoopRunHandledSource); + [tPool release]; + + if(device->run()) +#else while(device->run()) if (device->isWindowActive()) +#endif { device->getVideoDriver()->beginScene(true, true, SColor(0,100,100,100)); device->getSceneManager()->drawAll(); @@ -174,8 +219,15 @@ int run ( IrrlichtDevice *device ) } } +#ifndef _IRR_IPHONE_PLATFORM_ device->drop(); - return 0; +#else + else + break; + } +#endif + + return 1; } /*! @@ -436,22 +488,40 @@ int example_terrain() /* */ +#ifdef _IRR_IPHONE_PLATFORM_ +IrrlichtDevice* example_helloworld() +#else int example_helloworld() +#endif { // create device IrrlichtDevice *device = startup(); if (device == 0) - return 1; // could not create selected driver. + #ifdef _IRR_IPHONE_PLATFORM_ + return 0; + #else + return 1 + #endif IVideoDriver* driver = device->getVideoDriver(); ISceneManager* smgr = device->getSceneManager(); IGUIEnvironment* guienv = device->getGUIEnvironment(); - IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2"); +#ifdef _IRR_IPHONE_PLATFORM_ + stringc mediaPath = "media/"; +#else + stringc mediaPath = "../../media/"; +#endif + + IAnimatedMesh* mesh = smgr->getMesh(mediaPath + "sydney.md2"); if (!mesh) { device->drop(); - return 1; + #ifdef _IRR_IPHONE_PLATFORM_ + return 0; + #else + return 1 + #endif } IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); @@ -467,7 +537,7 @@ int example_helloworld() { node->setMaterialFlag(EMF_LIGHTING, false); node->setMD2Animation(scene::EMAT_STAND); - node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") ); + node->setMaterialTexture( 0, driver->getTexture(mediaPath + "sydney.bmp") ); } /* @@ -477,11 +547,14 @@ int example_helloworld() */ smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0)); - EventReceiver_basic receiver(device); +#ifdef _IRR_IPHONE_PLATFORM_ + return device; +#else + EventReceiver_basic receiver(device); device->setEventReceiver(&receiver); return run ( device ); - +#endif } #if defined (_IRR_USE_WINDOWS_CE_DEVICE_) @@ -492,11 +565,80 @@ int example_helloworld() /* */ -int main() +#ifdef _IRR_IPHONE_PLATFORM_ +@implementation AppDelegate + +@synthesize window; + +- (void)applicationDidFinishLaunching:(UIApplication*)application { + // if you need ViewController or you don't want to see warning: + // "Application windows are expected to have a root view controller + // at the end of application launch" create custom UIWindow here + // and apply your ViewController to it in following way: + // window.rootViewController = YourViewController + // it's important to do this step before createDevice method. + device = example_helloworld(); + + [self performSelectorOnMainThread:@selector(applicationUpdate) withObject:nil waitUntilDone:NO]; +} + +- (void) applicationUpdate +{ + run(device); +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // you should pause rendering here, because some iOS versions, + // doesn't allow to send OpenGL rendering commands, when app + // is inactive. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // you should unpause rendering here. +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // you should pause rendering here, because some iOS versions, + // doesn't allow to send OpenGL rendering commands, when app + // is inactive. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // you should unpause rendering here. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + device->drop(); +} + +- (void)dealloc +{ + [window release]; + [super dealloc]; +} + +@end +#endif + +int main(int argc, char *argv[]) +{ +#ifdef _IRR_IPHONE_PLATFORM_ + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + [pool release]; + + return retVal; +#else example_helloworld (); example_customscenenode(); //example_terrain(); +#endif } /* diff --git a/media/sydney.bmp b/media/sydney.bmp index 2f14a5a0..0ba9aad9 100644 Binary files a/media/sydney.bmp and b/media/sydney.bmp differ diff --git a/source/Irrlicht/iOS/Interface_iPad.xib b/source/Irrlicht/iOS/Interface_iPad.xib new file mode 100644 index 00000000..ee708028 --- /dev/null +++ b/source/Irrlicht/iOS/Interface_iPad.xib @@ -0,0 +1,130 @@ + + + + 1280 + 11E53 + 2843 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1929 + + + IBProxyObject + IBUICustomObject + IBUIWindow + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + IBIPadFramework + + + + 1316 + + {320, 480} + + 1 + MSAxIDEAA + + NO + NO + IBIPadFramework + YES + YES + + + + + + + delegate + + + + 11 + + + + window + + + + 12 + + + + + + 0 + + + + + + 2 + + + + + -1 + + + File's Owner + + + -2 + + + + + 9 + + + + + + + UIApplication + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + AppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 12 + + + 0 + IBIPadFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + YES + 3 + 1929 + + diff --git a/source/Irrlicht/iOS/Interface_iPhone.xib b/source/Irrlicht/iOS/Interface_iPhone.xib new file mode 100644 index 00000000..efaeebd6 --- /dev/null +++ b/source/Irrlicht/iOS/Interface_iPhone.xib @@ -0,0 +1,131 @@ + + + + 1280 + 11G63b + 3084 + 1138.51 + 569.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 2083 + + + IBProxyObject + IBUICustomObject + IBUIWindow + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + IBCocoaTouchFramework + + + + 1316 + + {320, 480} + + + 1 + MSAxIDEAA + + NO + NO + IBCocoaTouchFramework + YES + YES + + + + + + + delegate + + + + 11 + + + + window + + + + 12 + + + + + + 0 + + + + + + 2 + + + + + -1 + + + File's Owner + + + -2 + + + + + 9 + + + + + + + UIApplication + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + AppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 12 + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + YES + 3 + 2083 + + diff --git a/source/Irrlicht/iOS/example-info.plist b/source/Irrlicht/iOS/example-info.plist new file mode 100644 index 00000000..a7189719 --- /dev/null +++ b/source/Irrlicht/iOS/example-info.plist @@ -0,0 +1,48 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + irrlicht.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSMainNibFile + Interface_iPhone + NSMainNibFile~ipad + Interface_iPad + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarHidden + + UIStatusBarHidden~ipad + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + + + diff --git a/source/Irrlicht/iOS/iOS.xcodeproj/project.pbxproj b/source/Irrlicht/iOS/iOS.xcodeproj/project.pbxproj index 65a873a7..b966bd86 100644 --- a/source/Irrlicht/iOS/iOS.xcodeproj/project.pbxproj +++ b/source/Irrlicht/iOS/iOS.xcodeproj/project.pbxproj @@ -506,12 +506,49 @@ 5E3EA6731586A27E00C17C1D /* IBurningShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E3047C415515B4400D9E53B /* IBurningShader.cpp */; }; 5E3EA6771586A27E00C17C1D /* Irrlicht.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E3047CC15515B4400D9E53B /* Irrlicht.cpp */; }; 5E3EA6781586A27E00C17C1D /* irrXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E3047CD15515B4400D9E53B /* irrXML.cpp */; }; + 5ED2483F1731568400A13B86 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E7CF2E215516CC00014DCBA /* UIKit.framework */; }; + 5ED248401731568400A13B86 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E7CF2E415516CC00014DCBA /* Foundation.framework */; }; + 5ED248411731568400A13B86 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E7CF2E615516CC00014DCBA /* CoreGraphics.framework */; }; + 5ED2485E173157AD00A13B86 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2485B173157AD00A13B86 /* main.cpp */; }; + 5ED2486117315F7A00A13B86 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E7CF31215516E370014DCBA /* libIrrlicht.a */; }; + 5ED2486317315FA800A13B86 /* media in Resources */ = {isa = PBXBuildFile; fileRef = 5ED2486217315FA800A13B86 /* media */; }; + 5ED24864173161C900A13B86 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E7CF2EA15516CC00014DCBA /* OpenGLES.framework */; }; + 5ED24865173161F200A13B86 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EDC9F971638D8CF00E65F28 /* CoreMotion.framework */; }; + 5ED248661731622A00A13B86 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E7CF2E815516CC00014DCBA /* QuartzCore.framework */; }; + 5ED248741731788700A13B86 /* COGLES2FixedPipeline.fsh in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2486C1731788700A13B86 /* COGLES2FixedPipeline.fsh */; }; + 5ED248751731788700A13B86 /* COGLES2FixedPipeline.vsh in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2486D1731788700A13B86 /* COGLES2FixedPipeline.vsh */; }; + 5ED248761731788700A13B86 /* COGLES2NormalMap.fsh in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2486E1731788700A13B86 /* COGLES2NormalMap.fsh */; }; + 5ED248771731788700A13B86 /* COGLES2NormalMap.vsh in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2486F1731788700A13B86 /* COGLES2NormalMap.vsh */; }; + 5ED248781731788700A13B86 /* COGLES2ParallaxMap.fsh in Sources */ = {isa = PBXBuildFile; fileRef = 5ED248701731788700A13B86 /* COGLES2ParallaxMap.fsh */; }; + 5ED248791731788700A13B86 /* COGLES2ParallaxMap.vsh in Sources */ = {isa = PBXBuildFile; fileRef = 5ED248711731788700A13B86 /* COGLES2ParallaxMap.vsh */; }; + 5ED2487A1731788700A13B86 /* COGLES2Renderer2D.fsh in Sources */ = {isa = PBXBuildFile; fileRef = 5ED248721731788700A13B86 /* COGLES2Renderer2D.fsh */; }; + 5ED2487B1731788700A13B86 /* COGLES2Renderer2D.vsh in Sources */ = {isa = PBXBuildFile; fileRef = 5ED248731731788700A13B86 /* COGLES2Renderer2D.vsh */; }; + 5ED2487C173178DC00A13B86 /* COGLES2FixedPipeline.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 5ED2486C1731788700A13B86 /* COGLES2FixedPipeline.fsh */; }; + 5ED2487D173178DC00A13B86 /* COGLES2FixedPipeline.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 5ED2486D1731788700A13B86 /* COGLES2FixedPipeline.vsh */; }; + 5ED2487E173178DC00A13B86 /* COGLES2NormalMap.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 5ED2486E1731788700A13B86 /* COGLES2NormalMap.fsh */; }; + 5ED2487F173178DC00A13B86 /* COGLES2NormalMap.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 5ED2486F1731788700A13B86 /* COGLES2NormalMap.vsh */; }; + 5ED24880173178DC00A13B86 /* COGLES2ParallaxMap.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 5ED248701731788700A13B86 /* COGLES2ParallaxMap.fsh */; }; + 5ED24881173178DC00A13B86 /* COGLES2ParallaxMap.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 5ED248711731788700A13B86 /* COGLES2ParallaxMap.vsh */; }; + 5ED24882173178DC00A13B86 /* COGLES2Renderer2D.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 5ED248721731788700A13B86 /* COGLES2Renderer2D.fsh */; }; + 5ED24883173178DC00A13B86 /* COGLES2Renderer2D.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 5ED248731731788700A13B86 /* COGLES2Renderer2D.vsh */; }; + 5ED2488817317FFC00A13B86 /* Interface_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5ED2488617317FFC00A13B86 /* Interface_iPad.xib */; }; + 5ED2488917317FFC00A13B86 /* Interface_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5ED2488717317FFC00A13B86 /* Interface_iPhone.xib */; }; 5EEAE04C171DF38900C7BC68 /* irrpack.h in Headers */ = {isa = PBXBuildFile; fileRef = 5EEAE049171DF38900C7BC68 /* irrpack.h */; }; 5EEAE04D171DF38900C7BC68 /* irrunpack.h in Headers */ = {isa = PBXBuildFile; fileRef = 5EEAE04A171DF38900C7BC68 /* irrunpack.h */; }; 5EEAE04E171DF38900C7BC68 /* leakHunter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5EEAE04B171DF38900C7BC68 /* leakHunter.h */; }; 5EEAE050171DF3C700C7BC68 /* leakHunter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EEAE04F171DF3C700C7BC68 /* leakHunter.cpp */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 5ED2485F17315F6400A13B86 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5E96FAE715515650000A0A05 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5E7CF31115516E370014DCBA; + remoteInfo = Irrlicht; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ 5E25C82816A845D900320AA9 /* COGLES2FixedPipelineRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = COGLES2FixedPipelineRenderer.cpp; path = ../COGLES2FixedPipelineRenderer.cpp; sourceTree = ""; }; 5E25C82916A845D900320AA9 /* COGLES2FixedPipelineRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = COGLES2FixedPipelineRenderer.h; path = ../COGLES2FixedPipelineRenderer.h; sourceTree = ""; }; @@ -1244,6 +1281,20 @@ 5E7CF769155187AB0014DCBA /* SoftwareDriver2_compile_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SoftwareDriver2_compile_config.h; path = ../SoftwareDriver2_compile_config.h; sourceTree = ""; }; 5E7CF76A155187AB0014DCBA /* SoftwareDriver2_helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SoftwareDriver2_helper.h; path = ../SoftwareDriver2_helper.h; sourceTree = ""; }; 5E7CF76B155187AB0014DCBA /* wglext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wglext.h; path = ../wglext.h; sourceTree = ""; }; + 5ED2483E1731568400A13B86 /* 17.HelloWorld_Mobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = 17.HelloWorld_Mobile.app; path = HelloWorldMobile.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5ED2485B173157AD00A13B86 /* main.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; name = main.cpp; path = ../../../examples/17.HelloWorld_Mobile/main.cpp; sourceTree = ""; }; + 5ED2486217315FA800A13B86 /* media */ = {isa = PBXFileReference; lastKnownFileType = folder; name = media; path = ../../../media; sourceTree = ""; }; + 5ED2486C1731788700A13B86 /* COGLES2FixedPipeline.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = COGLES2FixedPipeline.fsh; sourceTree = ""; }; + 5ED2486D1731788700A13B86 /* COGLES2FixedPipeline.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = COGLES2FixedPipeline.vsh; sourceTree = ""; }; + 5ED2486E1731788700A13B86 /* COGLES2NormalMap.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = COGLES2NormalMap.fsh; sourceTree = ""; }; + 5ED2486F1731788700A13B86 /* COGLES2NormalMap.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = COGLES2NormalMap.vsh; sourceTree = ""; }; + 5ED248701731788700A13B86 /* COGLES2ParallaxMap.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = COGLES2ParallaxMap.fsh; sourceTree = ""; }; + 5ED248711731788700A13B86 /* COGLES2ParallaxMap.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = COGLES2ParallaxMap.vsh; sourceTree = ""; }; + 5ED248721731788700A13B86 /* COGLES2Renderer2D.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = COGLES2Renderer2D.fsh; sourceTree = ""; }; + 5ED248731731788700A13B86 /* COGLES2Renderer2D.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = COGLES2Renderer2D.vsh; sourceTree = ""; }; + 5ED2488417317C4C00A13B86 /* example-info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "example-info.plist"; sourceTree = ""; }; + 5ED2488617317FFC00A13B86 /* Interface_iPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Interface_iPad.xib; sourceTree = ""; }; + 5ED2488717317FFC00A13B86 /* Interface_iPhone.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Interface_iPhone.xib; sourceTree = ""; }; 5EDC9F971638D8CF00E65F28 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; 5EE3D2BE1552DF7C00D0F9E8 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; 5EEAE049171DF38900C7BC68 /* irrpack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = irrpack.h; path = ../../../include/irrpack.h; sourceTree = ""; }; @@ -1260,6 +1311,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 5ED2483B1731568400A13B86 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5ED2486117315F7A00A13B86 /* libIrrlicht.a in Frameworks */, + 5ED248661731622A00A13B86 /* QuartzCore.framework in Frameworks */, + 5ED24865173161F200A13B86 /* CoreMotion.framework in Frameworks */, + 5ED24864173161C900A13B86 /* OpenGLES.framework in Frameworks */, + 5ED2483F1731568400A13B86 /* UIKit.framework in Frameworks */, + 5ED248401731568400A13B86 /* Foundation.framework in Frameworks */, + 5ED248411731568400A13B86 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -2095,9 +2160,12 @@ 5E96FAE515515650000A0A05 = { isa = PBXGroup; children = ( + 5ED24838173151F300A13B86 /* Examples */, 5E7CF2E115516CC00014DCBA /* Frameworks */, 5E30445D15515A9000D9E53B /* Include */, + 5ED2486217315FA800A13B86 /* media */, 5E96FAF115515650000A0A05 /* Products */, + 5ED2486B1731788700A13B86 /* Shaders */, 5E3045C815515AD100D9E53B /* Source */, ); sourceTree = ""; @@ -2106,10 +2174,46 @@ isa = PBXGroup; children = ( 5E7CF31215516E370014DCBA /* libIrrlicht.a */, + 5ED2483E1731568400A13B86 /* 17.HelloWorld_Mobile.app */, ); name = Products; sourceTree = ""; }; + 5ED24838173151F300A13B86 /* Examples */ = { + isa = PBXGroup; + children = ( + 5ED248391731523300A13B86 /* 17.HelloWorld_Mobile */, + ); + name = Examples; + sourceTree = ""; + }; + 5ED248391731523300A13B86 /* 17.HelloWorld_Mobile */ = { + isa = PBXGroup; + children = ( + 5ED2488617317FFC00A13B86 /* Interface_iPad.xib */, + 5ED2488717317FFC00A13B86 /* Interface_iPhone.xib */, + 5ED2488417317C4C00A13B86 /* example-info.plist */, + 5ED2485B173157AD00A13B86 /* main.cpp */, + ); + name = 17.HelloWorld_Mobile; + sourceTree = ""; + }; + 5ED2486B1731788700A13B86 /* Shaders */ = { + isa = PBXGroup; + children = ( + 5ED2486C1731788700A13B86 /* COGLES2FixedPipeline.fsh */, + 5ED2486D1731788700A13B86 /* COGLES2FixedPipeline.vsh */, + 5ED2486E1731788700A13B86 /* COGLES2NormalMap.fsh */, + 5ED2486F1731788700A13B86 /* COGLES2NormalMap.vsh */, + 5ED248701731788700A13B86 /* COGLES2ParallaxMap.fsh */, + 5ED248711731788700A13B86 /* COGLES2ParallaxMap.vsh */, + 5ED248721731788700A13B86 /* COGLES2Renderer2D.fsh */, + 5ED248731731788700A13B86 /* COGLES2Renderer2D.vsh */, + ); + name = Shaders; + path = ../../../media/Shaders; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -2325,11 +2429,32 @@ productReference = 5E7CF31215516E370014DCBA /* libIrrlicht.a */; productType = "com.apple.product-type.library.static"; }; + 5ED2483D1731568400A13B86 /* HelloWorldMobile */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5ED248541731568400A13B86 /* Build configuration list for PBXNativeTarget "HelloWorldMobile" */; + buildPhases = ( + 5ED2483A1731568400A13B86 /* Sources */, + 5ED2483B1731568400A13B86 /* Frameworks */, + 5ED2483C1731568400A13B86 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 5ED2486017315F6400A13B86 /* PBXTargetDependency */, + ); + name = HelloWorldMobile; + productName = 17.HelloWorld_Mobile; + productReference = 5ED2483E1731568400A13B86 /* 17.HelloWorld_Mobile.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 5E96FAE715515650000A0A05 /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0460; + }; buildConfigurationList = 5E96FAEA15515650000A0A05 /* Build configuration list for PBXProject "iOS" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; @@ -2343,10 +2468,32 @@ projectRoot = ""; targets = ( 5E7CF31115516E370014DCBA /* Irrlicht */, + 5ED2483D1731568400A13B86 /* HelloWorldMobile */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 5ED2483C1731568400A13B86 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5ED2487C173178DC00A13B86 /* COGLES2FixedPipeline.fsh in Resources */, + 5ED2487D173178DC00A13B86 /* COGLES2FixedPipeline.vsh in Resources */, + 5ED2487E173178DC00A13B86 /* COGLES2NormalMap.fsh in Resources */, + 5ED2487F173178DC00A13B86 /* COGLES2NormalMap.vsh in Resources */, + 5ED24880173178DC00A13B86 /* COGLES2ParallaxMap.fsh in Resources */, + 5ED24881173178DC00A13B86 /* COGLES2ParallaxMap.vsh in Resources */, + 5ED24882173178DC00A13B86 /* COGLES2Renderer2D.fsh in Resources */, + 5ED24883173178DC00A13B86 /* COGLES2Renderer2D.vsh in Resources */, + 5ED2486317315FA800A13B86 /* media in Resources */, + 5ED2488817317FFC00A13B86 /* Interface_iPad.xib in Resources */, + 5ED2488917317FFC00A13B86 /* Interface_iPhone.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 5E7CF30E15516E370014DCBA /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -2673,8 +2820,32 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 5ED2483A1731568400A13B86 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5ED2485E173157AD00A13B86 /* main.cpp in Sources */, + 5ED248741731788700A13B86 /* COGLES2FixedPipeline.fsh in Sources */, + 5ED248751731788700A13B86 /* COGLES2FixedPipeline.vsh in Sources */, + 5ED248761731788700A13B86 /* COGLES2NormalMap.fsh in Sources */, + 5ED248771731788700A13B86 /* COGLES2NormalMap.vsh in Sources */, + 5ED248781731788700A13B86 /* COGLES2ParallaxMap.fsh in Sources */, + 5ED248791731788700A13B86 /* COGLES2ParallaxMap.vsh in Sources */, + 5ED2487A1731788700A13B86 /* COGLES2Renderer2D.fsh in Sources */, + 5ED2487B1731788700A13B86 /* COGLES2Renderer2D.vsh in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 5ED2486017315F6400A13B86 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 5E7CF31115516E370014DCBA /* Irrlicht */; + targetProxy = 5ED2485F17315F6400A13B86 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ 5E7CF31B15516E370014DCBA /* Debug */ = { isa = XCBuildConfiguration; @@ -2682,6 +2853,7 @@ DSTROOT = /tmp/Irrlicht.dst; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = iOS_Prefix.pch; + ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -2744,6 +2916,56 @@ }; name = Release; }; + 5ED248551731568400A13B86 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + HEADER_SEARCH_PATHS = ../../../include; + INFOPLIST_FILE = "$(SRCROOT)/example-info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 5ED248561731568400A13B86 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + HEADER_SEARCH_PATHS = ../../../include; + INFOPLIST_FILE = "$(SRCROOT)/example-info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -2765,6 +2987,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 5ED248541731568400A13B86 /* Build configuration list for PBXNativeTarget "HelloWorldMobile" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5ED248551731568400A13B86 /* Debug */, + 5ED248561731568400A13B86 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 5E96FAE715515650000A0A05 /* Project object */;