Advertisement Jump to content


This topic is now archived and is closed to further replies.


OpenGL Question re:OpenGL/Java3D

This topic is 5339 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sorry if this should go into the Java forum... After putting it off forever, I finally decided to learn Java after a long time with C++. I''m pretty comfortable with Java now. I''ll keep this short... What are your thoughts on the Java3D API? I''ve heard performance has improved immensely recently. I''m about to delve into it, and I wanted to know if its actually worth my time. I did notice that it appears to do what Java usually does, which is to implement things the way they think that they should be implemented without an easy way to take a different approach... in this case the whole thing seems to be built on their scene graph. I may be wrong. Thoughts?

Share this post

Link to post
Share on other sites
Java3D is not OpenGL, it just happens to use OpenGL or DirectX under the hood (depending on what the user has installed). Instead you use the Java3D scenegraph to setup your world and you let it sort out the drawing for you. Which means you don''t have to worry about low level rendering stuff, but it does mean you don''t get acess to much fancy features (no stencil buffer, and don''t even think about vertex or fragment programs). On top of that while its not officially dead its not been updated in ages.

If you''re after regular OpenGL, try LWJGL (or Jogl if you''re a sadist). IMHO its a much better choice, not only because you get proper OpenGL features but because you can then distribute it with Webstart (Java3D doesn''t work with webstart properly, if at all).

If you really want a high level scene graph, consider Xith 3D instead.

Share this post

Link to post
Share on other sites
No, 1.5 only includes under-the-hood OpenGL acceleration for regular Java2D operations. Much like libraries like SDL provide their own API yet may use OpenGL behind the scenes. 1.5 doesn''t let you actually send OpenGL commands yourself.

Share this post

Link to post
Share on other sites

there they talk about

GL gl = drawable.getGL();
gl.glClearColor( 1.0f, 1.0f, 1.0f, 1.0f );
gl.glColor3f( 0.0f, 0.0f, 0.0f );

and more quotes : "But what is this GL class? The docs define it as "the basic interface to OpenGL." As mentioned above, its design is almost like a straightforward dump of the gl.h header file"

Share this post

Link to post
Share on other sites
Jeez, at least *read* your own links.

"A reference implementation of the Java/OpenGL binding is hosted on as the JOGL project."

Its talking about Jogl, which is an additional library (like LWJGL) which you use alongside your regular JRE. It is not included in 1.5, and is avalible for use with a 1.4 JRE. And if you actually read my first answer you''d see I''ve already mentioned it.

Share this post

Link to post
Share on other sites
From the folks at Sun:

From: Doug Twilleager
Reply-To: Discussion list for Java 3D API
Subject: [JAVA3D] ANNOUNCEMENT: Java 3D plans
Date: Wed, 17 Mar 2004 21:28:28 -0800

We take this opportunity to announce that Sun is renewing its
commitment to Java 3D. The highlights of this announcement are:

. Sun is in the process of making the source code for Java 3D
available through a public source license in the very near

. Sun will work with the Java 3D community, via the Java
Community Process (JCP), to actively evolve the API going


The renewed emphasis on Java 3D complements Sun's increased efforts
in the desktop space and the recent release of the Java Desktop System
(JDS). More information will be forthcoming, but here are a few
details concerning our plans.

. Sun is right now working on making the source code for Java 3D
available through a public source license. This will be done
via a project, which will include a developer's web
site and CVS repository. This will allow developers to
download the Java 3D source code, and to contribute bug fixes
and utilities. The time frame for this release is before
JavaOne 2004.

. We will be forming an expert group under the JCP process to
define and implement the next version(s) of the Java 3D API.
Our current thinking is that we want to work with the expert
group to create a 1.4 version of the Java 3D API that will add
programmable shaders, and possibly other critical features, if
they can be done without architectural changes to the
implementation. We hope to get this release out relatively

. We also want the expert group to help define the next major
revision (1.5? 2.0?) to the Java 3D API, which could involve
more widespread changes to the API.

We look forward to working with the Java 3D community to move the
API forward.

Doug Twilleager
Sun Microsystems

[edited by - Dave Hunt on June 4, 2004 9:46:41 AM]

Share this post

Link to post
Share on other sites
So, will LWJGL still allow the games to be completely portable, or will it involve some native stuff? Of course, I''m going to check it out myself, but I have almost no time for a few days. Just reading the top of that link you provided definately interested me.

Thanks for all of the responses.

Share this post

Link to post
Share on other sites
It means you end up with native code for each platform (win32, linux, MacOS) but thats all hidden in the library, all your actual game & graphics code is written in Java and the same for all. Your final files end up being YourGame.jar, LWJGL.jar + whatever native files for the correct platform.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!