Jogamp
jogl.git
8 years agoMoved base initialization of Mac port of Newt back into static JOGL_2_SANDBOX jausoft/JOGL_2_SANDBOX jogamp/JOGL_2_SANDBOX mbien/JOGL_2_SANDBOX origin/JOGL_2_SANDBOX
Kenneth Russel [Mon, 15 Jun 2009 21:46:28 +0000 (21:46 +0000)]
Moved base initialization of Mac port of Newt back into static
initializer of MacWindow to address bootstrapping problems with
JavaFX-based demos in multiple workspaces. It appears that making this
lazier was allowing AWT classes to be touched before Newt was
initialized, leading to problems.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1957 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix: JAWTUtil has to JAWTNativeLibLoader.loadAWTImpl() as well. Use NWReflection...
Sven Gothel [Mon, 15 Jun 2009 11:05:16 +0000 (11:05 +0000)]
Fix: JAWTUtil has to JAWTNativeLibLoader.loadAWTImpl() as well. Use NWReflection.isClassAvailable() if possible. NWReflection.getClass() takes boolean init.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1956 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNEWT MacOSX: Fullscreen/Multithreading - exitFullscreen in close0() ; synchronize...
Sven Gothel [Mon, 15 Jun 2009 09:19:47 +0000 (09:19 +0000)]
NEWT MacOSX: Fullscreen/Multithreading - exitFullscreen in close0() ; synchronize access to surfaceHandles; little cleanup

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1955 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoAdded a missed call to makeKeyAndOrderFront found during code
Kenneth Russel [Mon, 15 Jun 2009 08:27:09 +0000 (08:27 +0000)]
Added a missed call to makeKeyAndOrderFront found during code
inspection, and corrected an exception detail message

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1954 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoChanged a few Class.forName() calls to defer initialization to avoid
Kenneth Russel [Mon, 15 Jun 2009 08:24:13 +0000 (08:24 +0000)]
Changed a few Class.forName() calls to defer initialization to avoid
eager initialization of the AWT, in particular on Mac OS X, where
doing so was causing crashes during Newt initialization

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1953 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFixed UnsatisfiedLinkError when Screen is referenced before Window
Kenneth Russel [Mon, 15 Jun 2009 05:30:31 +0000 (05:30 +0000)]
Fixed UnsatisfiedLinkError when Screen is referenced before Window

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1952 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNEWT MacOSX: Encapsulate [enter|exit]FullScreenMode calls with exception handler...
Sven Gothel [Mon, 15 Jun 2009 05:08:34 +0000 (05:08 +0000)]
NEWT MacOSX: Encapsulate [enter|exit]FullScreenMode calls with exception handler, due to lack of support in pre 10.5

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1951 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNEWT MacOSX fullscreen fix - real fullscreen now, some leakage fixes; MainThread...
Sven Gothel [Mon, 15 Jun 2009 04:22:59 +0000 (04:22 +0000)]
NEWT MacOSX fullscreen fix - real fullscreen now, some leakage fixes; MainThread - dealock fix in case invoke already runs on main-thread

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1950 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoMinor API cleanups:
Kenneth Russel [Sun, 14 Jun 2009 23:32:52 +0000 (23:32 +0000)]
Minor API cleanups:

 - Changed GLProfile method names to conform to Java naming convention
   (first letter is lowercase). Removed redundant "Profile" from
   method names.

 - Moved bulk of Threading class into ThreadingImpl to avoid exposing
   concepts like the mode (AWT vs. WORKER), and whether X11 is in use,
   in the public API

 - Changed GLAutoDrawable.ScreenChangeActionEnabled to
   SCREEN_CHANGE_ACTION_ENABLED

 - Changed AWTGraphicsConfiguration.SetupCapabilitiesPixelformat to
   setupCapabilitiesRGBABits

Reformatted touched classes to 4 spaces per indentation level, which
JOGL should have used from the start -- should reformat all classes.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1949 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNEWT MacOSX adding fullscreen support (TODO: remove titlebar)
Sven Gothel [Sun, 14 Jun 2009 19:40:16 +0000 (19:40 +0000)]
NEWT MacOSX adding fullscreen support (TODO: remove titlebar)

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1948 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNEWT Mac OS X - Adding support for multithreading:
Sven Gothel [Sun, 14 Jun 2009 18:13:32 +0000 (18:13 +0000)]
NEWT Mac OS X - Adding support for multithreading:

    See documentation in com.sun.javafx.newt.util.MainThread.

    A platform independent java user application launch toolkit,
    which by default just invokes the passed user class's main method.

    In case of Mac OS X, it spawns a new thread to run the user app,
    and uses it's own thread to handle tasks, here all windowing tasks
    from the MacWindow.

    Now you can run a multithreaded native NEWT application on Mac OS X,
    just pipeline this new class on your commandline, ie
        java -XstartOnFirstThread com.sun.javafx.newt.util.MainThread demos.es1.RedSquare -GL2 -GL2 -GL2 -GL2

    All these changes are backward compatible, of course.

NEWT Window
    Finer locking granularity of event handling methods,
    to prevent deadlocks with the new MainThread serialization.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1947 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNEWT WindowsWindow multithreaded/multiwindows works.
Sven Gothel [Sat, 13 Jun 2009 23:41:36 +0000 (23:41 +0000)]
NEWT WindowsWindow multithreaded/multiwindows works.
Caveat: They must be created in their own thread,
which is being used to dispatch the messages.
FIXME: Need to make such notes / restrictions in the documentation !!

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1946 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNEWT WindowsWindow cleanup, GLobalRef, using ATOM, .. - no StackOverflow .. but still...
Sven Gothel [Sat, 13 Jun 2009 22:52:04 +0000 (22:52 +0000)]
NEWT WindowsWindow cleanup, GLobalRef, using ATOM, .. - no StackOverflow .. but still the blocking window

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1945 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix GLCanvas - init/deinit at addNotify/removeNotify - demos.testContextDestruction...
Sven Gothel [Sat, 13 Jun 2009 20:21:53 +0000 (20:21 +0000)]
Fix GLCanvas - init/deinit at addNotify/removeNotify - demos.testContextDestruction.TestContextDestruction works now

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1944 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years ago- Adding GLAutoDrawable.ScreenChangeActionEnabled reflecting the
Sven Gothel [Sat, 13 Jun 2009 20:01:06 +0000 (20:01 +0000)]
- Adding GLAutoDrawable.ScreenChangeActionEnabled reflecting the
  boolean system property 'jogl.screenchange.action',
  wheather to enable or disable (default) the drawable configuration
  in case the screen changed ..

- X11Util Changes:
  Clarified the documentation a bit.

  Renaming for clarification:
    getDefaultDisplay() -> getStaticDefaultDisplay()
    isXineramaEnabled() -> isXineramaEnabledOnStaticDefaultDisplay()

  Removing for clarification:
    getDisplayConnection()

  Introducing thread current default display,
  which returns/creates one display connection for the running thread in TLS.
    getThreadLocalDefaultDisplay()

  This shall be used with care, to not risc memory leakage.
  Currently used for long term objects, ie Pbuffer ..

- Validated the ToolkitLock lock/unlock
  in relation with the NativeWindow surface lock/unlock.

  Both locking mechanism may be related, e.g. in case of AWT/JAWT.
  Here, a JAWT surface lock would implicitly lock the global JAWT.
  The latter is actually intended to be done by the JAWT ToolkitLock
  implementation we offer. Not calling it would steal it's lock
  and we won't benefit from it's recursive behavior.
  A followup ToolkitLock lock would deadlock,
  since we already have locked it implicitly with the surface lock.
  Hence the NativeWindow surface lock needs to be the owner of
  the JAWT ToolkitLock 'lock' incl. issuing it's optional native locking.

  Massive multithreading tests on multi core machines (X11, Windows, MacOSX)
  AWT and NEWT (AWT/Native) .. no deadlocks under
    java demos.es[12].RedSquare -GL2 -GL2 -GL2 -GL2
    java demos.es[12].RedSquare -awt -GL2 -GL2 -GL2 -GL2
    java demos.es[12].RedSquare -GL2 -GL2 -awt -GL2 -GL2

- NEWT Windows:
    - Adding fullscreen
    - Cleaning up the UserData attachment, adding JNIEnv,
      and removing the global reference at window destruction.

  The later removes a StackOverflow .. alright,
  but still a lack of true multiple top level window.

- NEWT AWTCanvas: Apply Ken's fix for using disableBackgroundEraseMethod

- FIX X11AWTGLXGraphicsConfigurationFactory:
  Wow .. I must have been blind, now using the right method
  X11SunJDKReflection.graphicsDeviceGetDisplay() :)

  However, in case we couldn't determine the display handle,
  we will use a thread local display handle.

-

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1943 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoMade computation of required buffer size for operations like
Kenneth Russel [Sat, 13 Jun 2009 03:29:38 +0000 (03:29 +0000)]
Made computation of required buffer size for operations like
glTexImage2D and glReadPixels more precise. Added buffer size checking
for glGetTexImage.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1942 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoAdded back in NVIDIA, ATI and Apple OpenGL extensions to GL interfaces
Kenneth Russel [Sat, 13 Jun 2009 03:22:11 +0000 (03:22 +0000)]
Added back in NVIDIA, ATI and Apple OpenGL extensions to GL interfaces
(principally GL2). Added IgnoreExtension directives for extensions
that appear to be largely obsolete. This allows demos like the HDR
demo to compile again. Made "ant -Djogl.cg=1" work again, assuming a
compatible Cg implementation is on the build machine. The Cg version
currently being bound to is unfortunately obsolete and needs an upgrade.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1941 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoRemoved incorrect call to Runnable.run() added during Threading refactoring
Kenneth Russel [Sat, 13 Jun 2009 03:13:14 +0000 (03:13 +0000)]
Removed incorrect call to Runnable.run() added during Threading refactoring

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1940 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFormatting change
Kenneth Russel [Sat, 13 Jun 2009 01:14:16 +0000 (01:14 +0000)]
Formatting change

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1939 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoAttempt to get disableBackgroundErase hack working again with 6u10+,
Kenneth Russel [Sat, 13 Jun 2009 01:11:45 +0000 (01:11 +0000)]
Attempt to get disableBackgroundErase hack working again with 6u10+,
but despite calling method, still see flickering with 6u13

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1938 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFixed build problems with VC9 where manifests were not installed
Kenneth Russel [Sat, 13 Jun 2009 00:59:17 +0000 (00:59 +0000)]
Fixed build problems with VC9 where manifests were not installed
correctly into DLLs; updated documentation

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1937 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoAdded description of why X11NativeWindowFactory and
Kenneth Russel [Fri, 12 Jun 2009 23:43:07 +0000 (23:43 +0000)]
Added description of why X11NativeWindowFactory and
X11AWTNativeWindowFactory and the toolkit locks are needed.
Uncommented their instantiation; issues with them will need to be
solved in some other way than removing them completely.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1936 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years ago- NEWT X11Window setSize0 - change fullscreen method to MWM,
Sven Gothel [Fri, 12 Jun 2009 18:09:39 +0000 (18:09 +0000)]
- NEWT X11Window setSize0 - change fullscreen method to MWM,
  which is more reliable ..

- NEWT X11Window remove XSetWindowFocus, since it causes BadMatch,
  let the desktop manager do this .. not our job

- NEWT AWTWindow
    - Adding fullscreen mode.
      Note: AWT only allow undecoration if the window wasn't visible yet.

    - Fixing some runOnEDT ..

    - Query correct screen size

    - AWTCanvas .. adding the disableBackgroundErase() hack ..

- NativeWindowFactory .. disabling
    com.sun.nativewindow.impl.x11.awt.X11AWTNativeWindowFactory, (JAWT lock)
    com.sun.nativewindow.impl.x11.X11NativeWindowFactory, (monitor lock)
  since it causes more troubles than benefit.
  GLCanvas is serialized anyways .. and NEWT AWT would freeze,
  since that JAWT lock is even taken in the input loop.
  FIXME: Has to be discussed.

-

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1935 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoGLSL ShaderUtil: Use TLS to make it thread safe
Sven Gothel [Fri, 12 Jun 2009 13:01:31 +0000 (13:01 +0000)]
GLSL ShaderUtil: Use TLS to make it thread safe

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1934 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoMacOSX: Exception for GL3 profile .. no OpenGL 3.1 implementation yet
Sven Gothel [Fri, 12 Jun 2009 12:41:28 +0000 (12:41 +0000)]
MacOSX: Exception for GL3 profile .. no OpenGL 3.1 implementation yet

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1933 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years ago- Adding CR + TAB to toString() methods for better visibility,
Sven Gothel [Fri, 12 Jun 2009 12:34:29 +0000 (12:34 +0000)]
- Adding CR + TAB to toString() methods for better visibility,
  use a unix style capable viewer/editor for the debug methods ..

- Multihead code is working now for
    - GLCanvas, GLJPanel
    - Newt: GLWindow, AWTWindow and WindowsWindow

    WindowsWindow is using the MonitorFromWindow(HWND) win32 method
    to detect a monitor change, same as AWT's implementation.

    AWT does the detection within getGraphicsConfiguration().

    Added documention in GLAutoDrawable inkl. the fixed protocol
    for such a case (regeneration cycle).

    The interesting thing here is, that in my test environment,
    the windows NV driver keeps up the previous HDC pixelformat
    even within a new HDC (all same HWND), if the HWND is dragged
    from a 32bpp-screen  to a 16bpp-screen and vice versa.
    But for the sake of other driver behaviors, this implementation
    shall fix the multihead support on windows and other non Xinerama
    driven arrangements.

    Another good thing of the in deep investigation was to
    fix the documentation and other bus, as follows:

- FIX GLDrawableHelper.dispose(): Don't remove the event listeners,
  since dispose() does not mean EOL.

- FIX remove all actions of NativeWindow.LOCK_SURFACE_CHANGED,
  due to the unreliable (never worked here for me) behavior.
  Also .. acting on a surface change from within a GLDrawable
  is already to low level, and misses all the appropriate actions.
  See GLAutoDrawable for the spec.

- FIX all GLDrawable implementations update the graphics configuration
  on setVisible(true), except MacOSX, which does it on create context.
  The latter is ok with the spec ..

- FIX removed the windows NO_FREE hack, since it could introduce
  a non released context .. which is not good.
  The context state shall be completely handled by GLContext

- FIX GLDrawableImpl.setVisible(false): removed nativewindow invalidate()
  call - this is wrong, due to the spec.  A window may survive many cycles of setVisible().

- FIX GLCOntextImpl lock the lock as soon as possible in destroy()

- Add native method WindowsWindow.MonitorFromWindow(..)

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1932 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoRemoved GLAutoDrawable's dispose(boolean regenerate), and added it's semantic to...
Sven Gothel [Fri, 12 Jun 2009 02:40:40 +0000 (02:40 +0000)]
Removed GLAutoDrawable's dispose(boolean regenerate), and added it's semantic to it's documentation, plus references to the multihead display change

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1931 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agojavadoc fixes
Sven Gothel [Thu, 11 Jun 2009 07:47:41 +0000 (07:47 +0000)]
javadoc fixes

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1930 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years ago- Fixing SPEC documentation for bindings JOGL and NativeWindow,
Sven Gothel [Thu, 11 Jun 2009 07:05:29 +0000 (07:05 +0000)]
- Fixing SPEC documentation for bindings JOGL and NativeWindow,
  lot's 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

8 years agoMinor egl cleanup
Sven Gothel [Fri, 5 Jun 2009 11:32:09 +0000 (11:32 +0000)]
Minor egl cleanup

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1928 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoWin-EGL: Add dll function lookup for C++ decoration (Imageon driver) ; EGL: Some...
Sven Gothel [Fri, 5 Jun 2009 10:34:15 +0000 (10:34 +0000)]
Win-EGL: Add dll function lookup for C++ decoration (Imageon driver) ; EGL: Some cleanup

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1927 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix GL3 (3.1) Windows - Adding OpenGL32 lookup for core functions - GL3 Windows works...
Sven Gothel [Fri, 5 Jun 2009 05:11:19 +0000 (05:11 +0000)]
Fix GL3 (3.1) Windows - Adding OpenGL32 lookup for core functions - GL3 Windows works as well. java demos.GLInfo -GL3, or java demos.es2.RedSquare -GL3

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1926 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix/Clean EGL path; Adding Windows AWT path; Windows works with MinGW (GL2)
Sven Gothel [Fri, 5 Jun 2009 03:48:58 +0000 (03:48 +0000)]
Fix/Clean EGL path; Adding Windows AWT path; Windows works with MinGW (GL2)

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1925 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoCompile clean under windows
Sven Gothel [Thu, 4 Jun 2009 03:15:40 +0000 (03:15 +0000)]
Compile clean under windows

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1924 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoAdd MacOSX support / tested on one thread
Sven Gothel [Wed, 3 Jun 2009 22:51:34 +0000 (22:51 +0000)]
Add MacOSX support / tested on one thread

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1923 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoTested:
Sven Gothel [Wed, 3 Jun 2009 19:57:05 +0000 (19:57 +0000)]
Tested:
    - Linux / X11 / GL3 / GL2 / ES1 / ES2
    - Using etc/profile.jogl JOGL_ALL
        . ./setenv-jogl.x86.sh JOGL_ALL
    - Java2D/GLJPanel: demos.jrefract.JRefract
    - GLCanvas: demos.gears.Gears
    - Newt/Nativewindow (demos.GLInfo, demos.es2.RedSquare, demos.es2.RedSquare)
        - with multiple instances of different GL profiles, ie
            java demos.es1.RedSquare -GLES2 -GLES1
            java demos.GLInfo -GLES2 -GL2
    - GL 3.1 test  with demos.GLInfo
            java demos.GLInfo -GL3
            java demos.GLInfo -GL3 -GL2
      with NVIDIA 180.37.05

JOGL
    Enable parallel GLProfiles:
        - GL holds it's GLProfile

        - GL / GLBase added:
            hasGLSL()
            getGLProfile()

        - Removed all hardcoded GLProfile checks

        - Make GLProfile an instance of GLCapabilities

        - GLCapabilities needs GLProfile in constructor,
          or null for the default GLProfile

        - All GLProfiles are singelton mapped objects,
          setup and verified at static init.

        - All GLDrawableFactories in GLDrawableFactory are singelton objects,
          setup at static init.

        - GLDrawableFactories.getFactory() needs an argument,
          which leads to GLProfile, ie
          NativeWindow, AbstractGraphicsConfiguration, GLCapabilities or GLProfile.

        - EGLDrawableFactory takes GLProfile as an argument,
          being able to take the singleton role as ES1 or ES2

        - EGLDrawableFactory loads ES & EGL libraries _local_,
          otherwise the symbols produce a collision (Unix/PC-Emulation).
          TODO: Check on Windows/WinCE !

        - Fixing etc/profile.jogl JOGL_ALL

    EGLGraphicsConfigurationFactory
        - Added eglGetConfigs -> GLCapabilities -> eglChooseConfig,
          in case the simple eglChooseConfig fails.

        - Using given chooser, is null, use DefaultGLCapabilitiesChooser

    Moved FixedFuncUtil.class -> jogl.util.jar,
          otherwise the FixedFuncUtil pipeline cannot be used without emulation.

    GLDrawable
        Rename getChosenGLCapabilities() -> getGLCapabilities(),
               since all GLCapabilities access functions return the current state.
        Add getGLProfile()

    NativeLibLoader[Base]
        Added 'addLoaded' and 'isLoaded', so all LoadAction implementation
        can use it and circumvent double library loading.

    GlueGen
        Split openLibrary -> openLibraryLocal / Global,
              utilizing as an optional flag (global), which is true per default.
        TODO: How to do this on Windows ?

    TODO: Verify Windows and MacOSX !!

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1922 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix Deadlock in X11AWTNativeWindowFactory (adding missing notifyAll() ; Stricten...
Sven Gothel [Sat, 30 May 2009 11:39:21 +0000 (11:39 +0000)]
Fix Deadlock in X11AWTNativeWindowFactory (adding missing notifyAll() ; Stricten unlock(), throw an exception if not locked to make cheap coding more visible ; Removed double lock of surface and JAWT ; Adding missing try/finally block for some locks

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1921 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoClarifying resetGLFunctionAvailability() -> setGLFunctionAvailability(boolean force...
Sven Gothel [Sat, 30 May 2009 10:06:05 +0000 (10:06 +0000)]
Clarifying resetGLFunctionAvailability() -> setGLFunctionAvailability(boolean force) and updateGLProcAddressTable() ; fixes missing init for some Context implementations, ie PBuffer

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1920 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoJOGL
Sven Gothel [Fri, 29 May 2009 01:47:02 +0000 (01:47 +0000)]
JOGL
    Added OpenGL 3.0 and 3.1 support
        3.0 as part of GL2 (extensions only)
        3.1 forward compatible as GL3,
            ie doesn't contain the GL2 fixed function stuff etc

        Added code to retrieve a 3.0/3.1 context: X11/GLX and Windows/WGL
        TODO: MacOSX !!

    Updated GL and GLX extensions

    Fixing auto GLProfile selection, determine if GL2ES[1] uses GL2 or ES

    Usage of the unified GraphicsConfiguration of NativeWindow
    for all platforms. Sure, the broken OS (Win32/MacOSX) have
    a update mechanism for theit queried Capabilities after drawable creation.

    Adding X11/GLX GLXFBConfig usage and fixing it's attribute mapping

    Fixing GLX/X11 FBConfig/XVisual query function's memory leak,
    using a manual implementation, which copies the data and calls XFree.

    Added WGL extension WGL_ARB_create_context

    Tested: Linux x86 and x86_64 GL2, ES2 and ES1
            Note: Nvidia driver couldn't make the succesfully created 3.1
            context current.

    TODO: Verify Windows and MacOSX !!

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1919 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNewt: better keyboard input support on Windows (warning: may have broken the mobile...
Dmitri Trembovetski [Thu, 28 May 2009 22:00:21 +0000 (22:00 +0000)]
Newt: better keyboard input support on Windows (warning: may have broken the mobile windows build because of unicode API usage, I have no way to check)

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1918 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNewt: implemented simple window focus management for Mac OS X
Christopher Campbell [Tue, 26 May 2009 22:29:17 +0000 (22:29 +0000)]
Newt: implemented simple window focus management for Mac OS X

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1917 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNewt: implemented simple Window focus management (focusGained/focusLost/requestFocus...
Dmitri Trembovetski [Tue, 26 May 2009 21:24:24 +0000 (21:24 +0000)]
Newt: implemented simple Window focus management (focusGained/focusLost/requestFocus for Window). Currently only implemented on Windows.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1916 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFixed NEWT mouse events on Mac OS X to be consistent with Windows implementation...
Christopher Campbell [Tue, 26 May 2009 18:52:23 +0000 (18:52 +0000)]
Fixed NEWT mouse events on Mac OS X to be consistent with Windows implementation (0==none, 1==left, 2==middle, 3==right).

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1915 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNewt: fixed mouse wheel support on windows - needed to translate mouse event coordin...
Dmitri Trembovetski [Tue, 26 May 2009 16:50:14 +0000 (16:50 +0000)]
Newt: fixed mouse wheel support  on windows - needed to translate mouse event coordinates from screen to client

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1914 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNewt fixes: implemented mouse wheel support - currently only hooked up on Windows...
Dmitri Trembovetski [Mon, 25 May 2009 00:10:13 +0000 (00:10 +0000)]
Newt fixes: implemented mouse wheel support  - currently only hooked up on Windows platform, others will follow

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1913 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNewt fixes for Windows implementation: beginnings of proper modifier handling for...
Dmitri Trembovetski [Sun, 24 May 2009 22:10:41 +0000 (22:10 +0000)]
Newt fixes for Windows implementation: beginnings of proper modifier handling for key events; ignore WM_ERASEBG event to avoild flickering when resizing

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1912 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoChecking in forgotten ShaderUtil.java
Kenneth Russel [Fri, 22 May 2009 23:12:54 +0000 (23:12 +0000)]
Checking in forgotten ShaderUtil.java

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1911 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoOptimized GLU creation by caching Class object for implementation
Kenneth Russel [Fri, 22 May 2009 23:12:09 +0000 (23:12 +0000)]
Optimized GLU creation by caching Class object for implementation

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1910 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoRefactored shader-related utility routines from core GL2ES2 class into
Kenneth Russel [Fri, 22 May 2009 22:21:29 +0000 (22:21 +0000)]
Refactored shader-related utility routines from core GL2ES2 class into
ShaderUtil class. Added GLContext.getAttachedObject(String) and
putAttachedObject(String, Object) to allow arbitrarily named objects
to be attached to GLContext. Removed explicitly defined toString()
operations on GL implementations which were problematic and which
would have required downward references into com.sun.opengl.util.glsl
package after this refactoring.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1909 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoRecently code (UnifiedName, GLUnifiedName) was added to GlueGen to
Kenneth Russel [Wed, 20 May 2009 21:47:58 +0000 (21:47 +0000)]
Recently code (UnifiedName, GLUnifiedName) was added to GlueGen to
automatically detect duplicate constant and function definitions
between vendor and ARB extensions and the OpenGL core, and to remove
the suffixes of ARB extensions. This code has helped automate the
process of discovering extensions that were promoted into the OpenGL
core.

While this code has saved some manual effort, it has also caused
several problems:

1. It causes obsolete ARB extensions to be incorrectly moved into the
core OpenGL namespace. GL_ARB_texture_rectangle, GL_ARB_vertex_blend,
and GL_ARB_matrix_palette are examples of extensions that should not
have their ARB suffixes removed because they are dead-end extensions.
Definitions which are explicitly specified that they will change, such
as those in the EGL_KHR_sync extension, were also incorrectly moved
into the core namespace.

2. It has caused certain OpenGL ES-specific definitions to
accidentally be promoted into the core OpenGL namespace: for example,
the constants associated with the GL_OES_point_size_array extension,
which were incorrectly placed into the GL2ES1 interface.

3. It causes namespace collisions between certain ARB extensions that
are only accessible via their ARB entry points and core OpenGL
routines: specifically GL_ARB_vertex_program and GL_ARB_fragment
program. Based on tests on NVIDIA's drivers, when a developer wants to
use the earlier ARB_vertex_program and ARB_fragment_program semantics
rather than GLSL, it is mandatory to use the ARB entry points rather
than the core OpenGL entry points.

4. It is not easy to configure the behavior of this automatic merging,
nor easy to see how it would be extended to be configurable.

5. It does not address the problem of detecting which extensions are
common between desktop OpenGL and OpenGL ES. A different algorithm
would be needed to solve that problem.

6. It has a high degree of functional overlap to the IgnoreExtension
directive which has previously been used to ignore ARB extensions that
were promoted into the OpenGL core. There were already IgnoreExtension
directives in place for all of the OpenGL extensions subsumed in
OpenGL 1.1 through 1.3.

7. It has been the cause of several bugs and unexpected interactions
with the Ignore and ForceProcAddressGen directives.

After careful consideration, it appears that the problems with this
code outweigh the benefits and it has been removed. The run-time code
which attempts to find extension variants of core entry points has
been retained, however.

To reduce the amount of subsequent manual work, the following
additions have been made:

1. A generic SymbolFilter mechanism has been added to GlueGen, which
can be used to pre-process the entire set of constant and function
definitions at any time during glue code generation (although it is
recommended to do so at the beginning of processing, i.e., in
GlueEmitter.beginEmission()).

2. The RenameJavaMethod directive has been generalized to
RenameJavaSymbol, and can now work on constant definitions.

3. A ConstantDefinition class has been added.

4. A RenameExtensionIntoCore directive has been added to the GLEmitter
which will rename all constant definitions and entry points associated
with a particular OpenGL extension into the core namespace, i.e.,
stripping off any ARB or similar suffixes.

5. An AutoUnifyExtensions directive has been added which is disabled
by default but which will automatically ignore any OpenGL extension
which has been completely subsumed into the OpenGL core and, if not,
print out the first declaration in that extension which caused it to
fail to be ignored.

The extensions common between OpenGL ES and desktop OpenGL have now
largely been moved into the core namespace using the
RenameExtensionIntoCore directive. A couple of these extensions had
slight differences between desktop OpenGL and OpenGL ES; the common
declarations were renamed manually.

IgnoreExtension directives have been added for those ARB extensions
promoted into the OpenGL core up to OpenGL 2.1. A few extensions which
were either silently promoted into the core specification
(GL_EXT_paletted_texture) or are obsolete (GL_EXT_multisample,
GL_EXT_point_parameters) were also ignored. The GlueGen runtime code
which looks up extension versions of core APIs via GLExtensionNames
makes this possible without breaking compatibility on older machines
that do not support OpenGL 2.1 directly.

With these changes, the same effect as the automatic extension
unification mechanism has been achieved, with much more explainable
and controllable results. Before-and-after versions of all of the
public interfaces (GL, GL2ES1, GL2ES2, GLES1, GLES2, and GL2) have
been compared by hand to ensure that the results are as expected and
desired.

Bugs in BuildStaticGLInfo were fixed which were preventing the
extension associations in the OpenGL ES headers from being discovered.
getExtensions() was added to be able to enumerate the discovered
extensions. Most .cfg files were changed to parse both the desktop
OpenGL and the OpenGL ES headers using the GLHeaders directive so that
the extension associations are known for both sets of APIs.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1908 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoRemoved unneeded dependence on GL/glx.h; verified that JOGL can now be
Kenneth Russel [Fri, 1 May 2009 00:29:51 +0000 (00:29 +0000)]
Removed unneeded dependence on GL/glx.h; verified that JOGL can now be
built on an X11 machine without OpenGL headers, but with OpenGL librares

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1907 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFixed Solaris build
Kenneth Russel [Thu, 30 Apr 2009 22:20:49 +0000 (22:20 +0000)]
Fixed Solaris build

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1906 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoRenamed gl-ignore-gl2_es12-special.cfg to gl-if-gl-ignores.cfg for clarity
Kenneth Russel [Tue, 28 Apr 2009 21:05:59 +0000 (21:05 +0000)]
Renamed gl-ignore-gl2_es12-special.cfg to gl-if-gl-ignores.cfg for clarity

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1905 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFixed build problems with nativewindow and newt with Visual Studio 2008
Kenneth Russel [Sun, 26 Apr 2009 17:09:26 +0000 (17:09 +0000)]
Fixed build problems with nativewindow and newt with Visual Studio 2008

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1904 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNEWT: mouse pressed fix
Sven Gothel [Mon, 13 Apr 2009 19:04:13 +0000 (19:04 +0000)]
NEWT: mouse pressed fix

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1902 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNewt fixes for Windows implementation: implemented undecorated window style
Dmitri Trembovetski [Fri, 10 Apr 2009 19:27:58 +0000 (19:27 +0000)]
Newt fixes for Windows implementation: implemented undecorated window style

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1900 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoPreserve mouse button number while dragging
Sven Gothel [Sat, 28 Mar 2009 04:01:50 +0000 (04:01 +0000)]
Preserve mouse button number while dragging

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1899 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNewt fixes for Windows implementation: implemented setPosition, setTitle; fixed mouse...
Dmitri Trembovetski [Tue, 24 Mar 2009 23:43:13 +0000 (23:43 +0000)]
Newt fixes for Windows implementation: implemented setPosition, setTitle; fixed mouse modifiers, hooked up window move notification

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1898 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix: glShaderCompilerAvailable() and glGetShaderBinaryFormats()
Sven Gothel [Fri, 20 Mar 2009 19:08:41 +0000 (19:08 +0000)]
Fix: glShaderCompilerAvailable() and glGetShaderBinaryFormats()

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1897 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix GLProfile.isGL2ES[12](), adding GLProfile.hasGLSL()
Sven Gothel [Fri, 20 Mar 2009 18:40:32 +0000 (18:40 +0000)]
Fix GLProfile.isGL2ES[12](), adding GLProfile.hasGLSL()

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1896 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix build all javadoc generated source path
Sven Gothel [Fri, 20 Mar 2009 17:41:03 +0000 (17:41 +0000)]
Fix build all javadoc generated source path

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1895 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoPutback AWTAnimatorImpl to util, hence *AnimatorImpl are protected again
Sven Gothel [Fri, 20 Mar 2009 17:31:19 +0000 (17:31 +0000)]
Putback AWTAnimatorImpl to util, hence *AnimatorImpl are protected again

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1894 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix GL2ES12.isGL() and re-adding the shader code to the jar
Sven Gothel [Fri, 20 Mar 2009 17:15:09 +0000 (17:15 +0000)]
Fix GL2ES12.isGL() and re-adding the shader code to the jar

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1893 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix: Missed package move of AWTAnimatorImpl
Sven Gothel [Fri, 20 Mar 2009 16:10:30 +0000 (16:10 +0000)]
Fix: Missed package move of AWTAnimatorImpl

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1892 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix some scripts, AWTAnimator to it's awt package
Sven Gothel [Fri, 20 Mar 2009 16:02:40 +0000 (16:02 +0000)]
Fix some scripts, AWTAnimator to it's awt package

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1891 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoMissed movement of FBObject class from javax.media.opengl.util to
Kenneth Russel [Thu, 19 Mar 2009 20:37:56 +0000 (20:37 +0000)]
Missed movement of FBObject class from javax.media.opengl.util to
com.sun.opengl.util. Fixed remaining references to
javax.media.opengl.util package. Updated demos.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1890 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoRemoved GL2ES12 interface from the public API since it is only an
Kenneth Russel [Thu, 19 Mar 2009 20:08:15 +0000 (20:08 +0000)]
Removed GL2ES12 interface from the public API since it is only an
implementation detail. Removed GL2ES12 queries from the GLProfile
class. Changed GL2ES12 instance to pay attention to the chosen profile
so it behaves only like either GL2ES1 or GL2ES2. Sven's fixed function
emulation can now be tested on the desktop without needing OpenGL ES
emulation libraries. However, there appear to be problems running it
on top of Apple's OpenGL implementation -- seen by running
demos.es1.RedSquare and demos.es1.angeles.Main forcing the use of the
GL2ES2 profile.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1889 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoRemoved reflective queries from GLProfile and their use in
Kenneth Russel [Thu, 19 Mar 2009 07:40:41 +0000 (07:40 +0000)]
Removed reflective queries from GLProfile and their use in
BuildComposablePipeline's generated code. Stopped squelching
exceptions in GlueGen. Fixed error in glxext.cfg.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1888 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoJavadoc cleanup
Kenneth Russel [Thu, 19 Mar 2009 06:55:09 +0000 (06:55 +0000)]
Javadoc cleanup

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1887 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoMoved remaining portions of fixed function emulation out of core JOGL
Kenneth Russel [Thu, 19 Mar 2009 06:39:36 +0000 (06:39 +0000)]
Moved remaining portions of fixed function emulation out of core JOGL
public and implementation packages and into
com.sun.opengl.util.glsl.fixed.* and other subpackages of
com.sun.opengl.util. Renamed javax.media.opengl.sub.GLObject to
javax.media.opengl.GLBase. Moved interfaces in
javax.media.opengl.sub.fixed to javax.media.opengl.fixedfunc and
changed naming convention. Moved all classes in
javax.media.opengl.util to com.sun.opengl.util. Moved
com.sun.opengl.impl.packrect to com.sun.opengl.util.packrect. Renamed
InternalBufferUtils to InternalBufferUtil to match naming convention
and copied in needed routines for GLU and other classes. Fixed build
breakage when specifying rootrel.build property; reintroduced
build-temp directory. Updated demos.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1886 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoRemoved unnecessary import
Kenneth Russel [Thu, 19 Mar 2009 00:52:12 +0000 (00:52 +0000)]
Removed unnecessary import

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1885 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoMovement of Capabilities class and chooseCapabilities functionality
Kenneth Russel [Thu, 19 Mar 2009 00:32:21 +0000 (00:32 +0000)]
Movement of Capabilities class and chooseCapabilities functionality
into NativeWindowFactory introduced an undesirable dependence between
the windowing toolkit, which can be replaced via NativeWindowFactory,
and the library which implements the selection algorithm, for example
OpenGL. This would prevent, for example, an easy SWT port of JOGL.

To fix this, refactored chooseCapabilities into new
GraphicsConfigurationFactory, the default implementation of which is
currently a no-op on X11 platforms, and which is provided by JOGL in a
toolkit-agnostic manner via GLX. Refactored OpenGL portions of
Capabilities class back into GLCapabilities. Reintroduced
GLCapabilitiesChooser interface for compatibility and to avoid having
to import javax.media.nativewindow classes in most user code.

Fixed problem in GLProfile where failures to load native libraries
were being squelched. Reorganized build to have all outputs under
build/ directory.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1884 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoGot rid of NW prefixes on classes in preparation for refactoring
Kenneth Russel [Tue, 17 Mar 2009 21:15:07 +0000 (21:15 +0000)]
Got rid of NW prefixes on classes in preparation for refactoring
Capabilities class; deleted redundant NWException

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1883 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFinish (?) moving javax.media.nwi -> javax.media.nativewindow
Kenneth Russel [Tue, 17 Mar 2009 21:07:26 +0000 (21:07 +0000)]
Finish (?) moving javax.media.nwi -> javax.media.nativewindow

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1882 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoContinue moving javax.media.nwi -> javax.media.nativewindow
Kenneth Russel [Tue, 17 Mar 2009 20:41:40 +0000 (20:41 +0000)]
Continue moving javax.media.nwi -> javax.media.nativewindow

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1881 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoContinue moving javax.media.nwi -> javax.media.nativewindow
Kenneth Russel [Tue, 17 Mar 2009 19:51:26 +0000 (19:51 +0000)]
Continue moving javax.media.nwi -> javax.media.nativewindow

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1880 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoStart moving javax.media.nwi -> javax.media.nativewindow
Kenneth Russel [Tue, 17 Mar 2009 19:46:15 +0000 (19:46 +0000)]
Start moving javax.media.nwi -> javax.media.nativewindow

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1879 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoAdded back "clean" target
Kenneth Russel [Mon, 16 Mar 2009 19:06:19 +0000 (19:06 +0000)]
Added back "clean" target

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1876 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agorepair
Sven Gothel [Mon, 16 Mar 2009 15:38:36 +0000 (15:38 +0000)]
repair

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1875 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agorepair
Sven Gothel [Mon, 16 Mar 2009 15:27:54 +0000 (15:27 +0000)]
repair

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1874 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agorepair
Sven Gothel [Mon, 16 Mar 2009 15:17:52 +0000 (15:17 +0000)]
repair

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1873 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agorepair
Sven Gothel [Mon, 16 Mar 2009 15:10:57 +0000 (15:10 +0000)]
repair

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1872 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoreplair
Sven Gothel [Mon, 16 Mar 2009 14:59:16 +0000 (14:59 +0000)]
replair

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1871 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agorepair
Sven Gothel [Mon, 16 Mar 2009 14:53:42 +0000 (14:53 +0000)]
repair

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1870 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agorepair svn
Sven Gothel [Mon, 16 Mar 2009 14:51:43 +0000 (14:51 +0000)]
repair svn

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1869 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoJOGL refactoring:
Sven Gothel [Mon, 16 Mar 2009 14:38:27 +0000 (14:38 +0000)]
JOGL refactoring:
    Refactored JOGL into 3 independent components.

    1 NWI - Native windowing interface
        Abstracts the the general NativeWindow interface and it's factory,
        incl the basic JAWT and Xlib toolkit.
        The latter was motivated to clean up the JOGL workspace,
        and to allow other to reuse this part.
        The generic core is nwi.core.jar, the AWT add-on is nwi.awt.jar.

    2 JOGL - The OpenGL mapping
        Further cleanup of the SPEC.
        All non OpenGL toolkits are relocated to NWI and NEWT.
        There is still openmax and the windows audio layer ..
        Another cleanup of the fixed function pipeline emulation.
        Moved utilities and implementations where they belong ..
        Removed GLUnsupportedException.
        Misc .. changes

    3 NEWT - The new windowing toolkit
        The generic NEWT, newt.core.jar.
        The JOGL and AWT modules are seperate, newt.ogl.jar newt.awt.jar.
        Their build can be switched off.

    The modules source and builds resides in their own directory.
    Because of their nature, they share the stub_includes, etc.
    Each module has it's own ant build script
        - build-nwi.xml
        - build-jogl.xml
        - build-newt.xml
    They can be build at once using build.xml as ususal,
    which just invokes the seperate build tasks.

    if rootrel.build=build, then the build location is
        jogl/build-nwi
        jogl/build-jogl
        jogl/build-newt
    and the sources are under
        jogl/src/nwi
        jogl/src/jogl
        jogl/src/newt

    Tested: jogl-demos, d4; Linux, MacOsX; Nvidia

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1868 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNEWT window closing:
Sven Gothel [Sat, 14 Mar 2009 05:20:29 +0000 (05:20 +0000)]
NEWT window closing:
    - New WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY and
      WindowListener.windowDestroyNotify() method.

    - Removed windowClosed() method for JNI hook

    - Added windowDestroyNotify() windowDestroyed(),
      where windowDestroyNotify() shall be called by the native implementation
      _before_ the window gets shutdown.
      The Window.java then sends a WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY event,
      and either Window.java or it's owner GLWindow.java issues the destroy()
      procedure.

    - Added GLEventListener.dispose(GLAutoDrawable),
      to allow user application to release GL ressources.
      Issued by GLWindow (-> see windowDestroyNotify())

    - X11 impl intercepts WM_DELETE_WINDOW, using Atom,
      MacosX impl already uses the _before_ method (VERIFY),
      and Windows impl uses the WM_CLOSE event (VERIFY).

JOGL2 dispose/destroy ..
    - Added GLEventListener.dispose() to GLCanvas and GLJpanel

    - GL* toString() rearrangement, assumes it is issued by GLContext(),
      which indeed is the core information node.

    - Added proper destroy() methods and calls,
      to achieve a proper resource release at destruction.
      Instrumentizing almost all classes with a destroy() method,
      so no release function lookup is necessary.

    - misc changes ..

JOGL2 Demos
    - Fixed in regards to the above changes

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1867 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoWorked around problem on Mac OS X where right mouse button down events
Kenneth Russel [Fri, 13 Mar 2009 18:20:11 +0000 (18:20 +0000)]
Worked around problem on Mac OS X where right mouse button down events
were not being received by Newt window

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1866 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agojavadoc update (2)
Sven Gothel [Fri, 13 Mar 2009 12:35:27 +0000 (12:35 +0000)]
javadoc update (2)

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1865 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agojavadoc update
Sven Gothel [Fri, 13 Mar 2009 12:27:14 +0000 (12:27 +0000)]
javadoc update

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1864 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoNew package Native Window Interface 'java.media.nwi',
Sven Gothel [Fri, 13 Mar 2009 11:55:23 +0000 (11:55 +0000)]
New package Native Window Interface 'java.media.nwi',
to loose JOGL dependencies for the moved interfaces, mainly NativeWindow.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1863 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFix NEWT X11 Keymapping
Sven Gothel [Fri, 13 Mar 2009 00:50:51 +0000 (00:50 +0000)]
Fix NEWT X11 Keymapping

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1862 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFixed problem with conversion of key code for enter key on Mac OS X;
Kenneth Russel [Sun, 8 Mar 2009 07:11:54 +0000 (07:11 +0000)]
Fixed problem with conversion of key code for enter key on Mac OS X;
similar problems may exist on other platforms

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1858 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoUnified some double GL enums (register combiner), ..
Sven Gothel [Fri, 6 Mar 2009 13:00:24 +0000 (13:00 +0000)]
Unified some double GL enums (register combiner), ..

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1857 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years ago- Fixed rootrel.build usage, this works properly through gluegen, jogl-demos and...
Sven Gothel [Thu, 5 Mar 2009 01:23:34 +0000 (01:23 +0000)]
- Fixed rootrel.build usage, this works properly through gluegen, jogl-demos and this build.
  You can say -Drootrel.build=build-x86_64 for example.

- Fixed jogl-demos in regard to this changeset

- Gluegen
    - Fixed gluegen BuildComposablePipeline's 'getGL*' methods.
      Now they return 'this', otherwise the pipeline would be broken/removed.

    - Add BuildComposablePipeline CustomPipeline, which allows customized
      class composition with an interface (to be wrapped),
      prolog class and the downstream class.

    - Add GlueGen (incl. ant task) 'outputRootDir' to be able to set a
      top output root dir via ant / commandline.

- GL fixed function
    - Package 'javax.media.opengl.sub.fixed.*' defines some fixed function interfaces.
      This allows partitioning of custom implementation.

    - Using gluegen's new CustomPipeline to compose a GLFixedFuncIf implementation,
      using a GL downstream and a GLFixedFuncHookIf prolog.
      The latter implements the fixed functionality.
      Example is the GLFixedFuncImpl.
        gl.getContext().setGL( new GLFixedFuncImpl(gl, new FixedFuncHook(gl.getGL2ES2())) ) ;
      or
        gl.getContext().setGL( new GLFixedFuncImpl(gl, gl.getGL2ES1()) ) ;

   -  The example GLFixedFuncHookIf impl FixedFuncPipeline/
      can be instantiated with custom shader code.

- ES2 and all other interfaces only contain the original functionality,
  besides minor convenient data access methods.

- Fix: GL2ES2 createCompileShader() and createLoadShader() is moved to ShaderCode util class.

- Updated PMVMatrix

- Add: GLAutoDrawable.setContext() .. and all it's implementations
  Necessary to set a new GLContext.

- Add: GLContext getAttachedObject(int) and putAttachedObject(int, Object),
  to allow the user to attach application specific and TLS sensitive objects to the GLContext.

-

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1856 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoincrease double click interval
Christopher Oliver [Thu, 15 Jan 2009 16:36:12 +0000 (16:36 +0000)]
increase double click interval

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1848 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoChanged how MacWindow computes the coordinates for mouse events sent
Kenneth Russel [Thu, 15 Jan 2009 00:29:03 +0000 (00:29 +0000)]
Changed how MacWindow computes the coordinates for mouse events sent
up to Java to improve the behavior where drag events are used to drag
the window around; behavior is better but still not perfect

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1847 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFixed known bug in coordinates passed for WINDOW_MOVED events on Mac
Kenneth Russel [Wed, 14 Jan 2009 23:56:25 +0000 (23:56 +0000)]
Fixed known bug in coordinates passed for WINDOW_MOVED events on Mac
OS X. Fixed residual bug in handling of setPosition calls. Tested
manually by moving around window of Angeles demo.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1846 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoTurned off debugging printfs
Kenneth Russel [Wed, 14 Jan 2009 22:15:13 +0000 (22:15 +0000)]
Turned off debugging printfs

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1845 232f8b59-042b-4e1e-8c03-345bb8c30851

8 years agoFixed ArgumentIsString directive for glProgramStringARB (now
Kenneth Russel [Mon, 12 Jan 2009 00:51:18 +0000 (00:51 +0000)]
Fixed ArgumentIsString directive for glProgramStringARB (now
glProgramString) and updated demos. Added FIXME to
gl-ignore-gl2_es12-special.cfg about definitions that it seems should
be in the GL interface (such as the GL_ARB_imaging definitions) as
they are replicated in the GL2ES1 and GL2ES2 interfaces.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1844 232f8b59-042b-4e1e-8c03-345bb8c30851

http://JogAmp.org git info: FAQ, tutorial and man pages.