What's the status of JOGL on Mac on JDK 1.7?

Kustaa Nyholm Kustaa.Nyholm at planmeca.com
Fri Dec 14 06:58:56 PST 2012


On 14.12.2012 15.50, "Joshua Smith" <jesmith at kaon.com> wrote:

>My app is currently using JOGL 1.1.1 on Apple's JDK 6.
>
>I'm looking at migrating to JDK 7, and this isn't working because of a
>dependency on apple.awt.componentmodel
>
>Can someone point me at a roadmap for getting past this? Do I need to
>update to a new version of JOGL?
>
>-Joshua



I'm not really qualified to comment but I can share my
experience.

JOGL 1.1.1 seems ancient.


The thing is now called jogamp and the
latest release is 2.0rc11,
I seem to be using: 2.0-b66-20121101

Get the latest stable from here:

http://jogamp.org/wiki/index.php/Jogamp_Versioning_and_Releases


Some code re-factoring is required and can seem a bit daunting
but I was able to get everything I use in about half an hour.

The key is to realize that in the past (IIRC!!) most stuff,
ie API calls to classic OpenGL was in:

 javax.media.opengl.GL

but now it is in:


 javax.media.opengl.GL2


and in your opengl event listener stuff you need something like:

addGLEventListener(new javax.media.opengl.GLEventListener() {

 public void display(javax.media.opengl.GLAutoDrawable gldwbl) {
  callYourDrawCode( (javax.media.opengl.GL2) (gldwbl.getGL()) );
  }


Note the cast to GL2.

IIRC there is also one or two methods in the event listener that need
implementing.


Works for me both with (Apple) 1.6 and 1.7 (not sure if I've tested
with Oracle 1.7 as that is not up to par on MacBook Retina).

hope this helps.

br Kusti





More information about the macosx-port-dev mailing list