Question

The story:

I been googling for some way of displaying computer graphics over the web using acceleration from video cards (no software renders). I know it is possible to write and activeX module for IE but that is not a complete solution as that would alinate a good amount of users (firefox + macOS fans). Here is an example of more less what I have in mind:

Example of a hardware acceleration on top of browser link


The query:

I recently found out that you can bind opengl calls with java from a browser using JOGL. So I was wondering some things:

A) Is JOGL the best solution for my story?

B) Can i query opengl extensions from JOGL?

C) How do i load textures from JOGL?


The comments:

If you have used JOGL from a browser please please let me know what problems/experiences you had from it.

Was it helpful?

Solution

You did not mention 'applet' in your question. Try searching for 'jogl applet' or 'lwjgl applet'. I have had more joy with LWJGL than JOGL but they should both satisfy your needs. You may also be interested in Java Web Start. Try the demos here for both Java Web Start and Applet-based examples using LWJGL, and here for a JOGL applet.

OTHER TIPS

I'm using JOGL on a major desktop application, and it's been successful. It's essentially as fast as OpenGL. I can't speak for anything about over the web - I suspect your best bet is to write a JOGL applet using WebStart. Have a look at some of the JOGL examples.

JOGl is a very thin wrapper over OpenGL. If you know OpenGL you can use JOGL. If you don't know OpenGL, learning JOGl is the same as learning OpenGL (not an easy task). Virtually anything you can do in OpenGL you can do in JOGL.

We have had issues with hardware acceleration on Linux (who doesn't) and some configurations of Linux will crash our JOGL app (not necessarily others). This is something of a known issue, and you are probably going to have some problems with 3D on Linux whatever you do.

I also know of other people using JME and LWJGL successfully on the desktop.

What worries me is that this forum is not used by Jogl programmers. There is a large and active Jogl community in NASA WorldWind - a very neat JOGL based app. There have been numerous derivatives and customizations inlcuding a whole virtual Slovenia in JOGL.

I have used JOGL for a desktop application with the GLUT toolkit and it worked very well ( I have also used the OpenGL bindings in C/C++ and Python) I cannot comment on running a JOGL app inside an applet...

I'm not sure what you mean when you ask how you can query the OpenGL extensions, JOGL is simply the OpenGL bindings in a Java API, so any OpenGL knowledge will map over to JOGL. If you haven't worked with OpenGL Bindings then I would recommend you picking up the red book: http://www.opengl.org/documentation/red_book/

A) I believe Java3D can use DirectX or OpenGL/JOGL where available, or fall back to software rendering. And it offers a scenegraph oriented API which is sometimes easier to program.

B and C) JOGL is a very thin but full-featured wrapper for OpenGL and its extensions. (Almost) everything you can do with OpenGL in C/C++, you can do in exactly the same way using JOGL.

You can watch interesting presentation on using openGL from Java on Parleys.

Presentation title is "High performant Java3D and 2D graphical applications"

A) Yes B) Yes, use GLBase.isExtensionAvailable() and GLBase.isFunctionAvailable() C) Use the class Texture and TextureIO. You can find fresh applet demos here.

Please don't use Java3D, it is obsolete and no more actively maintained. Ardor3D has an excellent JOGL 2.0 renderer (I wrote it ;)). JMonkeyEngine 2 supports JOGL 1.1.1a like Xith3D and 3DzzD.

Edit.: I resurrected Java3D with the help of Harvey several years after writing this comment, please have a look at my tutorial if you still want to use it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top