Login  Register

Re: JOGL Update: Jogl OS X Port is Nigh :)

Posted by Sven Gothel on Oct 29, 2011; 1:16pm
URL: https://forum.jogamp.org/JOGL-Update-Jogl-OS-X-Port-is-Nigh-tp3420105p3463373.html

On Tuesday, October 25, 2011 04:21:39 AM Sven Gothel wrote:

> On Sunday, October 16, 2011 03:59:48 PM Sven Gothel [via jogamp] wrote:
> >
> > NEWT/OSX done:
> > - pointer / mouse features are added
> > - proper focus management (still a few test failures in this regard though)
> >
> > TODO OSX:
> > - OpenGL NS/CG separation/switch in top class MacOSXCGLContext
> > - OpenGL profiles via 'pixmap attributes' to support >= 3.0
>
> .. currently working on the above 2 issues.

yum, GL3 is done

>
> > - Applets ..

The situation on Applets is a tricky one.

As we know on OS X >= 10.6.4 when using Applets,
the JAWT binding only supports the JAWT_SurfaceLayers/CALayers approach,
ie offscreen rendering (pbuffer) binding with a special
CALayers management (context, render trigger, ..).

The JAWT_SurfaceLayers/CALayers approach is opt-in via the JAWT_GetAWT version bit.

First I tried to just use our NewtCanvasAWT,
since it creates a child window bound to the native JAWT window handle.
This actually still works since the native window handle still exists
via JAWT_MacOSXDrawingSurfaceInfo if not opt-in the CALayer.

However, when run within the browser as an applet,
the JAWT_MacOSXDrawingSurfaceInfo's position is 0/0,
hence we don't see the absolute screen position.
This is also observed when retrieving the Applet's getLocationOnScreen().

This behavior might be a bug, or it is intended .. I don't know.
It would be very much appreciated if somebody like to file a bug report
with Apple and 'maintain' it's communication in this regard.

Another issue to communicate w/ Apple would be if they will
cut-off the 'JAWT_MacOSXDrawingSurfaceInfo' information and hence
the cocoaViewRef while enforcing the JAWT_SurfaceLayers/CALayer.
This would finally cut-off our native-parenting approach we utilize
w/ NewtCanvasAWT - and would force us to impl. this behavior completly w/ CALayers,
regardless whether it's an applet or application.

It seems to be required to implement the CALayer
support within our GLContext/GLDrawable OSX stack, ie add it next to
NSOpenGL* and CGL* ..

This OS X work is visible in the branch 'osx_jawt_calayers'.

~Sven