Initial WebGL Support Lands In WebKit
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."
While I'm sure there are some great uses for this, it also sounds like a way to serve even more resource-hungry adverts than they can with Flash. Furthermore, if this became widespread in situations not really requiring it, a decent graphics card could essentially become a requirement for web surfing.
# cat
Damn, my RAM is full of llamas.
Why is this necessary? There are some positive uses for it (such as getting us out of dependence on proprietary technologies like Flash) but a lot more negative issues. For one, this will add even more vulnerabilities to browsers which seem to already have loads of them. And for another the web should be accessible for -everyone- from the low-end netbook to a Core i7, and even older systems should be able to browse web. Already many sites are unusable without a recent version of Flash, we don't need extra hardware as requirements to view sites. Yeah, we all know that they should do it in HTML and that will still stick around, but how many of us have encountered sites built entirely in Flash? Or have a requirement of Flash for simple things like navigation? While some things obviously need Flash (such as Homestar Runner because they are Flash cartoons) others use Flash for no real reason. Currently most platforms have Flash or will be getting it. But adding a high-end graphics card to a computer just to view the web? Thats just a bit ridiculous.
Taxation is legalized theft, no more, no less.
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
My work here is dung.
I've written a few games using the 2D canvas element. Invariably these games use 99% of the CPU because Javascript doesn't have a real sleep() function. There's no decent way to manipulate sounds (like an FMOD for javascript). Tests on my machine show that changing the line/fill color is expensive. There's no way to switch to full screen or to capture every key stroke/mouse movement. All of which is beside the really big issue: there's no decent debugger.
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. While Assembly demo coders might enjoy the challenge of working in such a limited environment, the rest of the world should wait for some real improvements.
Quake live (and similar apps) require you to download a plugin.
Ideally, webGL will eventually be included in browsers so any webpage could use accelerated GL without requiring you to download a plugin first. (I'm not an expert, this is just what I've gathered so far, corrections are welcome).
Quake Live requires you to download a plugin -- and it's a specific plugin, for a specific game (Quake Live).
WebGL, or O3D -- maybe they're the same thing? Anyway, both are planned to be either a plugin, or actually included in the browser. And they're just a 3D API -- it means that once you have this plugin, any game will work.
So, kind of like Flash is for crappy 2D games, only actually an open standard, and with decent cross-platform support.
My question was, WebGL and O3D seem to have identical goals. Is there a difference?
Don't thank God, thank a doctor!
Here's a nice summary.
It seems O3D is higher-level, thus allowing more to be handled by the browser, whereas WebGL forces Javascript to handle just about everything.
I'm not sure which one I like better. In theory, I like Javascript handling everything. In practice, I don't know enough about VMs to say whether Javascript could be made to perform well enough.
Don't thank God, thank a doctor!
The point is that nobody really cares all that much about what you do, as the web industry does not revolve around you.
Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
It there any browser to download that will let us try out WebGL on linux yet?
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)
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.
Don't thank God, thank a doctor!
but oh god no! I can only imagine the horrors that will be visited upon the Internet once MySpace users get a hold of this.
I may agree with what you say, but I will defend to the death your right to face the consequences of saying it.
This is about Try #4 for 3D on the Web. Web3D was an XML representation of VRML. Unfortunately, the effect of the Web3D consortium was to kill VRML in favor of a vaporware concept.
3D in the browser is done well in Macromedia Shockwave. Try this 3D driving game. The Shockwave player is supposedly available on 58% of PCs. Some versions of Shockwave even had the Havok physics engine, but Macromedia stopped paying Havok for the license and took that out.
The main problem with Shockwave is that it doesn't start as fast as Flash does. Flash has a nice scheme for interleaving the timeline and the asset data, so that playing starts very quickly. At least if the content is authored properly. Also, Shockwave authoring tools are expensive.
About Java 3D, the less said, the better.
The problem with offering OpenGL access to Javascript is that Javascript isn't a good language for fast matrix math. Also, authoring tools will have to be developed. You can't effectively author 3D content in a text editor.
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/
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.
This is the Internet. You can say "fuck" here. - AC
But adding a high-end graphics card to a computer just to view the web? Thats just a bit ridiculous.
Equally ridiculous is the suggestion that you need a "high-end graphics card" to run OpenGL. This isn't 1998 anymore.
Also ridiculous is the suggestion that this will be mandatory for web pages in general. You might as well claim that Google maps shouldn't exist, because good webpages ought to be viewable in Lynx. Or that YouTube shouldn't exist, because webpages ought to be viewable on computers with small amounts of CPU power. Or that Java shouldn't be allowed, because someone could write an application that uses a lot of your CPU power.
There's nothing wrong with having extra technologies when they're needed - such as someone doing an online game. Yes, it'll be stupid if someone requires a 3D card for what should be a simple webpage, but that's no different to them using Flash, or any other kind of CPU-hungry code. It's 2009 - 3D hardware support has been bog standard for years, and isn't any different to a website that requires a lot of CPU or RAM. Just as any computer these days has the CPU power to decode a YouTube video, they also have the GPU power to run OpenGL. Yes, someone could write an annoying webpage that sucked up your GPU power, but they could have done that to your CPU power for over a decade with Java.
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 [snip] Javascript also needs some cleanup and some more functionality.
Like what? It's a very rich language which is a pleasure to use. The historical short-coming has been it's libraries (primarily the DOM). But the language itself is really nice, as nearly anyone with enough experience will tell you.
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.
This is the case with all standards. If there are significant implementation errors, higher-level libraries will emerge that "fix" them for the users of this API. Ajax is different between browsers, is this a problem for anyone? No, there are multiple free libraries that are super-simple to use that make the right call in each browser. $.ajax({url: "foo.html"}); Just Works (tm).
There aint no pancake so thin it doesn't have two sides.
While Assembly demo coders might enjoy the challenge of working in such a limited environment, the rest of the world should wait for some real improvements.
Most of your complaints have been addressed in other modules of HTML5. See the media module for native sound support and web workers for threading support.
Regarding debuggers, there are a few excellent debuggers for JavaScript capable of profiling and doing all sorts of stuff. The most notable being WebKit's native Web Inspector and the FireBug extension.
Performance concerns with "fill color" and such are not an issue because they are offloaded to the graphics card.
Full screen mode is controlled by the user agent, not the web page for obvious reasons. Most browsers have support for a full screen mode in some fashion.
Now this is not to say that it's perfect. However, things are looking pretty good. :) This is definitely the future, the question is just how long will it take to get there.
You're right - I bet people were thinking making an online game with this, but now they've discovered that you alone will have this disabled, there's obviously no point doing it. It's a good thing you posted to let them know, and save them the trouble!
Javascript is not particularly limited. It is turing-complete, of course, and provides a nice type system: dynamic duck typing on top of a prototype object oriented type design. It has garbage collections, closures, reflection...
Probably more expressive and flexible than your average programming language.
Maybe what you mean is that it is lacking a bigger standard library.
Well, as it is, it is certainly much bigger than the standard C one.
the web into two very distinct flavors:
Hey KID! Yeah you, get the fuck off my lawn!
Javascript isn't a good language for fast matrix math.
The matrix calculations required for rendering are done by OpenGL, not the caller programming language (the advantage of doing this way is that it can be hardware accelerated).
Also, authoring tools will have to be developed. You can't effectively author 3D content in a text editor.
I'm unclear what sort of tools you refer to? Presumably people would use the same 3D modelling software they'd use for any other OpenGL application.
OpenGL has the advantage over the other things you list in that it's (a) an existing widely used API, and (b) it has hardware acceleration support.
The problem is, when will we have the chance to stop using wrappers to solve the problems caused by the divergence between different platforms, that only add additional dificulty, performance penalties, files, etc. When will developers be able to focus on creating new stuff from the start, instead of needing to first create ways to solve the problems created by others?
Onda Technology Institute
The matrix calculations required for rendering are done by OpenGL, not the caller programming language (the advantage of doing this way is that it can be hardware accelerated).
No they are not. The vertex transformations are hardware accelerated. The matrices itself are done either by the application of by the driver (when calling something like glTranslate). Matrix manipulations never ever are done by the graphics hardware.
This sig does not contain any SCO code.
I think a lot of people fail to see the coincidences of this.
1) MS announces BING
2) Founder of Google personally leads a team to investigate and potentially retaliate. (MS just HAS to get into EVERYONE's business)
3) Google Chrome and OS is announces, officially.
4) WebGL is announced.
5) Google Native Client is being heavily developed and will be the core of WebGL use.
It is a war folks. a Tech war. MS is trying to take more search market shares with the Yahoo/Bing deal. Google is not going to tolerate this, as it is a DIRECT threat to Googles AD business. (Bing actually has a crap ton od marketing behind it and is gaining market share fast.)
Google is not playing Mr. Nice guy to MS anymore.
Welcome to Google OS... while many think this will just be a Linux kernel running Chrome and using the WEB for web apps... Google is also doing some key things.
1) Improving Kernel Linux ( remember the null pointer exploits found? Everyone was wondering, what is Google doing hiring top grade Black hat hackers to look for vulnerabilities in the kernel? To get it ready for world domination is WHY!!!
Google is also going to write 'from scratch or maybe' a new X server, as the current one has problems... it will make X.org work the way everyone wanted it to... with millions in money and research, google can afford a rewrite, than release it all as Open Source, like they have already done with CHROME and Native Client.
2) Chrome Browser/OS has been in the works for a while, and MS responds with BING, but Google only exclutes the situation with announcing an OS as well.
3) WebGL is MORE than just a replacement for flash.
WebGL + Google native Client allows 3d gaming, they also mention in Google 'Talk Videos' that you will be able to make full fledged Multi Media Products (hint hint... another PhotoShop, 3dsmax, Audition (formerly Cool Edit Audio Editing ) and games.
What does this all mean?
It means Google OS. It means that safari, opera and Chrome OS ( Firefox will follow ) have more market share than Microsoft.
The browser has shown ( and MS has known this since the famous MS internal email 'INTERNET TIDAL WAVE' written by Bill Gates in 1995 in response to the Netscape/Java platform emergence ) is a direct THREAT to MS as a platform.
The Open Source will soon have their own version of Direct X ( called OpenGL or WebGL ) BTW. openGL standard has come a LONG way in a SHORT mount of time to catch up with Direct X and supporting Shader Model 1,2,3 and beyond... this is become google and apple are supporting it for the new OS take over.
The Google OS with Browser will beable to BY PASS Microsoft... the Internet Tidal wave has HIT. THe only reason Netscape failed, was because it's revenue source was the Browser, MS was able to cut that 'artery' with a quickness. But, Google does not make money with anything by ADs, which MS can not touch. They can not STOP google in any way shape or form from going what Netscape tried to do 15+ years ago...
BING is pissing Google OFF and now its game over.
To learn more google for the following topics and read carefully...
1) google native client (watch the videos)
2) google os
3) WebGL (kronos group) an all open source affiliation group
4) Bing triggers google response
Google Native client will be platform independant. which means you can run it all in Apple, Windows and Linux... Google's claim is that it wants full reach for their Ads,as the Web has already become platform independant.
Google OS will be OPEN SOURCES, FREE and no worries of vendor lock in.... of course there are people that think Google has gotten too big and a data hog... but at least the OS will be Open Sources.
Gone will be the days of BOTNETS, which threaten ecommerce... Google is partnering with everyone NOT Microsoft... which equates to one thing... more Ads for Google...and a NEW OS paradigm for the worldd.
yes, javascript right now is a but slow.. but in recent times it has seen a
The history of 3D on the web is absolutely dismal. As a "graphics guy", I have been repeatedly shocked over the last 13 years by what the "web guys" propose as a 3D-in-the-browser solution. I don't understand why there is such a mismatch between the two factions' ideas about graphics, but I accept that they are vastly different.
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.