FireFox 3 now can support realtime Canvas 3D

Thanks to vladimir,  he has devoloped one extension for FireFox 3(Beta), which allow you to view realtime 3D object in FireFox, such as Google 3D kmz. This extension uses OpenGL 3D prototype, "There are two contexts provided by the extension. "moz-gles11" follows the OpenGL ES 1.1 spec very closely, providing an almost identical API and feature set, and "moz-glweb20" follows OpenGL ES 2.0
closely. Both are implemented directly on top of desktop OpenGL, so you
must have support for at least OpenGL 1.5 on the desktop for the
"moz-gles11" context and OpenGL 2.0 for the "moz-glweb20" context.
"

 How to Install?

"You must be running Firefox 3 Beta 1 (or a later nightly, though
compatibility with the nightlies is not guaranteed). Install the extension here
(Windows, MacOS X x86, and Linux x86 only). Then, to allow web content
to access the 3D canvas contexts, go into the Add-ons Manager and
select Options under the Canvas 3D Extension, and make sure that
"Enable 3D canvas in web content" is checked.
"
enable canvas for extension

Exciting news, I downloaded FF3 right now and tested the extension.But unfortunately,  I can not see the 3D object same as demo image in the blog, when I tried to open there pages:

Simple
--- just the basics; shows how to create a moz-gles11 context and to
use glClearColor/glClear to clear the viewport to a specific color.

Simple 2.0
--- just the basics again, but this time with moz-glweb20. Uses a
simple fragment and vertex shader, and shows one possible way to
include shaders in web pages (avoiding the need to specify long
multiline string constants in javascript, which JS doesn't handle all
that well).

kmzview
--- Based on an earlier example by Philip Taylor, shows how to use the
moz-gles11 context in conjuntion with E4X and the jar protocol handler
to load Google Earth/Sketchup format kmz files (such as those available
from the Google 3D Warehouse) and parse a (very limited) COLLADA model
file and display it. This example uses the moz-gles11 context. It's a
bit of a hack, and could be very much improved.

 

There is nothing in my brower, and I opend Tool->Error Console, I found this page has exception:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLCanvasElement.getContext]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://people.mozilla.com/~vladimir/canvas3d/examples/simple/simple.html :: runTest :: line 6"  data: no].

 No idea for that, I found there are other guys who have the same problem, https://labs.mozilla.com/forum/index.php/board,9.0.html

 It seemed that my Graphic card does not support OpenGL? and the Author gave the answer:"Sorry guys, as I mentioned in the original post, error reporting is in
pretty bad shape right now.  Generally, the error means that for
whatever reason the context couldn't be created.  In case of the GL ES
2.0 context, there will often also be a message stating that Canvas 3D
didn't have the required OpenGL support; that means that your OpenGL
implementation doesn't support OpenGL 2.  However, for the gles11
context, there's something else going on; usually either a working
pixel format can't be found, or pbuffers are not available, or
something similar.
I'm going to focus on improving the error
reporting for the next release (probably in a couple of weeks) to try
to make it easier to diagnose these kinds of problems.
"

I will be patient to wait for the next version, by the way, C3D is not XML language, not X3D, VRML, you could check the source of those page, you could find the 3D object was createn by javascript language. I am not OpenGl specialist, I guess this extension will parse the object that createn by javascript and using the OpenGL prototype to display this object in browser.Such workflow is a little bit same as SVG 3D, which also use pure javascript to create 3D object.The difference is SVG 3D has no background 3D supportin.

But I still doubt, such technique could be used for 3D web map? Using javascript to create tons of objects is not one smart way, and it is not easy to query. Comparing to C3D, X3D and Vrml has better structure for web GIS. Ok, forget it, just for common users, it is one amazing thing to view real 3D image  in Browser. Smile

Ref:

http://blog.vlad1.com/2007/11/26/canvas-3d-gl-power-web-style/
https://labs.mozilla.com/forum/index.php/board,9.0.html


Blog

回應

Re: FireFox 3 now can support realtime Canvas 3D

That's way the bestest awnser so far!