ios stuff
This commit is contained in:
		
							parent
							
								
									98adb4ffda
								
							
						
					
					
						commit
						ac98475101
					
				| @ -18,13 +18,16 @@ | ||||
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||||
| { | ||||
|     self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | ||||
|      | ||||
|     // Override point for customization after application launch. | ||||
|     if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { | ||||
|         self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil]; | ||||
|     } else { | ||||
|         self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil]; | ||||
|     } | ||||
|      | ||||
|     self.window.rootViewController = self.viewController; | ||||
|      | ||||
|     [self.window makeKeyAndVisible]; | ||||
|     return YES; | ||||
| } | ||||
|  | ||||
| @ -73,7 +73,8 @@ extern GLKView* defaultView; | ||||
|     } else { | ||||
|         return YES; | ||||
|     }*/ | ||||
|     return UIInterfaceOrientationIsLandscape(interfaceOrientation); | ||||
|     //return UIInterfaceOrientationIsLandscape(interfaceOrientation); | ||||
|     return UIInterfaceOrientationIsPortrait(interfaceOrientation); | ||||
| } | ||||
| 
 | ||||
| - (void)setupGL | ||||
|  | ||||
| @ -1,111 +1,132 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00"> | ||||
| 	<data> | ||||
| 		<int key="IBDocument.SystemTarget">1296</int> | ||||
| 		<string key="IBDocument.SystemVersion">11E53</string> | ||||
| 		<string key="IBDocument.InterfaceBuilderVersion">2182</string> | ||||
| 		<string key="IBDocument.AppKitVersion">1138.47</string> | ||||
| 		<string key="IBDocument.HIToolboxVersion">569.00</string> | ||||
| 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions"> | ||||
| 			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 			<string key="NS.object.0">1181</string> | ||||
| 		</object> | ||||
| 		<array key="IBDocument.IntegratedClassDependencies"> | ||||
| 			<string>IBProxyObject</string> | ||||
| 			<string>IBUIView</string> | ||||
| 		</array> | ||||
| 		<array key="IBDocument.PluginDependencies"> | ||||
| 			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 		</array> | ||||
| 		<object class="NSMutableDictionary" key="IBDocument.Metadata"> | ||||
| 			<string key="NS.key.0">PluginDependencyRecalculationVersion</string> | ||||
| 			<integer value="1" key="NS.object.0"/> | ||||
| 		</object> | ||||
| 		<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> | ||||
| 			<object class="IBProxyObject" id="841351856"> | ||||
| 				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string> | ||||
| 				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||||
| 			</object> | ||||
| 			<object class="IBProxyObject" id="371349661"> | ||||
| 				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string> | ||||
| 				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||||
| 			</object> | ||||
| 			<object class="IBUIView" id="184854543"> | ||||
| 				<reference key="NSNextResponder"/> | ||||
| 				<int key="NSvFlags">274</int> | ||||
| 				<string key="NSFrameSize">{320, 460}</string> | ||||
| 				<reference key="NSSuperview"/> | ||||
| 				<object class="NSColor" key="IBUIBackgroundColor"> | ||||
| 					<int key="NSColorSpace">3</int> | ||||
| 					<bytes key="NSWhite">MQA</bytes> | ||||
| 					<object class="NSColorSpace" key="NSCustomColorSpace"> | ||||
| 						<int key="NSID">2</int> | ||||
| 					</object> | ||||
| 				</object> | ||||
| 				<bool key="IBUIClearsContextBeforeDrawing">NO</bool> | ||||
| 				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||||
| 			</object> | ||||
| 		</array> | ||||
| 		<object class="IBObjectContainer" key="IBDocument.Objects"> | ||||
| 			<array class="NSMutableArray" key="connectionRecords"> | ||||
| 				<object class="IBConnectionRecord"> | ||||
| 					<object class="IBCocoaTouchOutletConnection" key="connection"> | ||||
| 						<string key="label">view</string> | ||||
| 						<reference key="source" ref="841351856"/> | ||||
| 						<reference key="destination" ref="184854543"/> | ||||
| 					</object> | ||||
| 					<int key="connectionID">3</int> | ||||
| 				</object> | ||||
| 			</array> | ||||
| 			<object class="IBMutableOrderedSet" key="objectRecords"> | ||||
| 				<array key="orderedObjects"> | ||||
| 					<object class="IBObjectRecord"> | ||||
| 						<int key="objectID">0</int> | ||||
| 						<array key="object" id="0"/> | ||||
| 						<reference key="children" ref="1000"/> | ||||
| 						<nil key="parent"/> | ||||
| 					</object> | ||||
| 					<object class="IBObjectRecord"> | ||||
| 						<int key="objectID">-1</int> | ||||
| 						<reference key="object" ref="841351856"/> | ||||
| 						<reference key="parent" ref="0"/> | ||||
| 						<string key="objectName">File's Owner</string> | ||||
| 					</object> | ||||
| 					<object class="IBObjectRecord"> | ||||
| 						<int key="objectID">-2</int> | ||||
| 						<reference key="object" ref="371349661"/> | ||||
| 						<reference key="parent" ref="0"/> | ||||
| 					</object> | ||||
| 					<object class="IBObjectRecord"> | ||||
| 						<int key="objectID">2</int> | ||||
| 						<reference key="object" ref="184854543"/> | ||||
| 						<reference key="parent" ref="0"/> | ||||
| 					</object> | ||||
| 				</array> | ||||
| 			</object> | ||||
| 			<dictionary class="NSMutableDictionary" key="flattenedProperties"> | ||||
| 				<string key="-1.CustomClassName">ViewController</string> | ||||
| 				<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 				<string key="-2.CustomClassName">UIResponder</string> | ||||
| 				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 				<string key="2.CustomClassName">CustomGLKView</string> | ||||
| 				<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 			</dictionary> | ||||
| 			<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> | ||||
| 			<nil key="activeLocalization"/> | ||||
| 			<dictionary class="NSMutableDictionary" key="localizations"/> | ||||
| 			<nil key="sourceID"/> | ||||
| 			<int key="maxID">4</int> | ||||
| 		</object> | ||||
| 		<object class="IBClassDescriber" key="IBDocument.Classes"/> | ||||
| 		<int key="IBDocument.localizationMode">0</int> | ||||
| 		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||||
| 		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> | ||||
| 			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string> | ||||
| 			<real value="1296" key="NS.object.0"/> | ||||
| 		</object> | ||||
| 		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> | ||||
| 		<int key="IBDocument.defaultPropertyAccessControl">3</int> | ||||
| 		<string key="IBCocoaTouchPluginVersion">1181</string> | ||||
| 	</data> | ||||
| </archive> | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00"> | ||||
| 	<data> | ||||
| 		<int key="IBDocument.SystemTarget">1536</int> | ||||
| 		<string key="IBDocument.SystemVersion">11E53</string> | ||||
| 		<string key="IBDocument.InterfaceBuilderVersion">2844</string> | ||||
| 		<string key="IBDocument.AppKitVersion">1138.47</string> | ||||
| 		<string key="IBDocument.HIToolboxVersion">569.00</string> | ||||
| 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions"> | ||||
| 			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 			<string key="NS.object.0">1930</string> | ||||
| 		</object> | ||||
| 		<array key="IBDocument.IntegratedClassDependencies"> | ||||
| 			<string>IBProxyObject</string> | ||||
| 			<string>IBUIView</string> | ||||
| 		</array> | ||||
| 		<array key="IBDocument.PluginDependencies"> | ||||
| 			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 		</array> | ||||
| 		<object class="NSMutableDictionary" key="IBDocument.Metadata"> | ||||
| 			<string key="NS.key.0">PluginDependencyRecalculationVersion</string> | ||||
| 			<integer value="1" key="NS.object.0"/> | ||||
| 		</object> | ||||
| 		<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> | ||||
| 			<object class="IBProxyObject" id="841351856"> | ||||
| 				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string> | ||||
| 				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||||
| 			</object> | ||||
| 			<object class="IBProxyObject" id="371349661"> | ||||
| 				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string> | ||||
| 				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||||
| 			</object> | ||||
| 			<object class="IBUIView" id="184854543"> | ||||
| 				<reference key="NSNextResponder"/> | ||||
| 				<int key="NSvFlags">274</int> | ||||
| 				<string key="NSFrameSize">{320, 480}</string> | ||||
| 				<reference key="NSSuperview"/> | ||||
| 				<reference key="NSWindow"/> | ||||
| 				<reference key="NSNextKeyView"/> | ||||
| 				<object class="NSColor" key="IBUIBackgroundColor"> | ||||
| 					<int key="NSColorSpace">3</int> | ||||
| 					<bytes key="NSWhite">MQA</bytes> | ||||
| 					<object class="NSColorSpace" key="NSCustomColorSpace"> | ||||
| 						<int key="NSID">2</int> | ||||
| 					</object> | ||||
| 				</object> | ||||
| 				<bool key="IBUIClearsContextBeforeDrawing">NO</bool> | ||||
| 				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||||
| 			</object> | ||||
| 		</array> | ||||
| 		<object class="IBObjectContainer" key="IBDocument.Objects"> | ||||
| 			<array class="NSMutableArray" key="connectionRecords"> | ||||
| 				<object class="IBConnectionRecord"> | ||||
| 					<object class="IBCocoaTouchOutletConnection" key="connection"> | ||||
| 						<string key="label">view</string> | ||||
| 						<reference key="source" ref="841351856"/> | ||||
| 						<reference key="destination" ref="184854543"/> | ||||
| 					</object> | ||||
| 					<int key="connectionID">3</int> | ||||
| 				</object> | ||||
| 			</array> | ||||
| 			<object class="IBMutableOrderedSet" key="objectRecords"> | ||||
| 				<array key="orderedObjects"> | ||||
| 					<object class="IBObjectRecord"> | ||||
| 						<int key="objectID">0</int> | ||||
| 						<array key="object" id="0"/> | ||||
| 						<reference key="children" ref="1000"/> | ||||
| 						<nil key="parent"/> | ||||
| 					</object> | ||||
| 					<object class="IBObjectRecord"> | ||||
| 						<int key="objectID">-1</int> | ||||
| 						<reference key="object" ref="841351856"/> | ||||
| 						<reference key="parent" ref="0"/> | ||||
| 						<string key="objectName">File's Owner</string> | ||||
| 					</object> | ||||
| 					<object class="IBObjectRecord"> | ||||
| 						<int key="objectID">-2</int> | ||||
| 						<reference key="object" ref="371349661"/> | ||||
| 						<reference key="parent" ref="0"/> | ||||
| 					</object> | ||||
| 					<object class="IBObjectRecord"> | ||||
| 						<int key="objectID">2</int> | ||||
| 						<reference key="object" ref="184854543"/> | ||||
| 						<reference key="parent" ref="0"/> | ||||
| 					</object> | ||||
| 				</array> | ||||
| 			</object> | ||||
| 			<dictionary class="NSMutableDictionary" key="flattenedProperties"> | ||||
| 				<string key="-1.CustomClassName">ViewController</string> | ||||
| 				<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 				<string key="-2.CustomClassName">UIResponder</string> | ||||
| 				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 				<string key="2.CustomClassName">CustomGLKView</string> | ||||
| 				<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||||
| 			</dictionary> | ||||
| 			<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> | ||||
| 			<nil key="activeLocalization"/> | ||||
| 			<dictionary class="NSMutableDictionary" key="localizations"/> | ||||
| 			<nil key="sourceID"/> | ||||
| 			<int key="maxID">4</int> | ||||
| 		</object> | ||||
| 		<object class="IBClassDescriber" key="IBDocument.Classes"> | ||||
| 			<array class="NSMutableArray" key="referencedPartialClassDescriptions"> | ||||
| 				<object class="IBPartialClassDescription"> | ||||
| 					<string key="className">CustomGLKView</string> | ||||
| 					<string key="superclassName">GLKView</string> | ||||
| 					<object class="IBClassDescriptionSource" key="sourceIdentifier"> | ||||
| 						<string key="majorKey">IBProjectSource</string> | ||||
| 						<string key="minorKey">./Classes/CustomGLKView.h</string> | ||||
| 					</object> | ||||
| 				</object> | ||||
| 				<object class="IBPartialClassDescription"> | ||||
| 					<string key="className">ViewController</string> | ||||
| 					<string key="superclassName">GLKViewController</string> | ||||
| 					<object class="IBClassDescriptionSource" key="sourceIdentifier"> | ||||
| 						<string key="majorKey">IBProjectSource</string> | ||||
| 						<string key="minorKey">./Classes/ViewController.h</string> | ||||
| 					</object> | ||||
| 				</object> | ||||
| 			</array> | ||||
| 		</object> | ||||
| 		<int key="IBDocument.localizationMode">0</int> | ||||
| 		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||||
| 		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> | ||||
| 			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string> | ||||
| 			<real value="1536" key="NS.object.0"/> | ||||
| 		</object> | ||||
| 		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> | ||||
| 		<int key="IBDocument.defaultPropertyAccessControl">3</int> | ||||
| 		<string key="IBCocoaTouchPluginVersion">1930</string> | ||||
| 	</data> | ||||
| </archive> | ||||
|  | ||||
| @ -7,7 +7,8 @@ TMyApplication App; | ||||
| extern "C" void AppInit() | ||||
| { | ||||
|      | ||||
|     App.OuterInit(480, 320, 480, 320); | ||||
|     App.OuterInit(320, 480, 320, 480); | ||||
|     //App.OuterInit(480, 320, 480, 320);
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -1,50 +1,50 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||||
| <plist version="1.0"> | ||||
| <dict> | ||||
| 	<key>CFBundleDevelopmentRegion</key> | ||||
| 	<string>en</string> | ||||
| 	<key>CFBundleDisplayName</key> | ||||
| 	<string>Salmon Universal Template</string> | ||||
| 	<key>CFBundleExecutable</key> | ||||
| 	<string>${EXECUTABLE_NAME}</string> | ||||
| 	<key>CFBundleIconFile</key> | ||||
| 	<string>Icon.png</string> | ||||
| 	<key>CFBundleIdentifier</key> | ||||
| 	<string>fishrungames.template</string> | ||||
| 	<key>CFBundleInfoDictionaryVersion</key> | ||||
| 	<string>6.0</string> | ||||
| 	<key>CFBundleName</key> | ||||
| 	<string>${PRODUCT_NAME}</string> | ||||
| 	<key>CFBundlePackageType</key> | ||||
| 	<string>APPL</string> | ||||
| 	<key>CFBundleShortVersionString</key> | ||||
| 	<string>1.0</string> | ||||
| 	<key>CFBundleSignature</key> | ||||
| 	<string>????</string> | ||||
| 	<key>CFBundleVersion</key> | ||||
| 	<string>1.0</string> | ||||
| 	<key>LSRequiresIPhoneOS</key> | ||||
| 	<true/> | ||||
| 	<key>UILaunchImageFile</key> | ||||
| 	<string>Splash-landscape.png</string> | ||||
| 	<key>UIPrerenderedIcon</key> | ||||
| 	<true/> | ||||
| 	<key>UIRequiredDeviceCapabilities</key> | ||||
| 	<array> | ||||
| 		<string>armv7</string> | ||||
| 	</array> | ||||
| 	<key>UIStatusBarHidden</key> | ||||
| 	<true/> | ||||
| 	<key>UISupportedInterfaceOrientations</key> | ||||
| 	<array> | ||||
| 		<string>UIInterfaceOrientationLandscapeLeft</string> | ||||
| 		<string>UIInterfaceOrientationLandscapeRight</string> | ||||
| 	</array> | ||||
| 	<key>UISupportedInterfaceOrientations~ipad</key> | ||||
| 	<array> | ||||
| 		<string>UIInterfaceOrientationLandscapeLeft</string> | ||||
| 		<string>UIInterfaceOrientationLandscapeRight</string> | ||||
| 	</array> | ||||
| </dict> | ||||
| </plist> | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||||
| <plist version="1.0"> | ||||
| <dict> | ||||
| 	<key>CFBundleDevelopmentRegion</key> | ||||
| 	<string>en</string> | ||||
| 	<key>CFBundleDisplayName</key> | ||||
| 	<string>Salmon Universal Template</string> | ||||
| 	<key>CFBundleExecutable</key> | ||||
| 	<string>${EXECUTABLE_NAME}</string> | ||||
| 	<key>CFBundleIconFile</key> | ||||
| 	<string>Icon.png</string> | ||||
| 	<key>CFBundleIdentifier</key> | ||||
| 	<string>fishrungames.template</string> | ||||
| 	<key>CFBundleInfoDictionaryVersion</key> | ||||
| 	<string>6.0</string> | ||||
| 	<key>CFBundleName</key> | ||||
| 	<string>${PRODUCT_NAME}</string> | ||||
| 	<key>CFBundlePackageType</key> | ||||
| 	<string>APPL</string> | ||||
| 	<key>CFBundleShortVersionString</key> | ||||
| 	<string>1.0</string> | ||||
| 	<key>CFBundleSignature</key> | ||||
| 	<string>????</string> | ||||
| 	<key>CFBundleVersion</key> | ||||
| 	<string>1.0</string> | ||||
| 	<key>LSRequiresIPhoneOS</key> | ||||
| 	<true/> | ||||
| 	<key>UILaunchImageFile</key> | ||||
| 	<string>Splash-landscape.png</string> | ||||
| 	<key>UIPrerenderedIcon</key> | ||||
| 	<true/> | ||||
| 	<key>UIRequiredDeviceCapabilities</key> | ||||
| 	<array> | ||||
| 		<string>armv7</string> | ||||
| 	</array> | ||||
| 	<key>UIStatusBarHidden</key> | ||||
| 	<true/> | ||||
| 	<key>UISupportedInterfaceOrientations</key> | ||||
| 	<array> | ||||
| 		<string>UIInterfaceOrientationPortrait</string> | ||||
| 		<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||||
| 	</array> | ||||
| 	<key>UISupportedInterfaceOrientations~ipad</key> | ||||
| 	<array> | ||||
| 		<string>UIInterfaceOrientationPortrait</string> | ||||
| 		<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||||
| 	</array> | ||||
| </dict> | ||||
| </plist> | ||||
|  | ||||
| @ -282,7 +282,7 @@ void TMyApplication::InnerOnMove(vec2 shift) | ||||
| 
 | ||||
| 	vec3 rotation = Normalize(vec3(RotateShift, 0)); //Inverse
 | ||||
| 
 | ||||
| 	rotation.v[1] =-rotation.v[1]; //Inverse
 | ||||
| 	//rotation.v[1] =-rotation.v[1]; //Inverse
 | ||||
| 
 | ||||
| 	vec3 z = vec3(0,0,-1); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user