Catch 22 for jogl

WebGL won’t take long to become widespread, Firefox, Safari and Chrome already have it in nightly builds. IE will just be required to use the Chrome Framework plugin (like services like Google Wave already mandate) which is just a single click install.

So WebGL is definitely a technology to watch out for.

Yep, and my stack of topics to test is growing and growing :slight_smile:

One thing I’d definitely like to check with WebGL is which kind of “low-level” control it provides.
In term of paradigm, is it more like Jogl or Java3D?

WebGL basically exposes OpenGL ES 2.0 calls straight to JavaScript

It seems like we’re getting a bit off topic. I think it’s a waste of effort worrying about other languages gaining on java, etc. People used java when it was slow, we use it because we like the language. Performance is just a side benefit.
Ok, re-reading the posts maybe the javascript WebGL thing was a little more relevant. But the above is rant towards all the other conversations that worry about C# and actionscript, etc.

I suggest that we start a new forum post, probably in the JOGL section just so the jogl devs see it to further discuss the details of how to merge the projects. It will be very important to keep out any idealogical motivations for suggesting which project represents the internal core; that’s a decision best left to the dev’s who’ve spent years wrapping OpenGL and not us commoners who just use their product.

I have faith that the two projects can be successfully combined without damaging anyone’s ego, so long as we realize that the greater good of high performance, desktop Java is at stake.

Jogl and LWJGL are here for years, but still, the “expected breakthrough” did not happen yet.
Do you think that re-doing “more of the same” is the solution?

In the context of a big reformating, the subjects we have approached are actually very on topic.
I guess it’s all about keeping what we like (obviously: Java and OpenGL) while “not missing the right train” this time…

LWJGL was only one part of the puzzle wrt. the “expected breakthrough”. One of the other bits, plugin2, only came recently, as did JRE installation modularisation (although it’s still too big).

Cas :slight_smile:

What so special about plugin2? (no irony, just one 1 year of Jogl inactivity…)

I understand that applet performance have been enhanced…

How about certificates? Are they still required for OpenGL content?

And the long delay before the first VM launches: is it much shorter than once? Does it still freeze the whole browser (for a second or two ) like once?

  • faster startup, much faster then the horrid old applet plugin, which completely froze the computer for a period when starting
  • more stable, they don’t take out the browser as easily
  • ability to specify the amount of memory applet needs, previous plugin was limited to 64mb
  • ability to run each applet in a separate vm and not share with other applets (not sure why this wasn’t the case from the beginning)
  • ability to specify vm parameters
  • 64 bit support
  • support for jnlp applets
  • support for the magic certificate
  • and more

really, before plugin2 applets were horrid horrid things.

Was ist das?
good for jogl or lwjgl?

was good for jogl for a while (super awesome really :slight_smile: ), not sure what the current status is.

maybe if we can get a really nice library together Sun/Oracle will give us one or at least sign libraries for us.

Javascript is a god awful pile of shit. And it’s slow. Seriously, I do web development for a living, Javascript is my main language and it’s just awful. I wouldn’t code a game in JS unless I was paid to. And paid A LOT

WebGL excerpts from recently published interview with

Neil Trevett, Vice President Embedded Content, NVIDIA | President, Khronos Group, Nov. 2009, http://www.3d-test.com/interviews/khronos_2.htm

[i]WebGL is a low-level JavaScript binding to OpenGL ES 2.0, exposed through the HTML 5 Canvas element as Document Object Model interfaces.

WebGL can also bind to OpenGL 2.0 and above for 3D acceleration on desktop platforms. OpenGL 3.2 and OpenGL ES 2.0 are increasingly close in core functionality – and the OpenGL and OpenGL ES working groups are cooperating within Khronos to ensure the two APIs don’t diverge.

Will you be able to run the latest generation high-end first person shooters in JavaScript? Probably not. But the browser vendors are confident that JavaScript will deliver enough performance for a wide range of games, applications and user interfaces to be enabled using WebGL.

It’s an API NOT a plug-in!

The thing to realize about WebGL is that this is being DRIVEN by the Browser vendors – this is not plug-in vendors trying to push something into the Web.

All I can say is that Apple, Google, Mozilla and Opera are actively developing and promoting WebGL – and that WebGL prototypes are already appearing in open source browser builds. Microsoft is not a member of Khronos – but I would expect third parties to implement WebGL on Internet Explorer

There is no file format for WebGL. WebGL provides access to OpenGL ES from JavaScript – nothing more. For example, there is no support in WebGL for loading 3D models, for receiving input and interacting with the user, or for communicating over a network.

Flash is a ubiquitous part of the web – it will be widely used for a long time to come. However Flash is a plug-in – and so is very different to WebGL which enables direct access to 3D from the web page itself – each is suitable for different types of content.[/i]

August

I know exactly what you mean. I myself did a lot of JS once.
But take a look at the big picture…

Regarding the “development side”, no doubt: working on OpenGL projects with Java and tools like Eclipse rocks. It’s a developer’s nirvana (to which everyone in this forum is addicted…)

Regarding the “deployment side”: Java on the Desktop is a failure, for all the reasons already stated in this long thread. The bottom line is that you hardly reach any end-user.

Inversely, on the WebGL side: development is probably going to be much more painful. But deployment is going to rock. It will take time, but at some point: any web-page out-there will provide OpenGL surfaces mashed-up with web 2.0 live data sources. And this sounds as a much more effective opportunity to reach end-users.

So what is more important? Having fun developing stuff, or end-users having fun with what you developed?

Of course, we would like to have the best of the two worlds. For example, like Spasi previously proposed: a Java applet on one side, communicating inside the browser with a WebGL surface.

Is that the last opportunity to “make it”?
Or is it doomed already (Apple plays an important role in the WebGL initiative, and we know what their opinion on Java is…)

I’d like to point out that WebGL is actually considerably further behind Flash and even Java. Java’s actually in an almost-comfortable space right now with the advent of plugin2: it’s very nearly the same excellent experience that Flash is, when it comes to obtaining it, installing it, and trying content out with it. All it lacks is penetratration, which it will achieve comfortably over the next 3 years. It will then, because of its very nature, remain well ahead of the curve - the actual JVM is already vastly superior to anything JavaScript will ever achieve, being much closer to the metal.

Flash is almost certain to gain full hardware 3D acceleration in the next year or so, and will be at roughly the same position as Java here: they are, miraculously, both starting from the same point, more or less, as of right now. Java has the one small irritating extra step of having to approve a security certificate - something I would rather seriously like to discuss getting sorted with Sun, as it’s holding back their own product vs. Flash at this critical junction in time. Get LWJGL a magic cert and Java is suddenly ahead of Flash, right now, with the full capability of OpenGL from 1.1 through to the latest 3.2 bindings, on the desktop.

On the other hand, browser based 3D with WebGL requires the following to take place:

  1. WebGL to be actually finished
  2. Javascript engines on all major deployments to be fast enough to be worth it (so that means the entire IE6 and 7 and even 8 userbase is effectively buggered)
  3. Canvas support in all browsers to reach a level of penetration which will be equal to Flash and Java. Seriously, don’t underestimate this hurdle, just because you are geeks that run Chrome and FireFox. It will take at least four years before the installed browser base has the Canvas element. If you thought waiting for users to upgrade Java plugin technology was glacially slow, then upgrading browser technology is going to be like watching tectonic plates drift.
  4. At the end of the day, performance will be pretty crap compared to Java. Java is capable, today, of delivering the quality of, say, CryTek or Source or IDTech4, in the browser. It’s just going to take a big player to make that 3D engine for the sudden shift to occur. But then you’ve got this massive problem: decent 3D content takes about 100x more money to create. The “everything’s free” applet/flashlet model just won’t work out when you have to actually invest serious sums just to put this content on a page. So you scale back your 3D content to something fairly simple, or you borrow someone elses content… and then it’s suddenly not really necessary to have all that performance any more…

Cas :slight_smile:

All what you say, Cas, makes perfect sense.

There could be a kind of “rebirth and glory” period for Java in the Browser, but it won’t last forever.

At some point, browsers (Desktop and Mobile altogether) will become plugin-less, and it will be the end of Flash, and of Java-in-the-browser.
How and why? Ask Google and Apple… They lead (much better than Sun), and the world is following (their visions are simply truly user oriented…)

In that perspective (and for sure it’s a matter of long term), WebGL is interesting.
Not especially as a mean to produce 3D games.
But more like a generic Hardware Accelerated Graphics Library for the browser, truly integrated with any aspect of the the web experience.

Then, the following equation for “world domination” suddenly makes sense:

  1. Windows, OSX, etc. become Chrome OS
  2. Java, C++, etc. become Javascript
  3. Direct-X, OpenGL, etc. become WebGL

Having read a bit more about WebGL today, it’s clearly not something we can ignore. It may not be the answer today, but with this amount of buzz and backing it’s hard to imagine it not catching on really fast.

What has Java on the browser got going for it? sadly not a lot. Abandoned by Sun and crippled by Apple. The really sad thing is, it would only take a bit of effort to make it what it should have been. I guess that’s why we hang in pinning our hopes on things like pluggin2, newt, etc. But lets be realistic, thanks to flash, browser java has just gone out of fashion, and FX has already damaged what little reputation Java browser apps had left.

So the game has already changed. If we want to focus on desktop then I guess we can continue fighting with plugins and webstart. But the concept of plugin-less content is going to win out in the end…

Then we need to think about hardware. Where do you want your app to be run. It’s no longer a choice of which desktop OS’s, but also which devices. For me it’s currently the iPhone, but I’m not going to spend months working in objective-c, then switching to java for upcoming Android devices. Then back to objective-c for the tablet or whatever comes next. But my point here is that Apple have changed the game by not supporting Java on the iphone. And you could argue that even Android isn’t really supporting Java, they compile down to their own VM. A full JVM is just too heavy weight… although eventually this could change, but who is driving that?

If you want OpenGL content across all hardware (Desktop and Portable), then the only option is starting to look like WebGL. So from that side I can fully understand the buzz. Most of these devices already support ES and JavaScript out of the box, upgrading webkit or other browsers is automatic for most portable devices, and desktop users tend to catchup eventually.

So where does this leave us? Sadly, we are looking at a bleak future for Java+OpenGL. I’d love to be proven wrong, but at best it’s going to be a niche market in the end (maybe it already is). For a brighter future we’d need to see manufacturers boasting about Java support in upcomming devices, but I can’t remember that last time I saw that as a selling point on anything.

For me the above conclusion is grim. I loath Javascript as much as every other programmer I’ve ever worked with.
My only hope is that Google will absorb WebGL into GWT and allow me to to program against WebGL via Java.

Peter

[update] And so it begins… http://www.engadget.com/2009/12/03/nokia-n900-impressively-demos-webgl-3d-graphics/

Makes perfect sense. Be sure that someone is working on the topic out there :wink:

We even don’t have to wait that Google propose an Eclipse integrated way of writing Java+OpenGL code automatically translated to JS+WebGL…
The wonder boys of the new JS world ™ have already reached the required level of wizardry.

If you’re not convinced, take a look at Processing.js:
http://processingjs.org

And in particular the Web IDE:
http://processingjs.org/learning/ide

In short:

  • They built a small JS + HTML5-Canvas library, which simulates all the 2D stuff that you can do with the “real” Processing.
  • In parallel, they have a very simple JS layer which translates code written in the original (Java based) Processing syntax into JS.

I contacted the WebGL developers from both Firefox and Chrome and it won’t be possible to use Java applets to do GL rendering on canvas elements. The problem is mainly that the VM is running on a different process and it’s impossible to access anything (that isn’t “LiveConnected” Javascript) on the browser, at least not without changes in the Java Plugin. There may be a Chrome-only solution to this problem (won’t be available for about 2 months, it’s still in development), but I guess there won’t be much interest if it only works there.

It’s interesting to note that there’s already work done on enabling exactly this functionality for arbitrary plugins. It’s called the “Pepper” platform and it’s going to allow out-of-process plugins to work seamlessly with the rest of the browser, solving any threading and event handling issues. Quoting:

[quote]This proposal intends to be a starting point for addressing these issues, and consists of four topics.

  1. Giving a clear semantics to NPAPI across browsers that implement plugins in a separate process from the renderer/browser itself.
    2. Integrating plugin rendering with the browser’s compositing process, allowing HTML overlays, etc., to work correctly with plugins.
    3. Defining events, 2D rasterization, and an initial take on 3D graphics access in a way that is common across operating systems and browsers.
  2. Determining which plugins are available to a browser without loading the plugin. Although a much smaller issue, it is currently one of the more platform specific portions of NPAPI and one that lends itself to a relatively simple solution.
    [/quote]
    It’s much more than graphics only and I think it would be a shame if Java is left out of this.

By the way, Ken Russell (which is whom I contacted from the Chrome team) had this to say about the potential LWJGL/JOGL merge:

[quote]I think unifying LWJGL and JOGL would be a great idea, and I’d be happy to do anything I can, including putting you in touch with the Khronos consortium, to facilitate that.
[/quote]

Thanks for the interesting news Spasi!

btw I just grabbed the latest Firefox nightly to have a play with WebGL, wow! I’m sorry to say JOGL fans, we are gonna struggle to compete against this! Running OSX and the page load was just instant, no plugins, no downloads or certificates, just straight in to 3d! Although for serious development, I’m not sure people are gonna be happy exposing all their javascript code to the world…

Peter

Is obfuscated JS that much easier to read than obfuscated Java bytecode? It’s certainly a darn site harder than unobfoscated bytecode.

Obviously JS is not ideal for other reasons as well.