Initial WebGL Support Lands In WebKit 181
appleprophet writes "WebGL is an upcoming standard from the Khronos Group, the same standards body behind OpenCL and OpenGL ES. It defines the use of OpenGL in websites using the standard canvas element. In other words, websites will be able to render hardware accelerated, 3D graphics natively inside of a web page. In the last week, WebKit, the rendering engine behind Safari and Google Chrome, has added initial support for WebGL, which means it probably won't be too long before Macs and iPhones everywhere get OpenGL web apps. This could have big implications for gaming. HTML5 has steadily been encroaching on desktop applications' territory, but I don't think many people expected browser-based, hardware-accelerated graphics this soon."
That's a Bit Optimistic Don't You Think? (Score:4, Interesting)
but I don't think many people expected browser-based, hardware-accelerated graphics this soon
This is great for WebKit and I'm very interested to see where this goes. But you're kidding yourself with that above statement. Firefox is using Gecko and we all know IE will drag their feet on this. So you're proposing a company invest time into a "browser-based hardware-accelerated" graphics game or program by using WebGL ... when it's only supported on the two smallest browser shares out there? Unless there's a way to auto-port existing OpenGL code to WebGL (and the press release didn't seem to imply that), I wouldn't hold my breath. Even if tomorrow Firefox is ready to go with WebGL in Gecko, you've got a long adoption and incubation time on these projects and you'd still be targeting the minority of browsers.
... it just isn't at that point or even guaranteed to happen yet.
Basically I don't see a good business case or success story coming out of using WebGL over OpenGL or even just dumbing down the graphics and making it something that's widely supported already like Flash. Nothing would make me happier than to see this take off and be the de facto route for putting your game on everything with a browser
Re:That's a Bit Optimistic Don't You Think? (Score:4, Interesting)
How about the browser with the biggest share of the mobile phone market - a market where you've notably got no competition from flash games?
Download for WebGL on Linux yet? (Score:2, Interesting)
Would building the changes into epiphany or midori work?
I've also tried firefox's canvas3D, but haven''t gotten that to work yet.
Hopefully the WebGL api will be available from the python plugin in firefox. That would still require a plugin to download, but at least there would be a nice 3D web platform to develop in. (yeah, javascript is ok, but it's not great)
Re:That's a Bit Optimistic Don't You Think? (Score:2, Interesting)
How about the browser with the biggest share of the mobile phone market - a market where you've notably got no competition from flash games?
If you're targeting just one phone, fine. But you might as well just use the iPhone SDK so you don't have code all the touch interaction crap from scratch. If you coded it in WebGL what is the bonus that you got from doing that? That everyone who uses Opera on their desktops can play a game designed with the iPhone screen and multi-touch in mind? Again, you'd be pretty darn ignorant to go with WebGL over iPhone SDK.
How will we manage to use this? (Score:2, Interesting)
How will we manage to use this? Programatically by Javascript, right? Javascript is so limited that I fail to see how it will be to make this actually usable and applicable in useful situations except, as already mentioned before, in heavier and more intrusive advertising schemes.
I understand that many may have been craving for this, but, to make it really interesting, Javascript also needs some cleanup and some more functionality.
And, besides, I can already imagine each browser doing it in it's own way and developers having to set up multiple ways to deal with the differences.
And whatever happened to VRML and X3D? weren't they supposed to also provide such features as WebGL?
Re:Browsers might be ready for GL but not Javascri (Score:3, Interesting)
Invariably these games use 99% of the CPU because Javascript doesn't have a real sleep() function.
setTimeout doesn't work? Or setInterval, if you're going for a specific framerate?
There's no decent way to manipulate sounds (like an FMOD for javascript).
You could play them with the audio tag. I guess the question is whether you can actually manipulate beyond play, pause, seek, and volume... Then again, it doesn't take much more than that to start to do 3D.
There's no way to switch to full screen
I agree, this should be addressed. Actually, I have some ideas of how a browser might implement this, if you're interested.
or to capture every key stroke/mouse movement.
No, but you can capture enough of them to make a game.
there's no decent debugger.
Firebug isn't "decent"?
3D games sound like a nice idea but they'll be prohibitively expensive (time-wise) to develop, suffer bizarre bottlenecks not seen in native code, and have to work through the very limited browser interface.
Granted. On the other hand, they'll be more accessible, they'll have access to the browser (and navigation, bookmarks, etc), and I know of no other platform where I could imagine clicking a link on a webpage and being inside a game in less than a second.
Re:Ads (Score:2, Interesting)
An "underpowered GMA chipsets" can still run stuff like Morrowind fine. Are you suggesting that advertisers are going to be writing complex 3D engines of a level comparable to say, Crysis?
And if it sucks, all they have to do is disable the OpenGL web plugin. Yeah, I'm sure they're real "suckers" for not being able to see adverts! The only suckers are people who think they have to buy a high end jet-powered graphics card just in order to do web browsing.
Re:Browsers might be ready for GL but not Javascri (Score:3, Interesting)
You're doing it wrong (TM). I am working on a game right now, 2 months so far, which has animations and other eye candy and uses no where near 100% CPU on a 4 year old core2duo laptop. It looks like the original Legend of Zelda on the NES or FF 1-6. http://www.cindervale.com/ [cindervale.com]
What people don't realize is that you don't need the canvas element. If you use the canvas element, you are defeating the purpose of a web game since the web is all about accessibility. In a few years, yes, use it heavily! By using the canvas, you create an artificial barrier to entry for your players by saying "your must be on the bleeding edge to play."
There's no decent way to manipulate sounds
100% agreed! Hell, you can't even use MIDIs anymore!
There's no way to switch to full screen or to capture every key stroke/mouse movement.
I can't think of a single key on normal keyboard that can't be captured. Shift, alt, control, etc are all capturable. Mouse movement is the same.
As far as full screen, have the user press F11. All browsers I'm aware of use this same binding. Then use a bit of JS to get the desktop resolution and the window dimensions to verify.
It seems that what you are experiencing is game design problems. Try designing games with the limitations in mind rather than trying to design a game then making it fit with the technology.
Re:That's a Bit Optimistic Don't You Think? (Score:4, Interesting)
If you're targeting just one phone, fine. But you might as well just use the iPhone SDK so you don't have code all the touch interaction crap from scratch. [snip] you'd be pretty darn ignorant to go with WebGL over iPhone SDK.
If you look at the trac logs for this checkin, you'll see that the commiter has an apple.com email address. So it's probably safe to say that implementing this fits in with Apple's dev tools strategy.
I don't know a lot about OpenGL or WebGL, but it does feel like it overlaps a lot with what Flash and Silverlight provide. I'm not sure what conclusion to draw from that, but it seems notable to me.
Re:To answer my own question... (Score:4, Interesting)
Damn. I forgot the conclusion: That Adobe might (have to) let Flash die, and create that new product based on the new faster JavaScript engines and that 3D canvas straight away.
It is time to split... (Score:3, Interesting)
the web into two very distinct flavors:
It finally came down to this (Score:2, Interesting)
So, after many failures, this is where we are today. The graphics guys (Khronos) are saying, "Stop trying to make something fancy, just put OpenGL in the browser." And the web guys (Webkit) are saying, "Okay, fine."
The reason why this is different, and more dramatic, than previous attempts is due to the fundamental place that OpenGL occupies in the graphics world. There are dozens of better and more specialized ways of doing graphics, but OpenGL is the most widely known and widely spread. To put it colorfully, OpenGL is our last line of defense.
Therefore, this has to work. If this doesn't work, then there is no hope for 3D on the web. Which is silly.