├── UIWebViewWebGL.xcodeproj └── project.pbxproj └── UIWebViewWebGL ├── UIWebViewWebGL-Info.plist ├── UIWebViewWebGL-Prefix.pch ├── WGLAppDelegate.h ├── WGLAppDelegate.m ├── WebGL.html ├── en.lproj └── InfoPlist.strings └── main.m /UIWebViewWebGL.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | D89DC61D14592F50000FC7C6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D89DC61C14592F50000FC7C6 /* UIKit.framework */; }; 11 | D89DC61F14592F50000FC7C6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D89DC61E14592F50000FC7C6 /* Foundation.framework */; }; 12 | D89DC62114592F50000FC7C6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D89DC62014592F50000FC7C6 /* CoreGraphics.framework */; }; 13 | D89DC62714592F50000FC7C6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D89DC62514592F50000FC7C6 /* InfoPlist.strings */; }; 14 | D89DC62914592F50000FC7C6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D89DC62814592F50000FC7C6 /* main.m */; }; 15 | D89DC62D14592F50000FC7C6 /* WGLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D89DC62C14592F50000FC7C6 /* WGLAppDelegate.m */; }; 16 | D89DC634145931B3000FC7C6 /* WebGL.html in Resources */ = {isa = PBXBuildFile; fileRef = D89DC633145931B3000FC7C6 /* WebGL.html */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | D89DC61814592F50000FC7C6 /* UIWebViewWebGL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIWebViewWebGL.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | D89DC61C14592F50000FC7C6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 22 | D89DC61E14592F50000FC7C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 23 | D89DC62014592F50000FC7C6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 24 | D89DC62414592F50000FC7C6 /* UIWebViewWebGL-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIWebViewWebGL-Info.plist"; sourceTree = ""; }; 25 | D89DC62614592F50000FC7C6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 26 | D89DC62814592F50000FC7C6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 27 | D89DC62A14592F50000FC7C6 /* UIWebViewWebGL-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIWebViewWebGL-Prefix.pch"; sourceTree = ""; }; 28 | D89DC62B14592F50000FC7C6 /* WGLAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGLAppDelegate.h; sourceTree = ""; }; 29 | D89DC62C14592F50000FC7C6 /* WGLAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGLAppDelegate.m; sourceTree = ""; }; 30 | D89DC633145931B3000FC7C6 /* WebGL.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = WebGL.html; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | D89DC61514592F50000FC7C6 /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | D89DC61D14592F50000FC7C6 /* UIKit.framework in Frameworks */, 39 | D89DC61F14592F50000FC7C6 /* Foundation.framework in Frameworks */, 40 | D89DC62114592F50000FC7C6 /* CoreGraphics.framework in Frameworks */, 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXFrameworksBuildPhase section */ 45 | 46 | /* Begin PBXGroup section */ 47 | D89DC60D14592F4F000FC7C6 = { 48 | isa = PBXGroup; 49 | children = ( 50 | D89DC62214592F50000FC7C6 /* UIWebViewWebGL */, 51 | D89DC61B14592F50000FC7C6 /* Frameworks */, 52 | D89DC61914592F50000FC7C6 /* Products */, 53 | ); 54 | indentWidth = 2; 55 | sourceTree = ""; 56 | tabWidth = 2; 57 | }; 58 | D89DC61914592F50000FC7C6 /* Products */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | D89DC61814592F50000FC7C6 /* UIWebViewWebGL.app */, 62 | ); 63 | name = Products; 64 | sourceTree = ""; 65 | }; 66 | D89DC61B14592F50000FC7C6 /* Frameworks */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | D89DC61C14592F50000FC7C6 /* UIKit.framework */, 70 | D89DC61E14592F50000FC7C6 /* Foundation.framework */, 71 | D89DC62014592F50000FC7C6 /* CoreGraphics.framework */, 72 | ); 73 | name = Frameworks; 74 | sourceTree = ""; 75 | }; 76 | D89DC62214592F50000FC7C6 /* UIWebViewWebGL */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | D89DC62B14592F50000FC7C6 /* WGLAppDelegate.h */, 80 | D89DC62C14592F50000FC7C6 /* WGLAppDelegate.m */, 81 | D89DC633145931B3000FC7C6 /* WebGL.html */, 82 | D89DC62314592F50000FC7C6 /* Supporting Files */, 83 | ); 84 | path = UIWebViewWebGL; 85 | sourceTree = ""; 86 | }; 87 | D89DC62314592F50000FC7C6 /* Supporting Files */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | D89DC62414592F50000FC7C6 /* UIWebViewWebGL-Info.plist */, 91 | D89DC62514592F50000FC7C6 /* InfoPlist.strings */, 92 | D89DC62814592F50000FC7C6 /* main.m */, 93 | D89DC62A14592F50000FC7C6 /* UIWebViewWebGL-Prefix.pch */, 94 | ); 95 | name = "Supporting Files"; 96 | sourceTree = ""; 97 | }; 98 | /* End PBXGroup section */ 99 | 100 | /* Begin PBXNativeTarget section */ 101 | D89DC61714592F50000FC7C6 /* UIWebViewWebGL */ = { 102 | isa = PBXNativeTarget; 103 | buildConfigurationList = D89DC63014592F50000FC7C6 /* Build configuration list for PBXNativeTarget "UIWebViewWebGL" */; 104 | buildPhases = ( 105 | D89DC61414592F50000FC7C6 /* Sources */, 106 | D89DC61514592F50000FC7C6 /* Frameworks */, 107 | D89DC61614592F50000FC7C6 /* Resources */, 108 | ); 109 | buildRules = ( 110 | ); 111 | dependencies = ( 112 | ); 113 | name = UIWebViewWebGL; 114 | productName = UIWebViewWebGL; 115 | productReference = D89DC61814592F50000FC7C6 /* UIWebViewWebGL.app */; 116 | productType = "com.apple.product-type.application"; 117 | }; 118 | /* End PBXNativeTarget section */ 119 | 120 | /* Begin PBXProject section */ 121 | D89DC60F14592F4F000FC7C6 /* Project object */ = { 122 | isa = PBXProject; 123 | attributes = { 124 | LastUpgradeCheck = 0420; 125 | ORGANIZATIONNAME = "Nathan de Vries"; 126 | }; 127 | buildConfigurationList = D89DC61214592F4F000FC7C6 /* Build configuration list for PBXProject "UIWebViewWebGL" */; 128 | compatibilityVersion = "Xcode 3.2"; 129 | developmentRegion = English; 130 | hasScannedForEncodings = 0; 131 | knownRegions = ( 132 | en, 133 | ); 134 | mainGroup = D89DC60D14592F4F000FC7C6; 135 | productRefGroup = D89DC61914592F50000FC7C6 /* Products */; 136 | projectDirPath = ""; 137 | projectRoot = ""; 138 | targets = ( 139 | D89DC61714592F50000FC7C6 /* UIWebViewWebGL */, 140 | ); 141 | }; 142 | /* End PBXProject section */ 143 | 144 | /* Begin PBXResourcesBuildPhase section */ 145 | D89DC61614592F50000FC7C6 /* Resources */ = { 146 | isa = PBXResourcesBuildPhase; 147 | buildActionMask = 2147483647; 148 | files = ( 149 | D89DC62714592F50000FC7C6 /* InfoPlist.strings in Resources */, 150 | D89DC634145931B3000FC7C6 /* WebGL.html in Resources */, 151 | ); 152 | runOnlyForDeploymentPostprocessing = 0; 153 | }; 154 | /* End PBXResourcesBuildPhase section */ 155 | 156 | /* Begin PBXSourcesBuildPhase section */ 157 | D89DC61414592F50000FC7C6 /* Sources */ = { 158 | isa = PBXSourcesBuildPhase; 159 | buildActionMask = 2147483647; 160 | files = ( 161 | D89DC62914592F50000FC7C6 /* main.m in Sources */, 162 | D89DC62D14592F50000FC7C6 /* WGLAppDelegate.m in Sources */, 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXSourcesBuildPhase section */ 167 | 168 | /* Begin PBXVariantGroup section */ 169 | D89DC62514592F50000FC7C6 /* InfoPlist.strings */ = { 170 | isa = PBXVariantGroup; 171 | children = ( 172 | D89DC62614592F50000FC7C6 /* en */, 173 | ); 174 | name = InfoPlist.strings; 175 | sourceTree = ""; 176 | }; 177 | /* End PBXVariantGroup section */ 178 | 179 | /* Begin XCBuildConfiguration section */ 180 | D89DC62E14592F50000FC7C6 /* Debug */ = { 181 | isa = XCBuildConfiguration; 182 | buildSettings = { 183 | ALWAYS_SEARCH_USER_PATHS = NO; 184 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 185 | CODE_SIGN_IDENTITY = "iPhone Developer"; 186 | COPY_PHASE_STRIP = NO; 187 | GCC_C_LANGUAGE_STANDARD = gnu99; 188 | GCC_DYNAMIC_NO_PIC = NO; 189 | GCC_OPTIMIZATION_LEVEL = 0; 190 | GCC_PREPROCESSOR_DEFINITIONS = ( 191 | "DEBUG=1", 192 | "$(inherited)", 193 | ); 194 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 195 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 196 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 197 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 198 | GCC_WARN_UNUSED_VARIABLE = YES; 199 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 200 | PROVISIONING_PROFILE = ""; 201 | SDKROOT = iphoneos; 202 | }; 203 | name = Debug; 204 | }; 205 | D89DC62F14592F50000FC7C6 /* Release */ = { 206 | isa = XCBuildConfiguration; 207 | buildSettings = { 208 | ALWAYS_SEARCH_USER_PATHS = NO; 209 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 210 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 211 | COPY_PHASE_STRIP = YES; 212 | GCC_C_LANGUAGE_STANDARD = gnu99; 213 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 214 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 215 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 216 | GCC_WARN_UNUSED_VARIABLE = YES; 217 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 218 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 219 | SDKROOT = iphoneos; 220 | VALIDATE_PRODUCT = YES; 221 | }; 222 | name = Release; 223 | }; 224 | D89DC63114592F50000FC7C6 /* Debug */ = { 225 | isa = XCBuildConfiguration; 226 | buildSettings = { 227 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 228 | GCC_PREFIX_HEADER = "UIWebViewWebGL/UIWebViewWebGL-Prefix.pch"; 229 | INFOPLIST_FILE = "UIWebViewWebGL/UIWebViewWebGL-Info.plist"; 230 | PRODUCT_NAME = "$(TARGET_NAME)"; 231 | WRAPPER_EXTENSION = app; 232 | }; 233 | name = Debug; 234 | }; 235 | D89DC63214592F50000FC7C6 /* Release */ = { 236 | isa = XCBuildConfiguration; 237 | buildSettings = { 238 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 239 | GCC_PREFIX_HEADER = "UIWebViewWebGL/UIWebViewWebGL-Prefix.pch"; 240 | INFOPLIST_FILE = "UIWebViewWebGL/UIWebViewWebGL-Info.plist"; 241 | PRODUCT_NAME = "$(TARGET_NAME)"; 242 | WRAPPER_EXTENSION = app; 243 | }; 244 | name = Release; 245 | }; 246 | /* End XCBuildConfiguration section */ 247 | 248 | /* Begin XCConfigurationList section */ 249 | D89DC61214592F4F000FC7C6 /* Build configuration list for PBXProject "UIWebViewWebGL" */ = { 250 | isa = XCConfigurationList; 251 | buildConfigurations = ( 252 | D89DC62E14592F50000FC7C6 /* Debug */, 253 | D89DC62F14592F50000FC7C6 /* Release */, 254 | ); 255 | defaultConfigurationIsVisible = 0; 256 | defaultConfigurationName = Release; 257 | }; 258 | D89DC63014592F50000FC7C6 /* Build configuration list for PBXNativeTarget "UIWebViewWebGL" */ = { 259 | isa = XCConfigurationList; 260 | buildConfigurations = ( 261 | D89DC63114592F50000FC7C6 /* Debug */, 262 | D89DC63214592F50000FC7C6 /* Release */, 263 | ); 264 | defaultConfigurationIsVisible = 0; 265 | defaultConfigurationName = Release; 266 | }; 267 | /* End XCConfigurationList section */ 268 | }; 269 | rootObject = D89DC60F14592F4F000FC7C6 /* Project object */; 270 | } 271 | -------------------------------------------------------------------------------- /UIWebViewWebGL/UIWebViewWebGL-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFiles 12 | 13 | CFBundleIdentifier 14 | com.atnan.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /UIWebViewWebGL/UIWebViewWebGL-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'UIWebViewWebGL' target in the 'UIWebViewWebGL' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iOS SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /UIWebViewWebGL/WGLAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGLAppDelegate.h 3 | // UIWebViewWebGL 4 | // 5 | // Created by Nathan de Vries on 27/10/11. 6 | // Copyright (c) 2011 Nathan de Vries. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WGLAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /UIWebViewWebGL/WGLAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGLAppDelegate.m 3 | // UIWebViewWebGL 4 | // 5 | // Created by Nathan de Vries on 27/10/11. 6 | // Copyright (c) 2011 Nathan de Vries. All rights reserved. 7 | // 8 | 9 | #import "WGLAppDelegate.h" 10 | 11 | @implementation WGLAppDelegate 12 | 13 | @synthesize window=_window; 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 16 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 17 | 18 | // Class ADWebView = NSClassFromString(@"ADWebView"); 19 | // UIWebView* webView = (UIWebView *)[[[ADWebView alloc] initWithFrame:self.window.bounds] autorelease]; 20 | // [webView setWebGLEnabled:YES]; 21 | 22 | UIWebView* webView = [[[UIWebView alloc] initWithFrame:self.window.bounds] autorelease]; 23 | 24 | id webDocumentView = [webView performSelector:@selector(_browserView)]; 25 | id backingWebView = [webDocumentView performSelector:@selector(webView)]; 26 | [backingWebView _setWebGLEnabled:YES]; 27 | 28 | NSString* htmlPath = [[NSBundle mainBundle] pathForResource:@"WebGL" ofType:@"html"]; 29 | NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]; 30 | [webView loadRequest:request]; 31 | 32 | UIViewController* viewController = [[[UIViewController alloc] init] autorelease]; 33 | viewController.view = webView; 34 | 35 | self.window.rootViewController = viewController; 36 | [self.window makeKeyAndVisible]; 37 | 38 | return YES; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /UIWebViewWebGL/WebGL.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 46 | 47 | 224 | 225 | 236 | 237 | 251 | 252 | 253 | 587 | 588 | 589 | 590 | 591 | -------------------------------------------------------------------------------- /UIWebViewWebGL/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /UIWebViewWebGL/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UIWebViewWebGL 4 | // 5 | // Created by Nathan de Vries on 27/10/11. 6 | // Copyright (c) 2011 Nathan de Vries. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "WGLAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([WGLAppDelegate class])); 17 | } 18 | } 19 | --------------------------------------------------------------------------------