Using code of JOGL 1.0 in JOGL 2.0

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

Using code of JOGL 1.0 in JOGL 2.0

Jerry
Hello ,

Is it possible to use a code of JOGL 1.0 in JOGL  2.0 ?

Meaning , if I have a code of jogl 1.0 then it would work perfect in jogl 2.0 , without renaming any methods  .

I'd appreciate any help

Jerry
Reply | Threaded
Open this post in threaded view
|

Re: Using code of JOGL 1.0 in JOGL 2.0

Pixelapp
Does it immediately work? No.

Is it easy to port? Yes.

You just have to change about 2 or 3 method calls and then change names like GL1 to GL2. And that's all you will need to do.

Feel free to come back to the forum if you experience difficulties while you work on it.

Reply | Threaded
Open this post in threaded view
|

Re: Using code of JOGL 1.0 in JOGL 2.0

Jerry
Thank you !

Can you please specify which methods do I need to change ?

Furthermore ,do you if there is a JOINT package of JOGL 1 & 2 together ? meaning that instead
of renaming GL1 to GL2 , the package itself would recognize the Jogl type , and use the appropriate
jogl (either 1 or 2) .

10x again
Reply | Threaded
Open this post in threaded view
|

Re: Using code of JOGL 1.0 in JOGL 2.0

gouessej
Administrator
Hi

PixelApp is right. Please just port your source code from JOGL 1 to JOGL 2. It is not possible to use several versions of GlueGen in the same classloader, then it is not possible to use several versions of JOGL in the same classloader. Using separate classloaders is probably not what you would like to do and more complicated than simply porting your code.

A few classes have been moved and/or renamed, for example BufferUtil is now com.jogamp.common.nio.Buffers. GLCanvas has been moved into the sub-package awt. Please look at our Java documentation. Profiles have been added and you have several interfaces instead of only GL, please have a look at the wiki for further explanations. I remind you that renaming GL to GL2 won't work if some methods have been moved into another location.

We won't provide joint packages and it would be a very bad idea. I have very often repeated during the last 3 years than JOGL 1 is obsolete and unmaintained. Almost nobody is still able to build it and we won't backport our bug fixes. We don't provide any support for this version, we only support JOGL 2 (and later versions).

Some of us already encourage and provide some help in porting process. I ported LibGDX JOGL backend with Xerxes' help, I ported JOGL JMonkeyEngine 3 renderers, I initiated the port of Java3D, I ported Ardor3D to JOGL 2... This is often not very difficult. I won't encourage any project attempting to use an obsolete version of JOGL.
Julien Gouesse | Personal blog | Website