wrapper API for JOGL?

Normally I distribute my JOGL program as a Java Web Start desktop application but recently I was able to experiment with deploying it as a signed applet:
http://earth.whoola.com:8080/space/cyber/doc/applet/

I would like to be able to deploy it as an unsigned applet so that it will enjoy more widespread use. My ideal solution is a wrapper API based on interfaces mirroring the JOGL API that would delegate to the native bindings and hardware rendering when available. It would fall back to a pure Java implementation based on the Java2D API for software rendering when the native libraries could not be installed due to platform or security sandbox restrictions. It might also permit developers to switch between different vendor implementations of the JOGL API at runtime by specifying the desired object factory.

I am considering creating this wrapper API. Is something like this already available?

Related:
http://www.java-gaming.org/forums/index.php?topic=11311.msg116827#msg116827

I am by no means an expert about this, but I’ll hazard a suggestion anyway.
Since JOGL is a wrapper in the first place, wouldn’t it be feasible to have a JOGL implementation that can fall back to software rendering, like the mesa3D lib ?

Of course, you might run in a catch22 where the java2D lib tries to “accellerate” through JOGL, and JOGL “decellerates” again through Java2D ::slight_smile:

I’ve heard that the Golden-T game engine is a wrapper that works using LWJGL or Java2D , but I haven’t looked into it.

Just a thought, but if you’re using JOGL to do 3D stuff then substituting Java2D will be slow unless you use the openGL pipeline since otherwise image scaling will be super slow (<2FPS, even with the direct 3d pipeline fully enabled).

i think you have run into the same issue that many do. namely, what are the trade-offs when ensuring compatibility. as someone who does quite a few freelance projects in flash i run into this all the time. i think there is no good technological solution to this at this time. there are simply too many platforms and implementations out there. in java specifically, there could be even more change on the horizon if it is opensourced.

in short, i think you will simply have to make tough decisions. how important is the acceleration? does the accelerated version offer a significantly different experience ( i.e. would you be willing to do away with it for wider compatibility )? if it does, maybe it’s worth it to the user to agree to accept your certificate. another approach ( which unfortunately i feel compelled to do ), is to mask this decision from the user. search their system information, ask them some questions, and add code that will make the decision for them. for example, if they are running old java vm, or browser, they probably don’t have what your accelerated version needs, so redirect them to or instantiate a software rendering app. if they’re all new and fancy, they may be willing to accept some machine code from you. in return though, they had better get something extra for their effort. just tell them in advance what you are doing so they don’t freak when they see the certificate. even explain the sandbox concept if necessary, although probably TMI (too much information).

with something like flash, it’s more about versioning, thus about what flash capabilities can my app use. java adds the power, and hassle of being able to allow the user to safely accept JNI machine code for their platform; that makes it about trust. java is a little over the top with it’s bank corporation looking security windows. they could learn something from flash: aesthetics and graphic design are as important as code. anyway, just some ideas about making tough compatibility choices.

cheers.

Are you aware of the JOGL Applet Launcher, which takes care of the sandbox restrictions by virtue of Sun providing the signed applet? You can deploy your applet as an unsigned one within this container.

To be honest I can’t currently recommend applet-based deployment for JOGL due to lack of robustness on some platforms, but the option is there if you need it. I personally recommend using Java Web Start for deployment.

Yes, check it out:
http://earth.whoola.com:8080/space/cyber/doc/applet/

Thanks for your input everyone. User “thijs” found something I might be able to use:
http://www.java-gaming.org/forums/index.php?topic=11311.msg116856#msg116856

I am having some success in creating a JOGL-compatible wrapper API for jGL, a pure Java implementation of OpenGL. I am calling it the Java Interface to OpenGL (JIGL) because it lets you “jiggle” between JOGL-based hardware rendering and jGL-based software rendering at run-time. More on this here:

Got


Internal Server Error
Error 500

:-\

Nice to see jGL is put to good use!
It’s will be a nice alternative for jogl applet games, though I remember jGL’s implementation was somehow limited?

jGL has not been updated since 2003. I might have to add some bits and pieces here and there.