5 ms·
Enabling & using WebGL on iOS 4.2+
- object2dot0 15y agowow, great this opens up endless possibilities :)
- pistachiopro 15y agoHas Apple stated any plans to continue developing WebGL for iOS? It seems like the kind of thing that could compete with their app business.
- atnan 15y agoThe argument that WebGL "competes" with OpenGL-ES, to the detriment of Apple, makes very little sense to me. You only need to look at the number of engineers Apple has contributing to WebKit & new web standards (CSS transitions & animations, WebGL etc.).
- lloeki 15y agoOn the other hand it's a serious feature of their iAd business.
- irrationalfab 15y agoAs an iOS developer I feel that native apps will have a technical edge for a while. WebApps are built with tools that weren't designed for creating GUIs, you can do it but it is much less efficient and effective. This is especially true for complex applications like games (the ones that would benefit the most from webGL).
- cschep 15y agoWould love to see more about how to read that disassembly and piece all that together.. I'm impressed!
- alastairpat 15y agoPerhaps more interesting than WebGL is actually him documenting the process that he took in figuring out how it worked. I really wish I had a better understanding of disassembly.
- dolbz 15y agoYeah I would love to see more of this type of analysis. It's really revealing and interesting.
- irrationalfab 15y agoI feel the same. I would love to understand a bit more of what is going on under the hood. I did a quick research but I could not find something quick enough to work as a primer. The best resources I found are: https://developer.apple.com/library/ios/#technotes/tn2239/_index.html https://developer.apple.com/library/ios/#technotes/tn2239/_i... http://stackoverflow.com/questions/25636/what-is-the-best-way-to-learn-assembly-specifically-for-someone-who-has-experi http://stackoverflow.com/questions/25636/what-is-the-best-wa...
- alastairpat 15y agoThose are both really interesting, thanks. I'm really embarrassed to admit I have very little understanding of what happens below Objective-C. Looks like it's time for me to start reading…
- atnan 15y agoTN2239 is invaluable for debugging and digging through things you shouldn't necessarily be poking around in :-)
- ryanpetrich 15y agoGreat work atnan. Cat's out of the bag, may as well make public my experiment to enable WebGL on all webviews: https://github.com/rpetrich/WebGLEnabler https://github.com/rpetrich/WebGLEnabler
- atnan 15y agoHi Ryan, That's pretty neat! An unfortunate side effect is that running Mobile Safari unsigned negates the 'dynamic-codesigning' entitlement, which means that Nitro is disabled. That said, a WebGL-enabled UIWebView running in your own app will also not be Nitro-enabled. I've run the PhiloGL spinning world demo on my device and it's running at 40fps, so simpler demos may be possible without a Nitro to boost things a bit. Cheers, Nathan
- JoshTriplett 15y agoGiven that WebKit has support for WebM, I wonder how much work it would take to do the same kind of hack to enable WebM support for the video tag? (More, I suspect, since iOS probably doesn't ship the required libraries.)
- atnan 15y agoFor that you'd probably want to dig into WebKit.framework — the private WebPluginController & WebPluginDatabase classes look rather interesting.
- geuis 15y agoJust as a reminder, if you link against any private api or framework in and app and submit it to the App Store, your app will be denied. You may get lucky and have your app slip through, but expect that at any time it will get removed from the store.
- alex_unstable 15y agohey atnan, great article, very insightful, congrats. Seems like Apple has put a lot of effort on improving UIWebviews, there is more than just Nitro, apparently. I strongly believe the whole HTML5 standard is supported on iOS5 but it has to be enabled. Did anyone notice the SQLite database that's created everytime you use a UIWebview? I've been trying to enable offline navigation and got kinda stuck but this gives me a couple of good new ideas. Cheers, Alex
- robterrell 15y agoSafari and MobileSafari support HTML5 local storage: http://developer.apple.com/library/safari/#codinghowtos/Desktop/DataManagement/_index.html http://developer.apple.com/library/safari/#codinghowtos/Desk... There's nothing you have to do to enable it. Except use it.
- alex_unstable 15y agoI does work on MobileSafari but not on UIWebviews. There's a key called "WebKitOfflineWebApplicationCacheEnabled" that's automatically set to YES but it doesn't seem make any difference. I'm trying to find out why, but for that I need to go down to the dungeons of Apple's private frameworks and there is where I'm struggling at the moment.
- fashionfshi 15y agoeverybody, the good shoping place, the new season approaching, click in. Welcome to ==== http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com == Air Jordan (1-24) shoes $35 UGG BOOT $50 Nike shox (R4, NZ, OZ, TL1, TL2, TL3) $35 Handbags ( Coach Lv fendi D&G) $35 T-shirts (polo, ed hardy, lacoste) $16 Jean (True Religion, ed hardy, coogi)$34 Sunglasses ( Oakey, coach, Gucci, Armaini)$15 New era cap $16 Bikini (Ed hardy, polo) $18 FREE SHIPPING http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com ===( http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com ) ===( http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com )=== ==( http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com )=== ===( http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com )=== ===( http://www.fashion-long-4biz.com http://www.fashion-long-4biz.com )===
- funkaster 15y agoI just tried running the code in an iPhone 4 with iOS 4.3.5 - got a invalid selector (_setWebGLEnabled). Worked just fine with an iTouch 4gen with iOS 5 though... Has anyone tested this on a device with iOS 4.2+?
- brettgo1 15y agoSomebody at Apple should hire this Aussie!
- marcinignac 15y agoI put some video going through few WebGL enabled websites and it's looks very promising http://vimeo.com/31644717 http://vimeo.com/31644717 The JavaSript performance itself for example in mesh building is really terrible. Trying to benchmark it against Nitro in normal Mobile Safari would be a good thing to do.