Login  Register

JOGL Update: Jogl OS X Port is Nigh :)

Posted by Sven Gothel on Oct 13, 2011; 10:46pm
URL: https://forum.jogamp.org/JOGL-Update-Jogl-OS-X-Port-is-Nigh-tp3420105.html

http://jausoft.com/blog/2011/10/13/jogl-osx-port/

+++

Since the mouse features were to easy to add and my Android vacation should take a bit longer, our OS X port was a good candidate to burn some hours I don’t have.

What should work for OS X by now:

    NEWT Top-Level Windowing
    NEWT Child Window w/ NEWT Parent
    NEWT Child Window w/ AWT Parent
    JOGL incl. shared context
    NEWT works w/ AWT enabled JVM out of the box
    Method to execute a Runnable on the MainThread
    The new native Jar loading facility (Application, Applet, Webstart)

The window positioning code was a torture, since the AWT components are not top-level on OS X. Hence we have to calculation the proper screen size position in bottom-left coordination space, even when resizing the window.
Maybe there are still some glitches in case of a NEWT child within an AWT floating Container, but most cases work fine.

Shared or offscreen context destruction was another issue.
We have to run this task on the MainThread, otherwise we experienced a ~10s freeze.

Btw our MainThread semantics have been simplified a lot.
On OS X, it just launches the user main class in a new thread while continuing as the NSApp MainThread.
In short, it is no more required when using an AWT enabled JVM, since it already launches as the NSApp MainThread.

After a few more cleanups, I will prepare the next release and test our new native Jar loading mechanism
and Applets in general.

Note on the side: Motivation for the OS X port was not my liking of the platform, which I don’t, but to just complete our platform independent solution. Hence having NEWT working well on OS X is mandatory here.

+++