Skip to content

Commit

Permalink
- Fixing SPEC documentation for bindings JOGL and NativeWindow, lot's…
Browse files Browse the repository at this point in the history
… of javadoc changes/fixes.

- Fixing transparency values RGB[A] in GLX and EGL, adding those in GLCapabilities.

- Adding EGLPbuffer (untested yet)

  Added EGLOnscreenContext, EGLOnscreenDrawable and EGLPbufferContext, EGLPbufferDrawable,
  which completes the now abstract EGLContext and EGLDrawable.

- Decoupling EGLDrawableFactory and DynamicLookupHelper:
    Since OpenGL ES has 2 libraries and hence 2 DynamicLookupHelper, one for each,
    these are decoupled in EGLES1DynamicLookupHelper and EGLES2DynamicLookupHelper,
    where each uses the base class EGLDynamicLookupHelper.
    EGLDynamicLookupHelper act's also as the owner of these singleton instances.

    EGLDrawableFactory is now pure singleton,
    and has no more relation to the ES[12] libraries.

    Still, GLDrawableFactory.getFactory(GLProfile) stays, due to the selection
    of the right factory, ie EGLDrawableFactory or a native one (X11GLX, WindowsWGL or MacOSXCGL).

    Added GLDrawableImpl.getDynamicLookupHelper().

    DynamicLookupHelper implementation is pushed down to the specialisation of GLDrawableImpl,
    hence removed GLDrawableImpl implements DynamicLookupHelper.

- Fixing Locking
    - Always throw an Exception if unlock is called without being locked.

    - Removed NativeWindow.LOCK_NOT_SUPPORTED, since it made the locking state ambiguos.

    - Using a generated Exception at locking to mark the object locked,
      and to let it throw in case of double locking.

    - Removed redundant lockToolkit() calls, where lockSurface() calls are made

- Fixing GLWindow wrapped toolkit (e.g. AWTWindow) usage
    - In case the passed NativeWindow only contains a wrapper window,
      we use the NativeWindowFactory.getNativeWindow() pipeline to produce a valid
      NativeWindow. This object is only referenced within the drawable, hence we have
      to use it for actual NativeWindow related operations.

    - Add setVisible(): lockSurface()/unlockSurface() to allow getting the windowHandle

    - Overwriting all drawable related Window method's, using the drawable's NativeWindow if exists.
        - getNativeWindow()
        - lockSurface()/unlockSurface()/..
        - getWindowHandle()/getSurfaceHandle()

- Fix NativeWindowFactory.getNativeWindowType(),
  so the custom and pure values are set once (static init) - not overwritten (prev. bug).

- NEWT: Added WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY support in AWTWindow.
  Now the proper dispose() calls are made to all GLEventListeners if the AWT window
  is being closed - before it is actually destroyed.

- Threading now uses the AWTThreadingPlugin,
  a ThreadingPlugin interface AWT implementation, containing the refactored
  Threading code.

- Reintroduced getChosen*Capabilities and getRequested*Capabilites,
  where get*Capabilities is renamed back to getRequested*Capabilities.
  The semantics are necessary to allow the drawables (and NativeWindow)
  to be regenerated in case of a device change in a multihead environment.
  Otherwise there is a risk that recursive choosing of the Capabilities
  will degenerate the result.

- Multihead logic ..

    Exception:   Xinerama, where all monitors share the same static configuration,
                 and the window handle 'survive'
                 X11, MacOSX and Win32 with a Xinerama behavior

      1) Recognition of a display/screen/surface change
        - It is prooven that the JAWT model (JAWT_LOCK_SURFACE_CHANGED)
          while locking the surface is not reliably propagated, ie doesn't work here,
          if the display change happens.

        - AWT's Canvas.getGraphicsConfiguration() can reliably being used
          to detect this case, ie compare the old GraphicsConfiguration with the new one.

        - A solution for other native windowing toolkits must be found,
          ie query the current underlying pixel-configuration, if it changed - act.

      In which case the the following shall be done:
        2.0) - notify all GLEventListener via the dispose(GLAutoDrawable)
        2.1) - destroy the OpenGL context
        2.2) - call GLDrawable's setRealized(false)
        2.3) - call GLDrawable's setRealized(true)
        2.4) - create a new OpenGL context
        2.5) - notify all GLEventListener via the init(GLAutoDrawable)

      Steps 2.0 - 2.5 are executed with GLAutoDrawable's dispose(true) call.

      Step 2.3, setRealized(true) on GLDrawable shall:
        2.3.1) - Choose the GLCapabilities again, based on the requested ones,
                 and update the choosen ones in the AbstractGraphicsConfiguration.
        2.3.2) - Update AbstractScreen within the new AbstractGraphicsConfiguration to
                 reflect the possible screen change.

  DONE: Xinerama mode: X11 + Xinerama, MacOSX
  DONE: Introducing GLAutoDrawable.dispose(boolean regenerate)
  DONE: 2.3.1 on setRealized(true): Windows, MacOSX (implicit on createContext)
  TODO: Windows setRealized(true) on AWT Canvas getGraphicsConfiguration(),
        can't lock the JAWT surface sometimes - exception, code disabled, see GLCanvas.java
  TODO: 2.3.1 on setRealized(true): X11 and EGL
  TODO: Find a test case, without Xinerama behavior
  TODO: Code for Newt/NativeWindow to detect (1) and propagate GLAutoDrawable's dispose(true).

  TESTS:
    - MacOSX (Xinerama) OK

    - X11
        -TwinView (NV) OK
        -Xinerama (NV) OK

    - Win32 (Xinerama) OK

    - GLAutoDrawable's dispose(true)

-

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1929 232f8b59-042b-4e1e-8c03-345bb8c30851
  • Loading branch information
sgothel committed Apr 18, 2010
1 parent ccad31d commit 938e9b6
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public synchronized void unlock() {
return;
}
owner = null;
notifyAll();
}
};

Expand Down

0 comments on commit 938e9b6

Please sign in to comment.