PDA

View Full Version : sneaking GL into browser



ugluk
08-21-2010, 05:17 AM
Now and then I find myself in a situation where I'd like to share some GL work of mine with the forum. The traditional way to do this was to write a Java applet. This was a rather long time ago.

Are there other ways to do it? Is this easy to do with C#? I am under the impression C# web applications are DirectX or XNA, but not GL.

I suppose for a C++ app the only way would be to support NSAPI or some IE plugin API?

I suppose WebGL would qualify as a modern way for GL-in-a-browser-app.

Any thoughts?

zeoverlord
08-21-2010, 11:25 AM
Yea WebGL would be the way, it's by far the most flexible way and you could use it in a html document as you would an image, meaning you could do some pretty interesting stuff with it and all the gui stuff you need is already built in.

Alfonse Reinheart
08-21-2010, 12:36 PM
Now and then I find myself in a situation where I'd like to share some GL work of mine with the forum. The traditional way to do this was to write a Java applet. This was a rather long time ago.

I thought the traditional way was to give someone an application via .zip file.


Yea WebGL would be the way

A way perhaps, but not necessarily the way. Until Microsoft makes a commitment to support it in IE (fat chance), you won't get particularly wide coverage with WebGL. Firefox won't have support til 4.0 (which is enroute), and I'm not sure when Chrome will get support. I don't recall if Opera is going to support it or not.

Dark Photon
08-21-2010, 01:54 PM
Firefox won't have support til 4.0 (which is enroute), and I'm not sure when Chrome will get support. I don't recall if Opera is going to support it or not.
You can grab pre-built Chrome or Firefox packages right now if you want to try out WebGL in a browser:

Chrome: http://build.chromium.org/buildbot/snapshots/
Firefox: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/

For chrome, run chrome --enable-webgl --in-process-webgl
For firefox, surf about:config, set webgl.enabled_for_all_sites = true

Useful WebGL links:

* WebGL Wiki (Tutorials, demos, etc.) (http://www.khronos.org/webgl/wiki/Main_Page)
* WebGL Forums (http://www.khronos.org/message_boards/viewforum.php?f=34)
* Shortest WebGL Example (http://guciek.net/en/3d/shortest_webgl_example)
* WebGL Examples (http://www.ibiblio.org/e-notes/webgl/webgl.htm)
* WebGL Interactive Models (http://www.ibiblio.org/e-notes/webgl/models.htm)
* WebGL Cheat Sheet (http://www.nihilogic.dk/labs/webgl_cheat_sheet/WebGL_Cheat_Sheet.htm)

So far I've seen better perf with Chrome.

ugluk
08-24-2010, 08:27 AM
I thought the traditional way was to give someone an application via .zip file.


It is possible to spread a virus that way.



A way perhaps, but not necessarily the way. Until Microsoft makes a commitment to support it in IE (fat chance), you won't get particularly wide coverage with WebGL. Firefox won't have support til 4.0 (which is enroute), and I'm not sure when Chrome will get support. I don't recall if Opera is going to support it or not.


IE does not have absolute power anymore. If M$ wants to avoid losing IE market share, it won't be able to omit WebGL for long. I think WebGL is a better alternative to flash, shockwave or some other proprietary solution.

None of you commented on Java, which I kind of approve. We're all C++ people here.