How to update old code...tutorials?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to update old code...tutorials?

nyholku
Hi,

I'm updating old code (JOGL 1.1.1 or something) to this new thing I found today i.e. to JOGL 2 (I guess).

I think I've managed to configure my environment (Mac OS Lion/Eclipse) to use the new JOGL, but
as I can access stuff like "javax.media.opengl.GL" but lots of the stuff that used to be there
(say glEnableClientState,glVertexPointer etc) are not there anymore.

So the APIs have changed or what?

Am going about this the Wrong Way (tm)?

Any tutorials that would help me to close the gap?

br Kusti
Reply | Threaded
Open this post in threaded view
|

Re: How to update old code...tutorials?

gouessej
Administrator
Hi

I spent a lot of time in updating the JOGL user guide, I advise you to look at it, especially the part about the profiles:
http://jogamp.org/jogl/doc/userguide/
http://jogamp.org/jogl/doc/Overview-OpenGL-Evolution-And-JOGL.html

JOGL public APIs have changed a lot since JOGL 1.1.1 but I ported several engines, it is a quite straightforward task, you just have to replace some imports, a few classes (BufferUtil -> com.jogamp.common.nio.Buffers), some constructors use additional parameters, it is not difficult.

Good luck.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: How to update old code...tutorials?

nyholku
Thanks,

great tutorials, got my code to work in less than 10 minutes.

Basically the only thing I needed to figure out was that I needed to change my

        javax.media.opengl.GL m_GL;

to

        javax.media.opengl.GL2 m_GL;

and most every syntax error disappeared.

Then I just initialized my OpenGLJPanel with GLCapabilities as per your great
tutorial after which it Just Worked (tm).


Great job guys and thanks,

Kusti