Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java programming DirectX and OpenGL

Status
Not open for further replies.

fatcodeguy

Programmer
Feb 25, 2002
281
CA
Anyone know if I can do this in Java? Any good tutorials/books anyone can suggest? Thanks
 
OpenGL and DX is actually interface for hardware. Java was created as language that is independent from hardware such as it is possible. It is some sort java philosofy... So, as I know there is no support for any 3d accelerators. If you want to work with 3d on java then you must write your own classes for rendering :-( or use others java classes. I know only one seriouse trying to do something like this, it is shout3d classes...
 
opengl4j does also exist it is a opengl implementation vor java
 
I've been working with GL4java for about 2 months now and Java 3D for a few months before that.
Java 3D is good if you don't want to spend too much time doing low-level 3D stuff, plus the fact that it uses a scene-graph makes it easier to understand, in my opinion, than GL4Java. The problem that made me switch was Java3D has no Mac support yet, which seems to me to defeat the purpose of Sun doing a 3D package in the first place. There are versions for both OpenGL and DirectX with Java3D.
GL4Java is a straight port of OpenGL to Java, meaning anything you can do in OpenGL, you can do in GL4Java. It supports all OS's, as far as I know. Also, its like learning 2 things at once, since once you get the hang of it in Java, you can turn around and port it to C, C++, etc... with very little effort. The downside is that you have to code more because it's a stright port and doesn't offer the nice utility classes Java3D does. However, there are a lot of OpenGL tutorials out there to teach you how to do these things, so if you're up to learning it, I'd recommend GL4Java.
Let me know if you need any help.

Hope this helps with your decision [smile]
MarsChelios
 
To MarsChelios: As I understand GL4Java is not included
into Java SDK? So there should be some packages ( or sources ) somewhere... Can you give a link to them?
I am actually wondering in 3d graphics, but openGL is
the thing that I wanted to study long time ago but I was
to lazy for it ! :) It seems like now is the time!
 
Yeah, sorry about that, I should have included a link in that last post.
This is the home page for GL4Java, it's got the downloads, some demos, etc. Another good site to check out is NeHe's, an OpenGL tutorial repository. There are actually some ports of the demos on the GL4Java site, but you still might want to check it out for some more tips. Theres an online PDF book that's been out since OpenGL started called "The Redbook" that has really helped me learn OpenGL, so here's that.
Hope this Helps
MarsChelios
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top