Login  Register

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

Posted by Sven Gothel on Nov 10, 2011; 3:30am
URL: https://forum.jogamp.org/JOGL-Update-Jogl-OS-X-Port-is-Nigh-tp3420105p3495628.html

On Thursday, November 10, 2011 03:52:13 AM Wade Walker [via jogamp] wrote:
>
> Sven Gothel wrote:
> >
> > Due to the wide spread changes I need to validate regressions 1st before I
> > can close this task.
> >
>
> Yeah, I took a look at how much code would have to change to accomodate this
> new Safari version and was scared

Actually .. after reviewing and fixing regressions .. it looks more simple:

+++

Strategy for JAWTWindow:
  if OSX >= 10.6.4 && container-is-Applet
    if setJAWTVersion(CALayer)==OK
      OSXJAWTWindow is set to offscreenLayerSurface-mode

If GLDrawable's NativeWindow is a direct offscreenLayerSurface-mode (GLCanvas)
or it's parent NativeWindowHolder (ie NewtCanvasAWT),
it's created as an Offscreen/Pbuffer .. and our NSOpenGLLayer is being used
and attached.

+++

The other changes are more related to the above situation,
ie. a NativeWindow may become offscreen on-the-fly (NEWT).

Resize w/ offscreen -> recreate.

General 'harden' the existing code, ie removing bugs
not visible due to the previous value-space,
which has been widen now thx to this new use-case.

The good thing is that our architecture didn't need to change.
One just need to make sure that the GL code (GLEventListener)
is correct in respect to recreation (multiple init/destroy cycles).

>
> So will this version work in Firefox on the Mac too, since it's compatible
> with Plugin 2?

Sure it is, at least on paper/spec.

Actually all browsers are supposed to use the new CALayer now
so we shall work well with GLCanvas and NewtCanvasAWT.

The latter will work better, since it can support 'recreation'
and hence reparenting (CALayer/NSView) and resize.

>
> Thanks so much for your work on this, I can't wait to update all my
> tutorials with a GL 3+ canvas across all three platforms
>

You are welcome .. sure we need to be platform complete.
Even though I am not a OS X 'fan',
this experience lead to another code review and bug fixes.

I will send an email soon when this branch works 'well',
ie tested w/ Applets etc..

~Sven