gl4java or jogl?

B

Bura Tino

Hi,

I've been looking at gl4java and jogl and I'm at a loss as to which
one to choose.

gl4java seems to be more mature and under more active development
(correct me if I'm wrong).

jogl seems to be slimmer and is more appropriate for applets (correct
me if I'm wrong).

Any thoughts?

Bura
 
R

Richard Ivarson

Hello!

Well, basically they're the same AFAIK, or to be more precise: the
newer Jogl bases on the older Gl4java (brought to us by Sven Göthel
and others). One day Jogl will be _the_ OpenGL for Java. There's a
connection between SUN and Jogl (did they start it? Do they maintain
it? Dunno. Anyway Sven did a nice "OpenGL for Java" presentation
together with a SUN man on a JavaOne mass last year or so).
However it's unclear yet if SUN is going to include Jogl in a future
Java. I really hope they do so, because otherwise it'll be difficult
to deploy Java applications which use OpenGL in a solid, proper and
straightforward way.

Currently you can just download the source code for Jogl, whilst for
Gl4java you can point anybody to the binary Gl4java bindings for Linux
(several processors), Win32 and AFAIK MacOS. So my current choice is
Gl4java, because everybody can install the few files pretty easy into
their already installed JRE.

From a programmer's point of view the difference between the two
bindings still is minimal. So if you issue your OpenGL calles via
Gl4java you can take your code and convert it to Jogl one day with
minimal changes.

AFAIK to all of the above. Please correct me if I'm wrong.

-ric
 
P

Peter Ashford

Richard said:
Hello!

Well, basically they're the same AFAIK, or to be more precise: the
newer Jogl bases on the older Gl4java (brought to us by Sven Göthel
and others).

Not entirely, it was a clean room implementation by some Sun engineers,
one of whom, Kenneth Russell, has been involved with gl4java for some
time. Its probably more correct to say that Jogl was 'informed' by
gl4java and other similar projects.

One day Jogl will be _the_ OpenGL for Java. There's a
connection between SUN and Jogl (did they start it? Do they maintain
it?

Yes to the former question (as mentioned above). It is maintained in
part by Sun engineers but the idea is for it to open up and be properly
open-source (via the BSD licence)
Dunno. Anyway Sven did a nice "OpenGL for Java" presentation
together with a SUN man on a JavaOne mass last year or so).
However it's unclear yet if SUN is going to include Jogl in a future
Java. I really hope they do so, because otherwise it'll be difficult
to deploy Java applications which use OpenGL in a solid, proper and
straightforward way.

Not really, if you use webstart you can distribute the required jars and
libs. Otherwise, an installer will do the truck.
Currently you can just download the source code for Jogl, whilst for
Gl4java you can point anybody to the binary Gl4java bindings for Linux
(several processors), Win32 and AFAIK MacOS. So my current choice is
Gl4java, because everybody can install the few files pretty easy into
their already installed JRE.

Prebuilt binaries will be there soon. Be patient, Jogl has only been
public for a few weeks!
From a programmer's point of view the difference between the two
bindings still is minimal. So if you issue your OpenGL calles via
Gl4java you can take your code and convert it to Jogl one day with
minimal changes.

Code using gl4java and jogl look similar, but Jogl is simpler, better
designed and more stable. Plus it is being actively develped whereas
gl4java is not. There *was* an effort to work on gl4java to move it
forward, but the people doing that have pretty much moved to Jogl
instead (being closer to being an 'official' openGl binding for java is
possibly the main reason why - they'd also solved some of the bugs that
people wanted to fix on gl4java).

My opinion is that people should use Jogl since gl4java is effectively dead.

Peter.
 
X

Xela

Your position about Jogl vs Gl4java is clear. What do you think
about Java3D ans Jogl. Is Java3D nearly dead?
 
P

Peter Ashford

Xela said:
Your position about Jogl vs Gl4java is clear. What do you think
about Java3D ans Jogl. Is Java3D nearly dead?

I can't really comment from a personal perspective since I have not used
Java3D. I saw some performance benchmarks of gl4java vs Java3D and it
scared me away for good ;-)

I have read comments from Sun people to the effect that internally
Java3D isn't dead yet.

If you want to read about this check the forum topic:
"Directions, LWJGL, JOGL, Signal and Noise"
in the forum:
"Java.Net - Games General Discussions "

at

http://games.dev.java.net/forums/

Here are some snippets from Jeff from Sun:


"FWIW it probably helps us if you keep up the noise about Java3D
support, too. I personally agree with those who say the industry wants
higher level solutions. I remember when I strated this every developer
I talked to said "screw that scene graph stuff, just give us OGL
bindings." Its ironic that support for J3D has come into question just
when its approach is finally becoming an accepted way of doing things in
the industry. But if you can communciate that fact to Sun management as
effectively as you have the need for OGL bindings then there is a lot
that could be done to address it"

" Well, all I can tell you is that JOGL, and the success of JOGL,
actually strengthen the case for J3D in Sun.

To explain why would take me into Sun internal politics I can't discuss
but I'm gonna ask you to trust me here that for J3D users this is, in
the long run, actually a good development. "

Take from that what you will.

Peter.
 
R

Richard Ivarson

Peter, many thanks for your information and corrections. Good to know
all this about Jogl.
[..] Its probably more correct to say that Jogl was 'informed' by
gl4java and other similar projects.

I see.

[..]
Not really, if you use webstart you can distribute the required jars and
libs. Otherwise, an installer will do the truck.

I don't like Webstart and I intend to deploy without Internet
connection. :) However when Jogl JARs and BINs will be there and its
installation to the JRE simple, it won't be a problem.
[Jogl] Prebuilt binaries will be there soon. Be patient, Jogl has only been
public for a few weeks!

Ok, of course we'll be patient then.
Code using gl4java and jogl look similar,

This is what I've meant.
but Jogl is simpler, better designed and more stable.

Great to know.
[Jogl] (being closer to being an 'official' openGl binding for java is
possibly the main reason why

Yes, that's an important point. Also for developers "just" using
OpenGL for Java: one can't start a Java project which bases on OpenGL
when it's unclear if the OpenGL binding for Java will still be there
in a year or so.
My opinion is that people should use Jogl since gl4java is effectively dead.

Ok, this convinces me too.

-ric
 
S

Scott Ellsworth

Xela said:
Your position about Jogl vs Gl4java is clear. What do you think
about Java3D ans Jogl. Is Java3D nearly dead?

I am a Mac programmer, which is a platform that does not have a Java3D
implementation. I would have considered Apples' "Use jogl" position
self serving had I not had a friend go to JavaOne this year. Java3D is
dead, as best as he can tell, and jogl is central to the recently
announced Java Gaming Initiative.

So, Sun wants Jogl to succeed, and Apple already has working bindings
for it. Damn cool.

Scott
 
P

Peter Ashford

Bura said:
Hi Peter,

So I've gathered that jogl is the the answer. I just looked at
http://jogl.dev.java.net/ and I'm a little confused... Would I need to
compile the project myself or are there binaries available? Sorry if I
missed them.

Bura

Making prebuilt binaries is still on the 'todo' list, as far as I can see.

I've built jogl myself and it wasn't too difficult - but you need to
download Antlr, and have VC++ installed.
 
B

Bura Tino

Peter Ashford said:
Making prebuilt binaries is still on the 'todo' list, as far as I can see.

I've built jogl myself and it wasn't too difficult - but you need to
download Antlr, and have VC++ installed.

I'm sorry to press on this point a little bit, but does everybody who
uses jogl have to do this? I've heard of many people using jogl and
it's hard for me to believe that everybody has compiled their code. In
any case, I don't have VC++ and to tell you the truth, I've never done
C++ in Windows.

Does that change your recommendation? Should I use gl4java until there
are prebuilt binaries? Or is there an older version of jogl that does
have prebuilt binaries (and installation instructions!)?
 
P

Peter Ashford

Bura said:
I'm sorry to press on this point a little bit, but does everybody who
uses jogl have to do this? I've heard of many people using jogl and
it's hard for me to believe that everybody has compiled their code.

Well, believe it - it's true.

I have raised the issue of pre built binaries as a bug and mentioned it
on the jogl forums. I would expect it will be fixed within a few days.
In
any case, I don't have VC++ and to tell you the truth, I've never done
C++ in Windows.

Does that change your recommendation? Should I use gl4java until there
are prebuilt binaries? Or is there an older version of jogl that does
have prebuilt binaries (and installation instructions!)?

Well, I wouldn't commit myself to a long term project on the basis of
not being able to solve a short term problem. YMMV.

Unfortunately there are not older versions of Jogl available - as I
mentioned before, it has only just become avaiable at all.

Cheers,

Peter.
 
J

JK

The lack of a Mac port has always been a drag with Java3D. Also, the
Linux port had quite some flaws, which resulted in "Java for Windows
only" attitude of many Java3D developpers and implementors. Into the
bargain, AFAIK Sun never released the source code, making ports even
more difficult.

Nevertheless, I like the high-level API, and it makes me frightened to
programm in OpenGL in the future. (In fact, I only had a short look at
OpenGL, but it looked so damn low-level and C-like that I simply let it go).

Most Java3D implementations are based on OpenGL and my impression is
that even the Windows users prefer the OpenGL version to the DirectX one.

So why not build a (portable) Java3D or a similar high-level interface
on top of Jogl? Are there any plans to do so?

Regards
JK.
 
P

Peter Ashford

JK said:
The lack of a Mac port has always been a drag with Java3D. Also, the
Linux port had quite some flaws, which resulted in "Java for Windows
only" attitude of many Java3D developpers and implementors. Into the
bargain, AFAIK Sun never released the source code, making ports even
more difficult.

Nevertheless, I like the high-level API, and it makes me frightened to
programm in OpenGL in the future. (In fact, I only had a short look at
OpenGL, but it looked so damn low-level and C-like that I simply let it
go).

Most Java3D implementations are based on OpenGL and my impression is
that even the Windows users prefer the OpenGL version to the DirectX one.

So why not build a (portable) Java3D or a similar high-level interface
on top of Jogl? Are there any plans to do so?

Regards
JK.

It seems to me like an obvious thing to do, but I don't know of any
plans to do so as of yet.

A current option for people wanting a scenegraph on top of Jogl is
OpenMind at http://www.mind2machine.com/gb/openmind/index.php. Note
that OpenMind is open source and currently needs a few more features,
though is reasonably impressive as it is (it's quite swift). OM's focus
is squarely on games programming.

Hope that helps :)

Peter.
 
B

Bura Tino

Peter Ashford said:
Well, believe it - it's true.
Amazing! :)
I have raised the issue of pre built binaries as a bug and mentioned it
on the jogl forums. I would expect it will be fixed within a few days.

Thanks, I'll be checking in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top