This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Game Development and the fly likes JOGL or LWJGL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "JOGL or LWJGL" Watch "JOGL or LWJGL" New topic
Author

JOGL or LWJGL

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

So which is your preferred OpenGL Java implementation?

JOGL or LWJGL?

Anyone activly using either one for any projects?
[ July 31, 2004: Message edited by: Gregg Bolinger ]

GenRocket - Experts at Building Test Data
Nick George
Ranch Hand

Joined: Apr 04, 2004
Posts: 815
I've made extensive use of the JOGL binding lately, and have found it to be excellent. I am extreamly excited by the exquisite graphics I've made with it, making expert quality games, exceeding my expectations.

Anyhoo... Never used the other one, but I'm a huge fan of JOGL. Simple, makes sense, and looks good.


I've heard it takes forever to grow a woman from the ground
Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

I have a more basic question than this. How do you know when to use an OpenGL implementation or a higher level API such as Java 2D or 3D? Does it depend on how much control you need to have over the images? What else does it depend on? I have seen some pretty cool looking games that were built with 2D and 3D.

thanks,

B
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Barry Andrews:
I have a more basic question than this. How do you know when to use an OpenGL implementation or a higher level API such as Java 2D or 3D? Does it depend on how much control you need to have over the images? What else does it depend on? I have seen some pretty cool looking games that were built with 2D and 3D.

thanks,

B


Java 2D only uses the Opengl pipeline with version 1.5+. Java3D used Opengl or directx depending on the implementation you chose. Java3D was put on the back burner because of JOGL development. Developers who use Opengl typically don't want a higher level API. Java3D didn't allow you any access to OpenGL calls directly. So you were at the mercy of Sun's implementation.

2D vs 3D is just that. Do you want to create a 2D game or a 3D game? However, you can still create 2D games using Opengl. And this is what I prefer to do.

I have seen some pretty cool looking games that were built with 2D and 3D

What games? And what do you mean by saying "built with 2D and 3D"? 2D and 3D what?

The real question is not do you do 2D or 3D but rather what do you use for either? And there is really only 3 choices. DirectX, SDL, or Opengl.

All 3 API's will do 2D and 3D. But DirectX and SDL provide a lot of wrappers and special libraries for things like loading images/textures, sound, etc.

I'll stand behind this statement though. If you want the most power and flexability, using Opengl is the way to go. Funny, now that brings us right back to my question. Which Java GL Wrapper do you prefer and why?
Nick George
Ranch Hand

Joined: Apr 04, 2004
Posts: 815
If I understand Barry's question, he's wondering when you should opt for the Java3D API over any of the OpenGL wrappers. I've used both Java3D and JOGL (an openGL binding), and I'd have to call JOGL better in just about every respect. Java3D does things in a very convoluted way that just doesn't seem necessary to me. JOGL seems far simpler, and as far as I can tell, it's faster too, but that could be nonsense. Anywhoo, I'd be hardpressed to think of a situation in which I'd prefer Java3D.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Joseph George:
If I understand Barry's question, he's wondering when you should opt for the Java3D API over any of the OpenGL wrappers. I've used both Java3D and JOGL (an openGL binding), and I'd have to call JOGL better in just about every respect. Java3D does things in a very convoluted way that just doesn't seem necessary to me. JOGL seems far simpler, and as far as I can tell, it's faster too, but that could be nonsense. Anywhoo, I'd be hardpressed to think of a situation in which I'd prefer Java3D.


Java3D is a SceneGraph implementation of a 3D environment. It builds everything as nodes on a tree in order to view them in the world. The SceneGraph idea is a good idea. Sun's implenentation of it sucked. JOGL is nothing like Java3D. You can't really compare them because they are 2 different animals even though the end result might be the same.

Java3D didn't allow you any access to opengl calls. With JOGL everything is Opengl calls. Java3D was a lot more like DirectX and JOLG is simply Opengl using the Java language.

In fact, if you were going to use Java3D you might as well use Directx because

a. DirectX is better than Java3D
b. Java3D only ran on Windows (and solaris, but who cares about that one for gaming, and don't even mention Linux Blackdown).
[ August 02, 2004: Message edited by: Gregg Bolinger ]
Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

If I understand Barry's question, he's wondering when you should opt for the Java3D API over any of the OpenGL wrappers


You understood correctly. Thanks for clearing that up.
Robert Chisholm
Ranch Hand

Joined: Jul 18, 2004
Posts: 69
I spent about 2 years contributing to the project here (www.glscene.org); most notably adding an Octree spatial partitioning class, along with fast Octree collision-detection algorithms.

My question to you JOGL guys... is the project open to code contributions? Does it have Octree or B-tree algorithms?

I might get back into OpenGL development if I can find a good Java graphics library I can hook into. I don't have time these days to go back to Delphi or C++ very often.


SCJP 1.4<br />(WIP) SCJD B&S v2.3.3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JOGL or LWJGL
 
Similar Threads
Possible Java Applications
newbie to opengl
JAVA 3D for MAC
3d objects in java
In Game Opengl GUI