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."
Ads (Score:5, Insightful)
Re:Ads (Score:5, Insightful)
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.
I don't see how this is any different than the current situation with Flash.
Flash is resource hungry, and plays annoying ads in both 2d and 3d, with sound. So the situation is presently worse. Even if WebGL includes audio (or perhaps in the future there will be WebAL, etc.), the situation is presently worse given how problematic Flash is.
Having seen some of the things Apple (and others, but it's really Apple that's pushing it at this point) is doing with HTML5, everything that can be done to replace Flash is a good thing. Even if it means the same annoying types of ads as now, at least they'll have less of a performance hit, and they won't be tied to a single program that is constantly plagued with security issues, has performance issues, crashes so often that Apple and Google sequester plug-ins/windows/tabs because of it, and whose updater is annoying and tries to push additional toolbars which no one wants.
Just as Flash served to kill off pretty much all the various and annoying plug-ins you had to download to make full use of the web, and replaced them all with a single plug-in to rule them all, HTML5, with things like canvas, the video tag, and WebGL, is looking to do the same to Flash--replace it with something better.
Re: (Score:2)
You can just not bother to install Flash, or use FlashBlock
I'm sure there will be a Firefox extension to disable this, if not an actual browser preference.
Re: (Score:2)
No problem. If someone hates ads, and still does not use an ad-blocker, he's a retard anyway, and deserves it for being so lazy. ^^
I guess those people then will become the Fritos and secretaries of state of tomorrow [imdb.com].
Re: (Score:2)
Really? Wouldn't it just popularize something like GL Block or something?
Re: (Score:3, Insightful)
All you have to do is tell people in marketing that a lot of people do use the GMA chipsets (all early entry-level intel Macs), netbooks, cheap laptops, cheap desktops, etc.
The iPhone and iPod touch is also getting stronger every day, though I wouldn't be surprised if the 3D chipset in those isn't more powerful than an intel GMA, relative to the screen size of the iPhone/iPod touch.
Re: (Score:2)
Tech guys to marketing guys: "most people don't have the latest hardware. If your ads require too much power then they will look like crap and people won't buy your stuff."
Simple enough.
Re: (Score:2)
Marketing guys: "You mean our ads will be targeted to the people who like to buy new hardware? Let's do it!"
Re: (Score:2)
Tech guys: "But the people who like to buy new hardware already know cheaper places to buy from than us"
Re: (Score:3, Insightful)
Actually, hardware accelerated advertisements would improve the user experience, compared to regular advertisements.
I find that closing my eyes improves the user experience compared with most regular ads on the web. (And on the TV too for that matter.) It's the obnoxiousness that I object to, and the added indignity of ads too often being such horrendous messes that they impact browsing of unrelated sites with common browsers, though NoScript is rather a good response to that (and good for other things too).
Re: (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.
Define "Fine." (Score:2)
An "underpowered GMA chipsets" can still run stuff like Morrowind fine.
I've never played Morrowind, but I can say for sure that a brand-spanking-new q6600 dell box that shipped with a GMA chip couldn't even play DotA (Warcraft 3, for those who don't know) at a resolution higher than 800x600. With all the video options turned down.
That engine predated the GMA chip by 7 years or more, but would lag under 20 fps in even the lightest of conditions.
Intel's graphics chips are utter shit, and they're holding the entire computing industry as far as 3D graphics are concerned.... Whe
Re: (Score:2)
Also, whilst ATI and nVidia are the leaders in performance graphics hardware, Intel is by far the market leader in actual units shipped. Last statistic I actually saw--which, I'll admit, was years ago--Intel graphics chips ship in about 75% of all machines.
Very few machines get aftermarket cards.
Re: (Score:2)
Re: (Score:2)
Someone in the know... (Score:2)
...please explain the difference between this and Google's O3D.
To answer my own question... (Score:5, Informative)
Here's a nice summary [google.com].
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.
Re:To answer my own question... (Score:4, Informative)
A common comparison that has been made is that WebGL would be used like Canvas whereas O3D would be more like SVG. (WebGL will be *part* of canvas, of course, but I mean in terms of uses and applications)
If you want links to many discussions about the approaches and comparisons, check out this page [ajaxian.com].
Since canvas is already known territory (comparatively), and JavaScript is being optimized like crazy by all browser developers, I'd bet that you should expect to see WebGL picked up much faster than O3D. Developers that are already comfortable using canvas for some 2D representations will have only a small step to take to reach WebGL.
Re: (Score:2)
Well, there are a few major things in O3Ds favor (btw: full disclosure, I am a Googler but have no particular interest in 3D tech beyond enjoying its products).
Firstly, O3D i
Re: (Score:2)
O3D is a plugin that can be installed in Internet Explorer today.
Is it impossible that WebGL could ever be done that way?
I'm starting to think that the best way to deal with IE is to create a Webkit/V8 plugin.
O3D embeds V8. Consistent JavaScript performance is going to be an issue for any web-based 3D work.
And V8 may not always be the best engine for that. And since the browser already does Javascript, I'd say leave it to the browser. If it's really a problem for people, the solution is to upgrade the browser, not to install a bigger plugin.
No, what I like about O3D -- and you'll have to correct me if I'm wrong -- is that WebGL is a very low-level wrapper around OpenG
Re: (Score:2)
Is it impossible that WebGL could ever be done that way?
I'm starting to think that the best way to deal with IE is to create a Webkit/V8 plugin.
Dibs on that idea! [slashdot.org]
And V8 may not always be the best engine for that. And since the browser already does Javascript, I'd say leave it to the browser. If it's really a problem for people, the solution is to upgrade the browser, not to install a bigger plugin.
No, what I like about O3D -- and you'll have to correct me if I'm wrong -- is that WebGL is a very low-level wrapper around OpenGL, whereas O3D is high-level-ish, right? Or, put another way: Would it be possible for O3D to wrap either Direct3D or OpenGL, depending on the platform? That would be a definite win.
Other than that, from reading that discussion, the biggest thing I like about WebGL is that, like most of the other web standards I know and love, and like the Unix philosophy, it tries to do one thing and well.
For example, rather than having its own format for loading assets, it's counting on the browser to provide a more generic one -- maybe the ability to have URLs that refer to some location inside a zipfile (or something else reasonably standard). It occurs to me that data URLs could go a long way here as a hack, too.
WebGL's biggest advantage (IMHO) is its ease of implementation -- by the browser, natively. Webkit's on board, along with Mozilla and Opera [opera.com]. Ever since Flash, it seems like people have learned their lesson regarding plugins. Don't get me wrong, I think that Gears is very useful, but how often is it updated? [blogspot.com]
Getting users to install a plugin on any platform is becoming difficult, it takes the browser vendors themselves to push features. If every browser apart from IE implements canvas3D, t
Re: (Score:2)
Re: (Score:2)
> This may be resolved over time as all the different engines approach the theoretical
> limits of how fast you can make JavaScript
Given that JITs always involve heuristics and that the various JavaScript jits are taking very different approaches, I'm not sure this will happen. I think it more likely that we'll have testcases on which Nitro is 2-5x faster than Spidermonkey and other testcases on which Spidermonkey is 2-5x faster than Nitro (and similar for comparisons to V8) and on which all those num
Re: (Score:2)
I can tell you, that WebGL is going to be slow as hell, as long as the compiler is not at least as optimized as the Java ones. But it has the advantage of being what you're used to, when you already know OpenGL.
Now the good and the bad news is, that nowadays, everything that changed in optics in the last 5-10 years is shader-based. Which means it's going to be just as fast as normal software when just loading precompiled shader progams. But it also means a big security risk, because everyone could load a sh
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.
Re: (Score:2)
Re: (Score:2)
as long as the compiler is not at least as optimized as the Java ones.
They're working on it. I haven't looked at benchmarks -- it may already be there. Picking a random benchmark shows v8 (Chrome's Javascript engine, which is embedded in O3D) to be 300x faster than Python, and I know Python is easily fast enough to make a decent game in.
Now the good and the bad news is, that nowadays, everything that changed in optics in the last 5-10 years is shader-based. Which means it's going to be just as fast as normal software when just loading precompiled shader progams. But it also means a big security risk, because everyone could load a shader in your graphics card on any website.
I guess the big question there is whether shaders are a security risk at all. Although I'm sure shader systems haven't been designed with security in mind, what, exactly, can they access? I could be entirely wrong, but it seems to me that they
Re: (Score:2)
Except in cases where it's preinstalled, which is often.
Re: (Score:3, Informative)
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).
Re: (Score:3, Informative)
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
Re: (Score:2)
O3D still uses a plug-in.
Yes... key word there: a plug-in. The Quake Live model is one plugin per game. The O3D plugin is one plugin for anything you might ever want to do with 3D.
I know so much that there aren't any readers for 3D models which makes the development of games very hard.
Somehow, I doubt it. The difference is that O3D seems to be putting that inside the plugin, whereas WebGL would require it on the server or in Javascript.
You have to program everything. No shaders, no phyiscs etc.
Yes, you have to program shaders -- just like you do with OpenGL outside the browser.
So basically what you're telling me is that O3D is easier, because it's got a bunch of stuff built-in that you'd have
Why? (Score:5, Insightful)
Re:Why? (Score:5, Insightful)
Re:Why? (Score:5, Insightful)
There are some positive uses for it (such as getting us out of dependence on proprietary technologies like Flash)
There are already a lot of ways we could get rid of Flash, if people would stop using it. After all, Flash is mostly used for vector graphics (we've got SVG), interactivity (we've got AJAX/DHTML), and audio/video (we've got the audio and video tags).
For one, this will add even more vulnerabilities to browsers which seem to already have loads of them.
So does every useful feature. I'll bet money that the first serious vulnerability is in a driver, not a browser.
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.
OpenGL can be implemented in software.
And you lost that argument already with Flash. When there are one or more video ads on many pages I visit, I doubt low-end netbooks are doing well.
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?
The fact that technology can be misused is not a reason to avoid developing said technology.
For example: It's possible to build an entire site surrounded by an iframe, so that navigation is completely broken. That doesn't mean that iframes have no legitimate uses.
It's also possible to build an entire site as a single AJAX app. This can be done well, but it takes more work -- for example, with Gmail, notice that everywhere you go, it adjusts the hash in the URL, so that you can use browser navigation properly -- the back button works, so does bookmarking, open in a new window/tab, etc etc. Sites that don't do that could have really poor usability.
It's also theoretically possible to render images using massive HTML tables, with each cell representing a single pixel. Does that mean HTML tables should be made less flexible, just so no one can do that?
I could go on...
The fact is, there are ways to abuse any technology -- there's always the possibility that someone will print out a website, make the changes they want, scan it back in, and upload it as an image. The fact that people can abuse technology should never prevent us from creating new, interesting bits of technology that have real, practical applications.
While some things obviously need Flash (such as Homestar Runner because they are Flash cartoons)
Nope. They need Flash because they were authored in Flash. They could have been done with SVG, Javascript, and the audio tag, it's just that the authoring tools for these aren't anywhere near Flash itself, from what I understand.
adding a high-end graphics card to a computer just to view the web? Thats just a bit ridiculous.
See, now you're being ridiculous.
Consider that ten or fifteen years ago, using excessively large images would be considered bad taste -- you'd be asking for way too much RAM "just to browse the web", and you'd be wasting a ton of bandwidth. That's why we came up with the idea of thumbnail galleries -- which are still useful, but a better model is really a slideshow.
It's not a "high end video card" now, either. Just about any video card is going to have some 3D capability on it -- and we're moving in the direction of compositing window managers, which will actually lead to cards supporting just 3D (and having to emulate 2D) being cheaper than cards supporting just 2D (and having to emulate 3D).
So, 10 or 15 years from now, when people want to add a little effect to their website -- or build an interesting "flash game" that's capable of actually using 3D hardware -- would you prefer it use Flash? Or maybe you'd prefer Quake Live [quakelive.com] -- a plugin for each game -- may as well just download an exe?
Or would
Re: (Score:2)
every now and then, we see a cool little student game on Slashdot's homepage. Narbacular Drop became Portal, and now there's The Power of Paint, etc... These aren't exactly resource-intensive games, nor are they particularly big (usually under ten megs). Imagine if, instead of having to click, download, install, then run, then uninstall when you're done, and hope it didn't have any spyware... instead, you just click from the Slashdot homepage, and you're in the game.
This method might work for some genres, but until browsers expose an API letting a JavaScript program read from USB gamepads, it won't work for other genres. JoyToKey is a pain to set up, especially for multiple gamepads.
Re: (Score:2)
Because it's actually a good language, that you likely don't understand.
Re: (Score:2)
Javascript is a fine language given a bad name because
- serious programmers don't program for the web
- amateurs do what serious programmers won't and do it *really badly*
The result is a lot of shitty javascript programs and JS getting a bad name for being shitty. It's not the language, it's the programmers!
This situation has vastly improved over the last 5-7 years. Serious programmers started using JS, or in some cases amateurs figured out how to be real programmers.
Javascript is /scheme wit
Re: (Score:2)
Either way, it introduces more security vulnerabilities to the average user.
Granted. But the obvious question is: How many features are you willing to remove or prevent to keep the user secure? Having a web browser at all introduces more security vulnerabilities to the average user than just not surfing the Internet.
The fact is, Flash is nearly always used for the wrong reasons. WebGL will become the next Flash, and be just as annoying if not more so.
Except that it'll at least be open. Flash is frustrating not only because it's abused (as any technology can be), but because there really aren't that many applications where Flash makes sense. In fact, the vast majority of places Flash is used now, there are and were e
Flashblock vs. Noscript; 0.05 Mbps download (Score:2)
IE can't do Flash without a plugin. IE can't do SVG without a plugin. What's the difference?
The IE plug-in for SWF is preinstalled on most PCs, unlike the IE plug-in for SVG. The IE plug-in for SWF is mature, unlike the IE plug-in for SVG and the nonexistent IE plug-in for the <audio> element. The authoring tools for SWF are more mature than the authoring tools for animated SVG with synchronized audio.
And I have to point out, I don't think you really mean "many browsers". I think you mean "IE".
Sixty percent of browsers are IE.
A geek, on the other hand, can install Linux and make an old system useful again.
Unless the old system has Windows-only hardware.
Would adblock suddenly stop working? How about noscript?
Again, like so many other things in your response, this is already an issue with Flash.
Flashblock blocks SWF and only SWF. Its user interface is more focused than that of, say, noscript.
If it's properly sandboxed, there's not a lot it can do.
I think grand
Why shouldn't they? (Score:2, Insightful)
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 am
No T&L on Intel GMA (Score:2)
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.
Low-end PCs, especially notebooks, still have Intel video. Like Voodoo3 cards from a decade ago, Intel GMA video chips don't accelerate transformation/lighting/vertex shading.
Re:Why? (Score:5, Insightful)
For one, this will add even more vulnerabilities to browsers which seem to already have loads of them.
While replacing one of the biggest ones: Flash.
WebGL won't be a plugin, it will b part of the browser. That means Firefox won't be vulnerable because of an Adobe bug, but because of a Mozilla bug, and Mozilla can fix the bug themselves.
Also, with more diversity, bugs will be less likely to be exploited, and when they are they will have a smaller path of destruction.
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.
This is no different than Flash is now, except that WebGL has the potential to be significantly more efficient. WebGL isn't going to replace HTML, it's going to augment it, similar to how Flash does today. Sites that want to be accessible to more users will avoid reliance on resource demanding WebGL elements, or avoid it altogether, just like sites avoid resource demanding Flash objects.
On the other hand, those sites that want to take advantage of it, and for those users with more modern machines (really, WebGL isn't going to require advanced GPUs and high-end Core2Duos unless you start putting game level 3D and AI into it, simple 3D rendering will work just fine on older hardware--better, in fact, that 3D Flash does now), we'll be able to have a more rich web experience.
I absolutely detest the notion that the web should not embrace new technologies just because some people have crap computers. I agree that most web sites should be designed to be accessible across a broad range of computers (either by limiting advanced features, or providing alternate pages), but if a site wants to specialize with features that tax even modern systems (like YouTube did not too long ago), then as long as they are not essential sites (like banks, utilities, government, news media, etc), then they should be encouraged.
Already many sites are unusable without a recent version of Flash, we don't need extra hardware as requirements to view sites.
There you go. So how is this worse?
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.
Which has what to do with WebGL?
But adding a high-end graphics card to a computer just to view the web? Thats just a bit ridiculous.
Not as ridiculous as assuming WebGL will mean that you have to have a high-end GPU and CPU just to view the web.
Re: (Score:2)
WebGL is attempting to build an actual standard (unlike Flash) which people might really use (unlike VRML) to put accelerated (unlike Flash) 2d and 3d graphics on the web.
Why? I'd imagine (other than trying to beat Microsoft to the punch with WebX or whatever they decide to put forth) that it's a move toward cloud applications. Adobe's been talking for years about putting Premiere, Flash and Photoshop into web applications. Google beat Microsoft to the punch with Google Docs. A decent accelerated 3d surf
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?
Re: (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.
Re:That's a Bit Optimistic Don't You Think? (Score:4, Insightful)
As other smartphones adopt the new standards (many already use Webkit-based browsers), you instantly gain compatibility on those devices. No need to maintain three separate codebases for the iPhone, BlackBerry and Android if your app works great in the browser of all three platforms.
I also prefer sites/apps where I don't have to perform any installation to get at the content, but that's more a matter of personal preferences. Right now that's only practical for a small subset of apps, but WebGL may change that.
Re: (Score:3, Informative)
Just one phone? Web Kit is used on almost all Nokia phones, android phones, and iPhones, and probably a bunch more after that.
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:That's a Bit Optimistic Don't You Think? (Score:4, Insightful)
True. But WebKit is used by Android and WebOS. Also, RIM just bought a company that makes a WebKit-based browser.
So, potentially, you're running on four of the top five platforms.
Not rejectable (Score:2)
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?
Web apps can't get rejected, nor do they have the average 2-week delay.
Re:That's a Bit Optimistic Don't You Think? (Score:4, Informative)
You mean Opera [statcounter.com]?
Re:That's a Bit Optimistic Don't You Think? (Score:4, Insightful)
Yes, wait no, given that the iPhone bar, the Nokia bar, the iTouch bar, and a lot of the "other" bar (palm pre, and android) are *all* WebKit based browsers. In the mean time, NetApplications shows the iPhone *alone* ahead of opera.
Somewhat misleading graph (Score:2)
So, iPod Touch and iPhone are two separate browsers on that graph, even though they're identical for web-browsing purposes. You could argue, I suppose, about whether iPod Touch even belongs in the "mobile" category. But it works for a lot of folks as a mobile internet device, wherever they have Wi-Fi access.
If you add iPod and iPhone together, they add up to 34.8 percent, which is more than Opera and the next two largest (BlackBerry and "Other") combined.
Re: (Score:2)
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?
I would, if only because it's a lot easier to convince people to try a different browser (or just provide a downloadable version that embeds Webkit) than it is to convince them to download something every time they want to do 3D.
Or if it isn't, it should be.
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.
Where "minority" means "Everyone except IE, at least until someone hacks it into IE with a plugin."
Consider the following user experience: You try to view the webpage. It says "You need a browser that supports WebGL. Here, try one of these." You download
Re: (Score:2)
Of course it will work because you said so!
Worked for Flash.
Re: (Score:2)
Khronos also maintains OpenGL ES and OpenGL. OpenGL ES is basically a subset of OpenGL. It would be very surprising if WebGL weren't very closely related to OpenGL as well. That should make writing a plugin for those other browsers not particularly difficult.
Games! P0rn! (Score:2)
When will I be able to play games with Browser? Will Starcraft 2 / Diablo 3 ships release in this "Web format"?
And when will 3D LCD screen becomes affordable and hence animated 3D porn? Oh. I think I can skip the animated part...real actor are good enough!
Browsers might be ready for GL but not Javascript (Score:3, Insightful)
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.
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 ha
Boop, boop, boop (Score:2)
or to capture every key stroke/mouse movement.
No, but you can capture enough of them to make a game.
For one player. Otherwise, two players have to share a keyboard, and down that path lies "boop, boop, boop" when too many keys are held down.
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.
On what kind of connection? Unless the game is something the same size as a 24 KB puzzle game [lj65.org], you'll run into problems while waiting to push maps, meshes, and textures through a sub-1 Mbps connection.
Re: (Score:2)
setTimeout/setInterval doesn't actually surrender control of the thread back to the CPU. My CPU monitor says 99% usage, even when I set long intervals.
Sounds like you're Doing It Wrong.
Seriously, take a block like this:
I guess it depends what you mean by a "long interval", but that definitely doesn't take 100% CPU for me.
good luck getting the sound to play at the moment you request it,
Have you actually had a case of this being a problem?
it won't tell you where your typo is.
If your file is so big you can't find a typo, your file is too big.
If you made a significant change it can be a PITA to track down.
If you made a significant change without testing, you're Doing It Wrong. See TDD [wikipedia.org], for one.
Less than a second to be in a game? I don't think you appreciate how long it takes to load resources before the game is actually running.
I think you're assuming all of these resources have to be loaded ahea
Re: (Score:2)
I guess it depends what you mean by a "long interval", but that definitely doesn't take 100% CPU for me.
Even when the interval gets down to 16.67 milliseconds (60 fps)?
Have you actually had a case of this being a problem?
Yes. I request a sound, and it plays three seconds later.
If your file is so big you can't find a typo, your file is too big.
More files == more HTTP requests, one for each file == more startup time, especially on high-latency connections such as dial-up, satellite, or 3G.
See TDD
Test-driven development just moves all the bugs to the automated test suite.
I think you're assuming all of these resources have to be loaded ahead of time.
Would you rather have the game freeze for three seconds every three seconds to load a resource?
Re:Browsers might be ready for GL but not Javascri (Score:2)
I feel your pain, man.. Been developing "web 2.0" (hate that word) apps for the past 4 years, I can say that lack of sleep() and any real threading support in Javascript (Prototype's defer() and its friends is not an answer) is the biggest obstacle. Won't someone think of poor web developers?
Re: (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]
Re: (Score:2)
As far as full screen, have the user press F11. All browsers I'm aware of use this same binding.
Uh, I guess you've never tested this on a Mac.
Re:Browsers might be ready for GL but not Javascri (Score:4, Informative)
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.
Re: (Score:2)
> Performance concerns with "fill color" and such are not an issue because they are
> offloaded to the graphics card.
The original poster's concern was with _setting_ the fill color. Since the format for the set is a string that allows the full CSS color syntax and hence has to be parsed with a full CSS parser, changing the fill color is in fact somewhat expensive. It's comparable in time spent to the fill operation itself in browsers last I tested.
Re: (Score:2)
Uuum... what are setTimout() and setInterval(), if not sleep() functions? Or are they "implemented" as tight loops? ^^ I don't think so.
But I agree on sounds and general slowness.
I think JavaScript will go trough quite a lot of change, which has already started. And it will come out as a pretty well performing JIT-compiled scripting/programming language.
But what I really would wish, is for other languages being implemented in the browser. With a generic (FAST) VM around it.
Then (pre-compiled?) even C++ or H
Re: (Score:2)
Hmm, imagine LLVM [llvm.org] in a browser..
Re: (Score:2)
also don't forget true "arrays"; as is, I think it takes lg(n) time to access array elements.
Re:Browsers might be ready for GL but not Javascri (Score:2)
Invariably these games use 99% of the CPU because Javascript doesn't have a real sleep() function.
It's called timer. Use a timer. Javascript is event driven. Use a timer.
There's no decent way to manipulate sounds (like an FMOD for javascript).
Well, there's SoundManager (flash) and one could do similar things with a Java interface.
3D games sound like a nice idea but they'll be prohibitively...
Well, you loose here because every game that's on a different platform has such issues. EVERYTHING that's developed cross-browser (i.e. cross-platform) or on multiple consoles (i.e. cross-platform) or on PC/Mac/Linux (i.e. cross-platform) has such issues. When it comes to performance, I should mention that not too long ago Canvascape was unplay
Alternatives to Javascript (Score:2)
And if you don't want to directly code in Javascript, some great alternative languages can actually compile Javascript code :
- haXe : http://www.haxe.org/ [haxe.org]
- Fan : http://www.fandev.org/ [fandev.org]
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: (Score:2)
Here's the list [wikipedia.org].
Konqueror, Chrome, Midori. You'll have to compile your choice with a bleeding edge version of webkit, of course.
Interesting, the Palm Pre also runs webkit.
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
Re:How will we manage to use this? (Score:4, Insightful)
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).
Re: (Score:2)
ok, I'll give you that. "the language itself", has about everything most languages do. but there are some things that in other languages you can find in libraries that you can't find in javascript. Javascript DOM, although not exactly from the language, isn't exactly a library either. If you see, it is, let's say, a javascript primitive. Several features are unavailable and unimplementable because all libraries for javascript are implemented over javascript primitives, which, although a very good set but, c
Re: (Score:3, Informative)
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,
Re: (Score:2)
yes, I mean it's standard functions, but it doesn't matter if it bigger or smaller than any other language's standard library. What matters is if it's complete (or near enough) or not for the job it was designed to.
Re: (Score:2)
oh, so you're just assuming I don't really know Javascript, because Javascript has prototype based inheritance instead of class based inheritance, which I actually can live with and didn't even mention. nice.
Re: (Score:2)
so, once again, you're just assuming.
assuming I'm a bad software engineer because I know how inheritance works in JS? wtf? are you serious?
or are you saying "you know the language, but you have the opinion that javascript's features aren't enough, so you're not a good software engineer".
so, you complain that your car doesn't have front fog headlights, so you're not much of a driver.
"your opinion is negative about/somehow criticizes X, so, you're not a good X user."
again, if I haven't yet made myself clear i
Re: (Score:3, Insightful)
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?
I'm probably not the first person to say this... (Score:4, Funny)
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.
Re: (Score:2)
Why do you go to MySpace then? Especially with all that stuff turned on? Maybe you are a masochist and haven't realized it? ^^
It's OK. We can... uuum... accept... you... anyway... *cough*. ;)
Remember Web3D? Shockwave? Java 3D? (Score:5, Informative)
This is about Try #4 for 3D on the Web. Web3D [web3d.org] 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. [swgamers.com] The Shockwave player is supposedly available on 58% of PCs. [adobe.com] 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.
Re: (Score:2)
You can't effectively author 3D content in a text editor.
PovRAY and me would like to disagree with that. ^^
I found that I have this ugly feeling of everything not being at the *exact* correct position, with the *exact* correct curves, when using software like Maya or 3DStudio Max. And I can't stand working like that. It feels like dirty "spaghetti-designing".
That's why I like PovRAY so much.
But now that Maya has adopted Python as its scripting language, I must say that I'm pretty happy with that too. ^^
Re: (Score:2, Informative)
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 ov
Re: (Score:3, Informative)
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.
Re: (Score:2)
The problem with offering OpenGL access to Javascript is that Javascript isn't a good language for fast matrix math.
Yah, because it's not like the underlying javascript engine, where the matrix math is actually run, couldn't be enhanced...
Similarly to your other complaint.
Re: (Score:2)
If you want a sense of how far Shockwave can be pushed, try Maid Marion [maidmarion.com]. They have a halfway decent 3D multiuser RPG that runs in a browser. Looks about as good as Everquest of a few years ago. There are guilds, monsters, dungeons, items, PvP combat - all the usual stuff. The game mechanics, like collisions, ground contact, and camera control, are all reasonably decent, if well behind modern console games.
If Adobe could just solve the loading time problem, as they did for Flash, this would be the sol
It is time to split... (Score:3, Interesting)
the web into two very distinct flavors:
Re: (Score:2)
The problem is that people want a mix. Your typical news site wants text flow with a navigation+multimedia application around it. gmail wants text flow with a mail client around it. Google docs wants text/flow with a word processor around it. A wiki often enough wants text flow with an HTML editor around it (though some wikis are of course still using textareas for editing).
Re: (Score:2)
LOL! Good question...
Well it is this whole web paradigm. We keep trying to make an application environment out of a presentation markup language with kludges like Ajax and the like and it does not really work well, at least in my opinion.
I like the idea of the split because it allows me to put an application shell, that does not change any more then say, browser versions to do what is very very poorly done now with a web browser.
Take for instance the current HTML & CSS box model. It requires a div wi
Goes deeper than just WebGL... (Score:2, Funny)
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,
too bad 40% of Web browsers can't use it (Score:2)
HTML5 canvas has a lot of potential. Once accelerated 3D graphics in the browser is standard, the potential uses and demand for content will be huge: visualizations, innovative interfaces, attention-grabbing content, digital art, games...
But IE doesn't support canvas so any site that relies on it for anything more than trivial rendering will be unusable by almost half of Internet users (current IE browser share: ~40%, according to w3schools [w3schools.com]). Probably Microsoft sees canvas as a threat to Silverlight so won'
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 guy
Re:A trusted list of sites. (Score:5, Insightful)
The point is that nobody really cares all that much about what you do, as the web industry does not revolve around you.
Re: (Score:2)
The point is that there will be millions who don't, and thereby it's ideal for embedding content and adverts.
Re: (Score:3, Insightful)
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!