5 ms·
Learning WebGL
- mshafrir 16y agoSite is down for now.
- bauchidgw 16y agohttp://webcache.googleusercontent.com/search?q=cache:y59IaD3jsv0J:learningwebgl.com/blog/%3Fpage_id%3D1217+http://learningwebgl.com/blog/%3Fpage_id%3D1217&cd=1&hl=en&ct=clnk&client=safari&source=www.google.com http://webcache.googleusercontent.com/search?q=cache:y59IaD3... google cache
- AshleysBrain 16y agoNice, but until Microsoft support WebGL, it doesn't seem like it'll ever be that useful...
- kaib 16y agoLet me disagree. Within certain demographics, high tech loving makers, you can sometimes get away with using WebGL: http://tinkercad.com http://tinkercad.com Our stats indicate the IE is much less of a problem than expected.
- marshray 16y agoBy that logic, until Microsoft supports Android and iPhone they will never be useful.
- chc 16y agoI think the GP is wrong, but that's a very unfair characterization. A website is not cognate with a mobile phone OS.
- marshray 16y agoYou're right of course - it's not that great of a comparison. On the other hand, have you looked into modern UI architectures? Particularly on mobiles, they look a lot like operating systems aspiring to be web sites...
- melling 16y agoI would think most WebGL apps would apply mainly to entertainment, which people will do at home. Home users can simply be directed to download a browser that supports WebGL. They are all free.
- forgottenpaswrd 16y agoYeah because MS is necessary for anything... Oh wait, Android, Opera, Chrome(>10%market share), Firefox(at least 20%market share), Safari and iOS... people now can make a living without caring for what MS does or not, just add "You need a standards compliant browser" with links and care only for the people that does. MS is using this trick with Hotmail: You need IE version X to benefit from the amazing features hotmail has.
- corysama 16y agoUseful for what? Grandparents and stuffy offices stick to IE, but the majority technical users are running FF/Chrome/Safari/Opera. It would be a bad idea to write a B2B or photosharing app that requires WebGL. But, games, art, visualization and optional site-bling can benefit a great deal. Like most new tech, it's a good plan to target techies first and let the late adopters come in after the kinks have been worked out. Even though the spec has hit 1.0, the dust hasn't nearly settled on the implementations. Lots of demos only work on specific browsers or have been broken by browser updates. Meanwhile, MS is apparently extremely devoted to not breaking sites that used to work when they put out new updates. I'm personally OK with MS waiting until WebGL solidifies before putting out their first implementation (hopefully...).
- nkassis 16y agoUseful enough for me and my crowd (Neuroscientist). I've not had many users complain (none actually) that they had to install Firefox or Chrome. Mainly because the tools we useful enough that the effort was worth it to them. I think if the games and toys are enough fun, people won't care that they have to run it in a different browser. Hell look at how many people buy new computers just to run the latest games. 3D on the web in my mind will be most useful for games and I believe scientific visualization and engineering applications which are usually people who don't care about installing a different browsers.
- palish 16y agoHow do you "install" a game? For example, let's say you have 150MB of art assets. You wouldn't want players to have to re-download the assets each time they go to play. So how would you cache: 1) a texture, 2) a vertex+index buffer?
- lilli 16y agoCheck out the HTML5 LocalFileSystem APIs. They aren't widely available yet (Chrome 9+, behind a flag) but they are exactly what you want for this kind of thing. http://www.html5rocks.com/tutorials/file/filesystem/ http://www.html5rocks.com/tutorials/file/filesystem/
- lilli 16y agoAlso, I should mention Application Cache (5MB local storage). Very useful for static game assets: http://www.html5rocks.com/tutorials/appcache/beginner/ http://www.html5rocks.com/tutorials/appcache/beginner/
- chc 16y agoEh, it's moderately useful. 5 MB is nothing these days — that's smaller than the L3 cache on a modern processor. If your game is only 5 MB, you hardly even need caching.
- maggit 16y agoThe browser caches assets like that automatically. Alternatively, if you want to have a more install-like install, you might have luck with local storage: http://diveintohtml5.org/storage.html http://diveintohtml5.org/storage.html Local storage seems to currently max out at 5 MB, but that's easy for the browser vendors to change if they see the need.
- azakai 16y agoYou can't rely on the browser cache, it is limited in size and depends on other websites as well. Localstorage is useful, but as you say limited. The real solution is IndexedDB. Partial (but useful already) support is in Firefox and Chrome. Other browsers are expected to follow soon.
- DanielRibeiro 16y agoDuplicated: http://news.ycombinator.com/item?id=1248500 http://news.ycombinator.com/item?id=1248500
- nkassis 16y agoThat's more than a year old. This site is worthy of repost.
- sycren 16y agoI cannot wait for WebCL to be released as well, in the mean time how would you suggest using the image buffer in WebGL to help simulate many complicated particles?
- nkassis 16y agoYeah WebCL will be really useful at least for what I'm doing. I know they have a private list right now, hopefully they will open it up soon. One issue with WebCL is the device support. WebGL is capable of running of pretty much anything but WebCL (unless they decide to make a fake software version for system who don't support it in hardware) is going to be limited to a small subset of clients for a while.
- silentOpen 16y agoThe most important pragmatic capability missing from WebGL that limits its usefulness for more general-purpose compute is read-out of floating point values from renderbuffers. It was decided by the WebGL standards body to not support this as it is not supported by vanilla OpenGL ES 2 and therefore might disenfranchise Khronos members' mobile products and/or fragment the WebGL ecosystem. I don't know if you've noticed, but most WebGL users are on personal computers and not mobile devices. The only mobile implementation I've seen is FF4Mobile and it's quite inadequate for all but the simplest WebGL programs. Most PC GPUs have had floating point readback for a few years now. Additionally, the irony of the situation is that ALL of JS numbers are doubles and ALL OpenGL ES 2 GPUs use floating point internally. It is really only the standards that have not caught up and force devs to do int-float conversion across the GPU boundary. Add to this the performance constraints of 3d rendering and any sane dev will want to do as little in JS and as much in GLSL (on GPU) as possible. I asked Kenneth Russell, the Chrome WebGL lead, about floating point readback support at GDC and I was told that I'd "just have to do the pee-pee dance". With this single capability, many tasks "needing" WebCL become possible with WebGL. OES_texture_float (according to WG members) only allows loading float textures, not reading out of them. I wonder if Adobe and Microsoft know to use floating point for GPU computing? Here's hoping that a little competition fixes this blatant oversight.