views:

1072

answers:

7

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.


Many Thanks!

As always everything is welcome.


A: 

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/

mmattax
When I say query opengl extensions... I mean how do i know an "X user" for example has FBOs? ... normally in opengl you query if the extension is available.... so is this posible to do in JOGL?
StfnoPad
+2  A: 

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.

Liam
A: 

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.

palm3D
If i remenber well Java3D was terribly slow... and did not have fragment shaders... but that way a few years ago.
StfnoPad
Java3D can be fast, but you may have to implement your own culling algorithms to get there. Vertex and fragment shaders are now supported.
palm3D
A: 

Only three replies of people using JOGL ... haha that worries me always.

Thanks everyone.

StfnoPad
A: 

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

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

Chobicus
+2  A: 

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.

DJClayworth
+1  A: 

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.

whatnick