Getting Started Help - Tutoritals Out of Date?

Hello all.

I have been following several tutorials to try and get started with JOGL but am finding that they are either very out of date or I download/installed something incorrectly.

I grabbed the latest “jogl.jar” and “jogl-natives-windows-i586.jar” from the JOGL homepage. I loaded them into IntelliJ Idea and began coding one of the many Hello World examples.

My first conflict is the import statements. The tutorials speak of “net.java.games.jogl”, but Idea wants to import “javax.media.opengl” – I looked in the jogl.jar file and the structure matches the latter, so I figured it had just changed.

However I run into another problem when I try to create my GLCanvas. The tutorials tell me to do the following:

GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());

But there is no “createGLCanvas” to the GLDrawableFactory class. Most perplexing.

Have things changed from the last tutorial updates, or did I install something incorrectly?

Thanks!

Use


GLCanvas canvas = new GLCanvas();
//or 
GLJPanle jcanvas = new GLJPanel();

Thanks kicklee.

Are there any updated tutorials that refer to the new(er) structure? One tutorial specifically says it is not possible to directly create a GLCanvas, which makes me wonder how accurate the rest of the information is going to be.

Thanks!

What tutorials are you referring to? I’ve found that by far the best code resources are the JOGL demos (on the jogl front page - just look for the jogl-demos.jar file). They aren’t exactly tutorials, but the simpler ones are basic enough that they should get you started, and most of the API that isn’t directly imported from OpenGL is well-documented. Also, if you haven’t looked at hte JOGL User’s Guide on the main JOGL page, that might help - it at least mentions most of the basic concepts…