Jump to content
  • Advertisement
Sign in to follow this  
draginx

[java] To use OpenGL or DirectX?

This topic is 4693 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

I'm pretty new to the game developing world (excluding text-based browser games). I think I'm ready to evolve into something a bit more so to speak. =) Was wondering if I should use OpenGL or DirectX for Java 3D Programming? Like the cons, pros, etc. Yes, Google was a friend, but didn't find enough information to exactly go on one's side (by a lot anyway).

Share this post


Link to post
Share on other sites
Advertisement
EDIT: Oops, didn't see the Java bit, so what I say may not apply. I know nothing about DX implementations for Java.

I haven't used DX much, but I think these points are worth considering...

OpenGL

Pros:
. Little initialization, so creating apps is easy
. NeHe's tutorials are great for beginners

Cons:
. The nature of the ARB board and Extensions mean that using new technologies can be difficult and confusing
. No SDK

DirectX

Pros:
. Everything you need is in one package
. The SDK comes with some extremely useful examples, especially of some of the more advanced concepts

Cons:
. Initialization can be long and confusing

[Edited by - MumbleFuzz on October 11, 2005 5:25:59 PM]

Share this post


Link to post
Share on other sites
Just before this thread totally degrades, I want to doubly bring attention to the fact that he is using java, which throws a bit of a wrench in things.

Share this post


Link to post
Share on other sites
For Java, you say? I'm not aware of any Direct3D bindings for Java, so your choice of language limits you to OpenGL (unless I'm wrong, in which case, please point that out.) There are a few ways to use OpenGL in Java- the best I've come accross is LWJGL. I'm using it for my current project, and I'm very happy with it. Bear in mind that the documentation is a work-in-progress, though.

Share this post


Link to post
Share on other sites
A second recommendation for LWJGL. Given that functionality-wise they're identical, and you're already writing cross-platform java code, why tie yourself to windows by using DX?

Share this post


Link to post
Share on other sites
I've seen a demo of a Java program that used Direct3D for graphics, so it is possible, just not very common. On the whole you'll find far more resources for using OpenGL with Java than you will Direct3D, so if you don't already know both Java and Direct3D like the back of your hand then I'd say go with OpenGL.

Share this post


Link to post
Share on other sites
My company used to have a Java3d engine. I beleive Java3d had DirectX and OpenGL libraries 2 years ago, however you werent directly using either one, rather the Java3d scenegraph. And the directX version was even buggier than the OpenGL version.

Not too useful, but I thought I'd also mention I've seen DirectX sort of exist in Java.

Share this post


Link to post
Share on other sites
Quote:
Original post by draginx
Yes, Google was a friend, but didn't find enough information to exactly go on one's side (by a lot anyway).


Which should tell you all you need to know, if you think about it. The reason they both exist is that there is no "best" choice. Now, I have no clue how they work with Java, or even if both are possible to use with Java, but no, there is no simple answer or "best graphics API".

Some people prefer OpenGL (it's not object-oriented, which some people prefer, it's easy to set up and initialize, it's more portable as an open standard)
Others like DirectX (Object-oriented, big SDK with everything you'll need, limited to Windows, updated regularly, well documented)

And some just use whatever they're told to use.
The thing is they both provide hardware accelerated 3d graphics, so they both get the job done. Pick whatever works in Java, and whatever you like the best.

Share this post


Link to post
Share on other sites
To be honest, this is likely to be better answered by a group of Java people than a group of Graphics people, so I'm moving this to the Java forum.

Share this post


Link to post
Share on other sites
A wise move, but I expect he's lost the post now :)

OpenGL all the way for Java. There are no Direct3D bindings.

Cas :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!