ok, so i’ve downloaded GL4Java, now what do i use to actually start writing java and opengl in? i tried opening it in textpad but it comes up with loads of errors and when i open the html file that came with the tutorial nothing is displayed even thouh i have downloaded the whole java pack from sun.com and GL4Java. So basically, what program can i use to simply start writing java code and opengl? i’m really getting confused reading all the ‘‘help’’ files. thanks
You need to put the gl4java.jar file in your java_sdk/jre/lib/ext library, then put the dll files somewhere in your path so you will be found.
After that it should work, just pop up one of the example html files in your browser (with Java enabled…), if it doesn’t work you should get an error message, check the statusbar in IE for example.
ok, i open and view the examples but what do i actually use to create my own java and opengl games/graphics etc. what do you reccomend?
Are you talking about the IDE here ?
In that case I think you should ask that question in the forums at java.sun.com you would get much better answers from fellow Java developers I think.
IDE’s are tricky, what I like, you might hate, I think you should try some of them for yourself.
JEdit is a very nice editor with lots of plugins available for Ant, project management and so on. www.jedit.org ?
Forte/SunOne/NetBeans is big nasty beasts, a little slow, memory hungry, but it does support all kinds of Java development. www.netbeans.org ?
Eclipse is another choice, smaller then NetBeans, I have never tried it but it does look nice.
There there is of course lots of others, if you are willing to pay for it, the choices are even greater.
I recommend reading something programming, particularly about Java, games, and OpenGL if you want to write that kind of stuff. Actually, I’d recommend using C++ if you intend to write games.
What I wouldn’t recommend is waiting here for someone to teach you how to do all of this stuff.
First of all, using OpenGL from C/C++ and with gl4java is the same this.
In C code could look like:
glVertex3d( 0, 0, 0);
glVertex3d( 1, 1, 1);
In gl4java it would look like:
GL.glVertex3d( 0, 0, 0);
GL.glVertex3d( 1, 1, 1);
So you do need some knowledge about evenhandling on AWT to get mouse clicks and so on to work, but there is example code included with gl4java for this.
You can leanr how to use OpenGL from a lot of sources, get a book if you like that (some are available online on the web), look at the FAQs on this site and there are lot’s of useful links on this website.
If you to know something specific, google is a very useful tool.