12 comments

[ 6.1 ms ] story [ 46.4 ms ] thread
I imagine that a Flash fallback would be more practical in most situations.
Does Flash have a direct OpenGL API, trivially wrappable to JS?

IIRC JoGL is a thin JNI wrapper around libgl. As such it exposes the OpenGL C API quite directly, which in turn gets wrapped to JS, probably through some automated generator and a sprinkle of glue code.

When I say "in most situations" my implication is that for most 3D applications in the browser such low level interaction with the 3D API is not necessary. Most people building things with WebGL in the future will not be working with WebGL directly, but through an abstraction layer like three.js[1]. This could easily be extended to use Flash as an alternate renderer (say, for people running IE).

[1] https://github.com/mrdoob/three.js/

Does flash have OpenGL support these days?

I investigated options for making a 3D web game two years ago, and back then Flash was still limited to 2D polygons and no depth buffer. There were some '3D engines' but those did all vertex transforms manually instead of using the GPU...

Adobe are adding their own "Stage3D" API (aka Molehill) to Flash. I realise that there are some situations where you want an "OpenGL-alike" like WebGL (especially if you're porting something already written in OpenGL). However, for most uses of 3D on the web, an abstraction layer with backends for WebGL and Flash would be sufficient, and would likely have wider browser support (it's also easier to get people to drive-by install or update Flash than Java).
I'm amazed that people are taking offense to my mentioning of the "F-word". Have people already forgotten what Java applets entail? At least with Flash, getting people to install/update it on demand is not entirely unlikely.
I don't think they're offended by use of the word "flash." The OP is about a substitute for WebGL, which exposes low level OpenGL commands to Javascript for hardware accelerated graphics. Flash's API is neither low level nor hardware accelerated, making it a poor fit for a WebGL fallback.
On the WebGL mailing list someone mentioned that it's not HW accelerated except on Mac OSX which makes hard to see this as a fallback for WebGL. There is also talk of using flash(molehill) as a fallback but that entails some conversion of things like shaders and sharing the data between the javascript vm and flash plugin etc.

EDIT: also for IE, it's probably best to just get Chrome Frames.

How well does WebGL work in Chrome Frame? I'm gonna be releasing an MVP of a product centered around WebGL and I've been thinking that GCF might be a good way to get it working on IE, but haven't yet tested. Would love to hear some experiences.
It'll work as well in GCF as it will on Chrome in WinXP, which is to say, really well! There should not be a difference between the two.
JebGL uses JOGL which is hardware accelerated (unless you're running Mesa on Linux) on all platforms.
Sorry I misread the email, you are right it's not that it only works on mac osx but that it is only supported in Safari on MacOSX due to a bug in JOGL. I really misread that the first time ;p