4 years agoJOGLNewtApplet3Run: Don't set position if normal child window. v2.1.4
Sven Gothel [Fri, 31 Jan 2014 14:12:21 +0000 (15:12 +0100)]
JOGLNewtApplet3Run: Don't set position if normal child window.

4 years agoNEWT WindowImpl: Don't waitForPosition(..) if child window - issues w/ different...
Sven Gothel [Fri, 31 Jan 2014 14:12:01 +0000 (15:12 +0100)]
NEWT WindowImpl: Don't waitForPosition(..) if child window - issues w/ different toolkits!

With Applet3 plugin (firefox - using GTK), our child window seems to receives the absolute position,
or 'arbitrary' values (?).
Will need to figure out how to properly determine these cases.

In the meantime, simply turn off waitForPosition(..) for child windows,
which shall not harm NEWT.

Impacts following actions as child window:
- createNativeWindow
- reparent
- fullscreen

4 years agoapplet3 test page: remove redundant 'Applet3' in link name
Sven Gothel [Fri, 31 Jan 2014 10:01:11 +0000 (11:01 +0100)]
applet3 test page: remove redundant 'Applet3' in link name

4 years agoAdapt to new plugin3 / Use browser window's location on screen for top-level window.
Sven Gothel [Fri, 31 Jan 2014 10:00:35 +0000 (11:00 +0100)]
Adapt to new plugin3 / Use browser window's location on screen for top-level window.

4 years agoNewtFactory: Cleanup / createWindow(..) w/ parentWindow variant shall fall back to...
Sven Gothel [Fri, 31 Jan 2014 09:59:47 +0000 (10:59 +0100)]
NewtFactory: Cleanup / createWindow(..) w/ parentWindow variant shall fall back to top-level ctor if parentWindow is null

4 years agoNativeWindowFactory.createWrappedWindow [WrappedWindow]: Using UpstreamSurfaceHookMut...
Sven Gothel [Fri, 31 Jan 2014 09:57:22 +0000 (10:57 +0100)]
NativeWindowFactory.createWrappedWindow [WrappedWindow]: Using UpstreamSurfaceHookMutableSizePos to take position into account; WrappedWindow: invalidate and destroy - display device could be opened.

4 years agoAdd NativeWindowFactory.getLocationOnScreen(NativeWindow nw) to retrieve the NativeWi...
Sven Gothel [Fri, 31 Jan 2014 09:55:19 +0000 (10:55 +0100)]
Add NativeWindowFactory.getLocationOnScreen(NativeWindow nw) to retrieve the NativeWindow location on screen

4 years agoSync plugin3-public jar and source files
Sven Gothel [Fri, 31 Jan 2014 09:53:29 +0000 (10:53 +0100)]
Sync plugin3-public jar and source files

4 years agoAdd Applet3 test html pages
Sven Gothel [Thu, 30 Jan 2014 11:00:21 +0000 (12:00 +0100)]
Add Applet3 test html pages

4 years agoNEWT: Add Support for AWT-Less Applet3
Sven Gothel [Thu, 30 Jan 2014 10:43:40 +0000 (11:43 +0100)]
NEWT: Add Support for AWT-Less Applet3

- Adding 'plugin3-public' jar and sources for Applet3 support, copied from icedtea-web3

- Added com.jogamp.newt.util.applet.JOGLNewtApplet3Run capable to run Applet3

4 years agoNewtFactory: Fix createWindow(..) ctor w/ given native window handle (use displayConn...
Sven Gothel [Thu, 30 Jan 2014 10:37:05 +0000 (11:37 +0100)]
NewtFactory: Fix createWindow(..) ctor w/ given native window handle (use displayConnection string and screen-idx)

4 years agoNativeWindowFactory: Add Support for creating a platform agnostic wrapped AbstractGra...
Sven Gothel [Thu, 30 Jan 2014 10:36:03 +0000 (11:36 +0100)]
NativeWindowFactory: Add Support for creating a platform agnostic wrapped AbstractGraphicsDevice/NativeWindow

4 years agoNEWT Window: Add API Doc for Custom Window Icons
Sven Gothel [Thu, 30 Jan 2014 03:50:17 +0000 (04:50 +0100)]
NEWT Window: Add API Doc for Custom Window Icons

4 years agoBug 952 - JAWTWindow.JAWTComponentListener's ctor() and detach() may deadlock due...
Sven Gothel [Mon, 27 Jan 2014 13:12:41 +0000 (14:12 +0100)]
Bug 952 - JAWTWindow.JAWTComponentListener's ctor() and detach() may deadlock due to AWTTreeLock acquisition while add/remove AWT listener

The AWTTreeLock is acquired by Component.removeHierarchyListener
and as for _every_ AWT component, modifications shall happen on the AWT-EDT.

IMHO the user shall offload AWT modifications to the AWT-EDT
similar to what JOGL's GLCanvas and NEWTCanvasAWT does.

However, since JAWTWindow also represents a NativeWindow instance
we shall offload AWTTreeLock methods ourselves!

4 years agoBug 927 - Enhance GLMediaPlayer/FFMPEGMediaPlayer MovieSimple to run multiple instanc...
Sven Gothel [Sun, 26 Jan 2014 03:55:37 +0000 (04:55 +0100)]
Bug 927 - Enhance GLMediaPlayer/FFMPEGMediaPlayer MovieSimple to run multiple instances in parallel

Tested on GNU/Linux x86_64,

Result: Plays well here audio and video, i.e. audio is actually mixed from both movies.

Even if one movie (below) stops and restarts (AL buffer reset),
it didn't crash.


LIB_AV Codec   : 54.92.100 [cc 54]
LIB_AV Format  : 54.63.104 [cc 54]
LIB_AV Util    : 52.18.100 [cc 52]
LIB_AV Resample: 1.0.1 [cc 1, loaded true]
LIB_SW Resample: 0.17.102 [cc 0, loaded true]
LIB_AV Device  : [loaded true]
LIB_AV Class   : FFMPEGv09Natives


(enable MovieSimple in scripts/

bash scripts/ -loop -windows 2 \
    -urlN 0 \
    -urlN 1


2 Streaming threads, i.e. decoder threads:

"Thread-5-StreamWorker_1" daemon prio=10 tid=0x00007f994c102000 nid=0x5826 in Object.wait() [0x00007f996fa37000]
        at jogamp.opengl.util.av.GLMediaPlayerImpl$
"Thread-4-StreamWorker_0" daemon prio=10 tid=0x00007f99600ed000 nid=0x5825 in Object.wait() [0x00007f996cd09000]
        at jogamp.opengl.util.av.GLMediaPlayerImpl$

4 years agoGLMediaPlayer: Add user attached objects, similar to GLContext - Allowing GLMediaEven...
Sven Gothel [Sun, 26 Jan 2014 02:00:36 +0000 (03:00 +0100)]
GLMediaPlayer: Add user attached objects, similar to GLContext - Allowing GLMediaEventListener impl. to access GLMediaPlayer associated objects

4 years agoScript: Correct joal.jar path; Remove redundant NewtDebugActivity (Debug is on for...
Sven Gothel [Sun, 26 Jan 2014 01:59:12 +0000 (02:59 +0100)]
Script: Correct joal.jar path; Remove redundant NewtDebugActivity (Debug is on for NewtVersionActivity)

4 years agoAdapt to joal.jar location in ${}/jar/joal.jar
Sven Gothel [Sat, 25 Jan 2014 15:37:01 +0000 (16:37 +0100)]
Adapt to joal.jar location in ${}/jar/joal.jar

4 years agoTestPerf001*Init0*: Add INIT_TIMEOUT for perf. loop (10s)
Sven Gothel [Fri, 24 Jan 2014 23:05:28 +0000 (00:05 +0100)]
TestPerf001*Init0*: Add INIT_TIMEOUT for perf. loop (10s)

4 years agoBug 948 - Autodetect GLRendererQuirks.SingletonEGLDisplayOnly
Sven Gothel [Fri, 24 Jan 2014 18:33:24 +0000 (19:33 +0100)]
Bug 948 - Autodetect GLRendererQuirks.SingletonEGLDisplayOnly

Refines commit fbe00e6f5dca8043b40dd96f096fecc9424e0cc3

Instead of querying driver artifacts (vendor, platform, version ..)
we simply can autodetect this quirk by trying to get a second egl-display handle
when initializing the EGLDrawablFactory's default device:

4 years agoGLRendererQuirks.addQuirks(..): Fix array bounds check
Sven Gothel [Fri, 24 Jan 2014 18:30:26 +0000 (19:30 +0100)]
GLRendererQuirks.addQuirks(..): Fix array bounds check

4 years agoAdd 'make/scripts/' to setup missing ' ->
Sven Gothel [Fri, 24 Jan 2014 04:23:34 +0000 (05:23 +0100)]
Add 'make/scripts/' to setup missing ' ->' symlinks for debian i386 libs on x86_64

4 years agoBug 948 - NVIDIA 331.38 (Linux X11) EGL impl. only supports _one_ EGL Display via...
Sven Gothel [Fri, 24 Jan 2014 04:16:05 +0000 (05:16 +0100)]
Bug 948 - NVIDIA 331.38 (Linux X11) EGL impl. only supports _one_ EGL Display via eglGetDisplay(..)

NVIDIA 331.38 (Linux X11) EGL impl. only supports _one_ EGL Display via eglGetDisplay.

  - Subsequent eglGetDisplay(..) calls fail.

  - Using the same 'global' egl-display does work though

Remedy: Add 'GLRendererQuirks.SingletonEGLDisplayOnly'

Detection of quirk is done as usual in GLContextImpl.setRendererQuirks(..),
and EGLDrawableFactory passes the quirk, if detected, down to EGLDisplayUtil.
The latter implements the singleton eglDisplay handle.

EGLDisplayUtil: Cleaned up ..
  - EGLDisplayRef employs the reference handling incl. eglInitialize(..) and eglTerminate(),
    as well as the new singleton quirk.

  - Mark all internal methods 'private',
    to remove possible [untested] sideffects.

4 years agoBug 950 - Recognize full FBO capabilities for ES 3.0 - [GLContext|GL].hasFullFBOSuppo...
Sven Gothel [Fri, 24 Jan 2014 04:01:40 +0000 (05:01 +0100)]
Bug 950 - Recognize full FBO capabilities for ES 3.0 - [GLContext|GL].hasFullFBOSupport() == true

OpenGL ES 3.0 supports full framebuffer operations, incl. multiple color-attachments and multisample.

Hence [GLContext|GL].hasFullFBOSupport()  shall returns true w/ a ES 3.0 context.

4 years agoEGLDisplayUtil.eglCreateEGLGraphicsDevice(..): Don't open() device implicit; EGLDrawa...
Sven Gothel [Thu, 23 Jan 2014 17:00:04 +0000 (18:00 +0100)]
EGLDisplayUtil.eglCreateEGLGraphicsDevice(..): Don't open() device implicit; EGLDrawableFactory.mapAvailableEGLESConfig(..): Clarify

4 years agoNEWT X11 DisplayDriver.dispatchMessagesNative(): Avoid aDevice NPE while being pulled
Sven Gothel [Thu, 23 Jan 2014 16:31:42 +0000 (17:31 +0100)]
NEWT X11 DisplayDriver.dispatchMessagesNative(): Avoid aDevice NPE while being pulled

4 years agoJar Manifest: Add empty line before EOF (otherwise last line is cut-off - duh), add...
Sven Gothel [Wed, 22 Jan 2014 22:12:52 +0000 (23:12 +0100)]
Jar Manifest: Add empty line before EOF (otherwise last line is cut-off - duh), add 'Application-Library-Allowable-Codebase: *'

4 years agoBug 921: FPSAnimator debug output on stderr shall happen only if DEBUG is enabled
Sven Gothel [Wed, 22 Jan 2014 19:30:56 +0000 (20:30 +0100)]
Bug 921: FPSAnimator debug output on stderr shall happen only if DEBUG is enabled

4 years agoBug 945 - Add test script to launch unit test from samba share on windows
Sven Gothel [Wed, 22 Jan 2014 19:15:23 +0000 (20:15 +0100)]
Bug 945 - Add test script to launch unit test from samba share on windows

4 years agoFix jogl-*-version.jnlp: Needs 'all-permissions' to match jogl-all.jar's manifest...
Sven Gothel [Wed, 22 Jan 2014 13:20:21 +0000 (14:20 +0100)]
Fix jogl-*-version.jnlp: Needs 'all-permissions' to match jogl-all.jar's manifest (Oracle's >= 7u51 constraints)

4 years agoAdding missing '' of commit 09fc7aa5539731bb0fba835caee6...
Sven Gothel [Wed, 22 Jan 2014 12:36:38 +0000 (13:36 +0100)]
Adding missing '' of commit 09fc7aa5539731bb0fba835caee61f6eb837ecff

4 years agoJOGL Test Applets: Refine html pages
Sven Gothel [Wed, 22 Jan 2014 12:13:16 +0000 (13:13 +0100)]
JOGL Test Applets: Refine html pages

4 years agoJNLP/Applets: Remove 'sun.java2d.noddraw' - We don't test with these flags either ..
Sven Gothel [Wed, 22 Jan 2014 12:00:04 +0000 (13:00 +0100)]
JNLP/Applets: Remove 'sun.java2d.noddraw' - We don't test with these flags either ..

4 years agoAdaption of Oracle's Deployment changes, i.e. >= 7u51
Sven Gothel [Wed, 22 Jan 2014 11:56:14 +0000 (12:56 +0100)]
Adaption of Oracle's Deployment changes, i.e. >= 7u51

Sadly, due to Oracle's Java Applet Plugin update 7u51,
unsigned applets are no more allowed and effectively
lower the bar to create user applets with raised privileges.<br/>
Hence JogAmp Community <b>signs</b> jogl-all.jar and gluegen-rt.jar, which contain the
JOGL's supporting classes as well as jogl-test.jar, which contains the applet class.<br/>
jogl-test.jar's manifest file uses <i>Permissions: sandbox</i>
to <b>not raise privileges</b>.

4 years agoDoc: JOGL-DEPLOYMENT Change 'Traditional Applets' to 'New Applets' (NApplet)
Sven Gothel [Tue, 21 Jan 2014 20:05:45 +0000 (21:05 +0100)]
Doc: JOGL-DEPLOYMENT Change 'Traditional Applets' to 'New Applets' (NApplet)

4 years agowindows test script
Sven Gothel [Tue, 21 Jan 2014 19:06:00 +0000 (20:06 +0100)]
windows test script

4 years agoAdd 'Permissions: all-permissions' to jogl-test.jar for Oracle's 7u51 Java Plugin...
Sven Gothel [Tue, 21 Jan 2014 19:05:48 +0000 (20:05 +0100)]
Add 'Permissions: all-permissions' to jogl-test.jar for Oracle's 7u51 Java Plugin (duh)

4 years agoTestSharedContextVBOES2NEWT3: Re-enable temp disabled tests (oops)
Sven Gothel [Tue, 21 Jan 2014 18:12:50 +0000 (19:12 +0100)]
TestSharedContextVBOES2NEWT3: Re-enable temp disabled tests (oops)

4 years agoGLBufferObjectTracker: Fix copyright notice (drop Sun Microsystems since this is...
Sven Gothel [Tue, 21 Jan 2014 18:07:08 +0000 (19:07 +0100)]
GLBufferObjectTracker: Fix copyright notice (drop Sun Microsystems since this is a rewrite of previous GLBufferSizeTracker)

4 years agoHowToBuild: Add 'libxcursor-devel' dependency and a debian one-liner ..
Sven Gothel [Tue, 21 Jan 2014 17:57:17 +0000 (18:57 +0100)]
HowToBuild: Add 'libxcursor-devel' dependency and a debian one-liner ..

4 years agoBetter shared GLAutoDrawable synchronization: Block slave instances to also block...
Sven Gothel [Tue, 21 Jan 2014 17:56:32 +0000 (18:56 +0100)]
Better shared GLAutoDrawable synchronization: Block slave instances to also block until all master's GLEventListener.init(..) methods have been called

Better shared GLAutoDrawable synchronization.
Block slave instances to also block until all master's GLEventListener.init(..) methods have been called

- GLSharedContextSetter: Add areAllGLEventListenerInitialized()
  - GLCanvas (SWT, AWT)
  - GLJPanel
  - GLAutoDrawableBase (GLWindow, ..)

- GLDrawableHelper's isSharedGLContextPending(..)
  takes 'areAllGLEventListenerInitialized()' into consideration
  allowing to block the slave creation until master is completed.

This solves teh use case, where the master creates resources in it's
GLEventListener initialization (buffers), which are shared with
it's slaves.

4 years agoBug 942: GLBufferObjectTracker Enhancement [2/2]: Add mapped buffer capabilities...
Sven Gothel [Tue, 21 Jan 2014 17:51:16 +0000 (18:51 +0100)]
Bug 942: GLBufferObjectTracker Enhancement [2/2]: Add mapped buffer capabilities to GLArrayDataServer and add unit tests

  - Add create*Mapped(..) variants for GPU mapped buffer usage
    w/o client buffers.

  - Fix API documentation (arguments)

  - Fix 'addGLSLSubArray(..)'
    - properly compute and pass 'subStrideB' in bytes to GLArrayDataWrapper ctor.

  - Add 'mapStorage(..)' and 'unmapStorage(..)'
    allowing to map the GPU buffer.

  - Fix getElementCount(): Consider stride in bytes and consider 'mappedElementCount'
  - getSizeInBytes(): Consider 'mappedElementCount'

  - Use new GLBase methods, e.g. getBoundBuffer(..) instead of glGetBoundBuffer(..)

  - TestMapBufferRead01NEWT: Validate GLBufferStorage (i.e. GLBufferObjectTracker)

  - Add RedSquareMappedES2 using GPU mapped buffer
    - Test w/ TestRedSquareES2NEWT, cmd-line 'mappedBuffers'

  - GearsES1 and GearsES2: Add GPU buffer mapping mode for all test cases
    - Add buffer validation mode, i.e. test whether GLBufferObjectTracker
      works properly.

    - Test w/ TestGearsES2NEWT, cmd-line 'mappedBuffers'

  - TestSharedContextVBOES2NEWT0, TestSharedContextVBOES2NEWT3:
    - Add GPU mapped buffers tests to validate GLBufferObjectTracker
      code path with shared GLContext across multiple threads.

4 years agoBug 942: GLBufferObjectTracker: Tracking GLBufferStorage accurately, synchronized...
Sven Gothel [Tue, 21 Jan 2014 17:16:22 +0000 (18:16 +0100)]
Bug 942: GLBufferObjectTracker: Tracking GLBufferStorage accurately, synchronized and secure [1/2]

GLBufferSizeTracker becomes GLBufferObjectTracker
and tracks the buffer's data store, GLBufferStorage, accurately, synchronized and secure.

Synchronization is required, since the GLBufferStorage can be
shared across many GLContext on multiple threads.

This requires all GLBufferStorage lifecycle affecting GL functions
to utilize synchronized GLBufferObjectTracker methods
while passing a native GL-func callback.

These GL functions are:
  - glBufferData, glBufferStorage (GL 4.4), glNamedBufferDataEXT
    Creating the GLBufferStorage object
  - glMapBuffer, glMapBufferRange, and their *Named*EXT variants
  - glUnmapBuffer, glUnmapNamedBufferEXT

'glDeleteBuffers' can simply notify the GLBufferObjectTracker

No more HashMap is required to associate the mapped buffer address
to the mapped ByteBuffer.

GLBufferObjectTracker simply utilizes a
   buffer-name (int) -> GLBufferStorage


The security aspect shall be implemented by validating all arguments
whether they match the required GL constraints,
as well as validating tracked states like 'size'.

The following functions will throw an GLException accordingly:
  - glBufferData, glNamedBufferDataEXT
     * @throws GLException if size is less-than zero
     * @throws GLException if a native GL-Error occurs

  - glBufferStorage (GL 4.4)
     * @throws GLException if size is less-or-eqaul zero
     * @throws GLException if a native GL-Error occurs

  - glMapBuffer, and it's *Named*EXT variant
    * @throws GLException if buffer is not bound to target
    * @throws GLException if buffer is not tracked
    * @throws GLException if buffer is already mapped
    * @throws GLException if buffer has invalid store size, i.e. less-than zero

  - glMapBufferRange, and it's *Named*EXT variant
    * @throws GLException if buffer is not bound to target
    * @throws GLException if buffer is not tracked
    * @throws GLException if buffer is already mapped
    * @throws GLException if buffer has invalid store size, i.e. less-than zero
    * @throws GLException if buffer mapping range does not fit, incl. offset

  - glMapBufferRange, and it's *Named*EXT variant
    Only clear mapped buffer reference of GLBufferStorage
    if native unmap was successful.

Further more special error handling shall be applied to:
  - glMapBuffer, and it's *Named*EXT variant,
    glMapBuffer, and it's *Named*EXT variant
    - A zero GLBufferStorage size will avoid a native call and
      returns null
    - A null native mapping result indicating an error will
     not cause a GLException but returns null
     This allows the user to handle this case.

4 years agoBug 943 - GLBufferStateTracker shall support tracking all possible buffer targets
Sven Gothel [Wed, 15 Jan 2014 17:51:10 +0000 (18:51 +0100)]
Bug 943 - GLBufferStateTracker shall support tracking all possible buffer targets

4 years agoBug 942 - Review GLBuffer[State|Size]Tracker: Add synchronized access to shared buffe...
Sven Gothel [Wed, 15 Jan 2014 17:50:23 +0000 (18:50 +0100)]
Bug 942 - Review GLBuffer[State|Size]Tracker: Add synchronized access to shared bufferSizeTracker

4 years agoBug 942: Bug 942 - Review GLBuffer[State|Size]Tracker and NIO mapped buffers
Sven Gothel [Tue, 14 Jan 2014 19:25:07 +0000 (20:25 +0100)]
Bug 942: Bug 942 - Review GLBuffer[State|Size]Tracker and NIO mapped buffers

Commit f8a74c9831c65725a699320c27e62161a0378241 reverted
commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1
due to the fact that the buffer binding itself is _not_
shared across shared GLContext!

Apply uncritical changes of 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1:


Simplify GLBufferSizeTracker creation @ GLContextImpl ctor,
make it final.


Clear the GLBufferSizeTracker (@destruction) only if no more
created shares are left!


Refine API doc.


4 years agoRevert "Bug 942 - Share GLBufferStateTracker ; Unify GLBufferStateTracker and GLBuffe...
Sven Gothel [Tue, 14 Jan 2014 18:38:49 +0000 (19:38 +0100)]
Revert "Bug 942 - Share GLBufferStateTracker ; Unify GLBufferStateTracker and GLBufferSizeTracker (simplification)"

This reverts commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1.

4 years agoJAWTWindow DEBUG: Dump all JAVA_VERSION* information
Sven Gothel [Tue, 14 Jan 2014 18:18:52 +0000 (19:18 +0100)]
JAWTWindow DEBUG: Dump all JAVA_VERSION* information

4 years agoBug 942 - Share GLBufferStateTracker ; Unify GLBufferStateTracker and GLBufferSizeTra...
Sven Gothel [Tue, 14 Jan 2014 06:37:26 +0000 (07:37 +0100)]
Bug 942 - Share GLBufferStateTracker ; Unify GLBufferStateTracker and GLBufferSizeTracker (simplification)

Due to future mapped buffer tracking, the GLBufferStateTracker instance shall be shared
across shared GLContextImpl instances similar to GLSizeStateTracker!

This allows us to merge GLSizeStateTracker code into GLBufferStateTracker
to simplify the implementation.


Clear the GLBufferStateTracker (@destruction) only if no more
created shares are left!


4 years agoBug 938 - has no more equals() method
Sven Gothel [Tue, 14 Jan 2014 04:22:15 +0000 (05:22 +0100)]
Bug 938 - has no more equals() method

Re-adding 'equals(..)' method erroneously removed with commit 8457bf35fee253d9af29ff1150a9671f6896fc17.

'equals(..)' is important to allow the HashMap<> for glMapBuffer(..) work properly!

4 years agoTestParenting01dAWT: Add waitForVisible after toggling NEWT child window visibility...
Sven Gothel [Mon, 13 Jan 2014 18:31:18 +0000 (19:31 +0100)]
TestParenting01dAWT: Add waitForVisible after toggling NEWT child window visibility helping robostness of test case.

4 years agoOSXMisc CALayer::FixCALayerLayout: Fix visible:=false case, i.e. don'r override cache...
Sven Gothel [Mon, 13 Jan 2014 05:37:24 +0000 (06:37 +0100)]
OSXMisc CALayer::FixCALayerLayout: Fix visible:=false case, i.e. don'r override cached visibleOpacity w/ forced zero when called twice

4 years agoJAWTWindow.JAWTComponentListener: Minor Cleanup
Sven Gothel [Mon, 13 Jan 2014 05:35:52 +0000 (06:35 +0100)]
JAWTWindow.JAWTComponentListener: Minor Cleanup

4 years agoJOGLNewtAppletBase: Typo of new PNG icons .. used AE's 'gray' instead of BE's 'grey...
Sven Gothel [Sun, 12 Jan 2014 16:11:23 +0000 (17:11 +0100)]
JOGLNewtAppletBase: Typo of new PNG icons .. used AE's 'gray' instead of BE's 'grey', which is used for the filename

Same as 42d3b31d1becd8eb8e2847c87e14e47e15e730cd

4 years agoDefaultEDTUtil: At EDT finish, notify all task-waiter to avoid deadlock at error...
Sven Gothel [Sun, 12 Jan 2014 07:08:42 +0000 (08:08 +0100)]
DefaultEDTUtil: At EDT finish, notify all task-waiter to avoid deadlock at error / Add test method 'invokeAndWaitError(..)'

4 years agoAWTParentWindowAdapter/AWTRobotUtil: Use 'isShowing()' instead of 'isVisible()' deter...
Sven Gothel [Sun, 12 Jan 2014 06:56:54 +0000 (07:56 +0100)]
AWTParentWindowAdapter/AWTRobotUtil: Use 'isShowing()' instead of 'isVisible()' determining actual on-screen showing state

See commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651

4 years agoBug 937 - JAWTWindow: Unsatisfying Visibility Computation
Sven Gothel [Sun, 12 Jan 2014 06:27:55 +0000 (07:27 +0100)]
Bug 937 - JAWTWindow: Unsatisfying Visibility Computation

Simplify JAWTComponentListener's HierarchyListener:
  - Don't interfere w/ Component's visibility anymore!
    This shall reduce sideeffects.
    Utilize 'isShowing' in each Component specialization, i.e. GLCanvas.

  - On SHOWING_CHANGED if a parent caused a change
    of the tracked components showing state,
    propagate it to the offscreen-layer!

  - Remove all other complicated states!

GLCanvas, GLJPanel:
  - Instead of 'isVisible()' use 'showing state',
    since only the 'showing state' reflects 'true' visibility
    throughout the hierarchy.

  - Add HierarchyListener and track volatile showing state
    to be used instead of 'isVisible'.
    Using a cached showing state is more efficient
    than quering 'isShowing()' all the time!

  - Use 'isShowing()' instead of 'isVisible(), see above

4 years agoFix GLDrawableHelper.resizeOffscreenDrawable(..): Do nothing if !drawable.isRealized...
Sven Gothel [Sat, 11 Jan 2014 06:35:05 +0000 (07:35 +0100)]
Fix GLDrawableHelper.resizeOffscreenDrawable(..): Do nothing if !drawable.isRealized() - similar to it's recreateDrawable() and test only _after_ having the surface lock!

Only after the surface lock we are thread safe.

In case drawable has been pulled, do nothing ..

4 years agoMisc Cleanup: JAWTWindow: Reusing visible in HIERARCHY listener; Remove obsolete...
Sven Gothel [Sat, 11 Jan 2014 06:27:15 +0000 (07:27 +0100)]
Misc Cleanup: JAWTWindow: Reusing visible in HIERARCHY listener; Remove obsolete 'getPrivateGraphicsConfiguration()'

4 years ago[Jogl|Nativewindow|Newt]Common: Align all *Common_GetJNIEnv()/_ReleaseJNIEnv() Method...
Sven Gothel [Sat, 11 Jan 2014 01:11:47 +0000 (02:11 +0100)]
[Jogl|Nativewindow|Newt]Common: Align all *Common_GetJNIEnv()/_ReleaseJNIEnv() Methods and Usage / Check arguments ..

Since we still don't use inter-module native code sharing, align the JNIEnv get/release methods and usage.

Most beneficary here is OSX and the GLDebugMessageHandle,
both managed the JVM handle on their own - removed now.

Also ensuring that *Common_init(..) is called for all modules on all platforms.

4 years agoX11: Harden usage of 'XGetWindowProperty(..)' and 'XGetVisualInfo' - Add missing...
Sven Gothel [Fri, 10 Jan 2014 23:04:18 +0000 (00:04 +0100)]
X11: Harden usage of 'XGetWindowProperty(..)' and 'XGetVisualInfo' - Add missing XFree(..) calls and argument checks.

4 years agoFix PNGTstFiles: Typo of new PNG icons .. used AE's 'gray' instead of BE's 'grey...
Sven Gothel [Thu, 9 Jan 2014 21:08:10 +0000 (22:08 +0100)]
Fix PNGTstFiles: Typo of new PNG icons .. used AE's 'gray' instead of BE's 'grey', which is used for the filename

4 years agoBCM_VC_IV: Add 2 references (_poor_ API docs, very)
Sven Gothel [Thu, 9 Jan 2014 21:07:16 +0000 (22:07 +0100)]
BCM_VC_IV: Add 2 references (_poor_ API docs, very)

4 years agoNEWT Rasp.Pi: Add Support for multiple Windows, dynamic set size and position
Sven Gothel [Thu, 9 Jan 2014 19:45:28 +0000 (20:45 +0100)]
NEWT Rasp.Pi: Add Support for multiple Windows, dynamic set size and position

Impl. manages up-to 32 windows (BCM layer elements) - dunno whether this is a proper value.

Note: Layer 2000 is reserved for out PointerIcon.

Removed 'dead code'.

4 years agoNEWT bcm_vc_iv.c: Disable VERBOSE_ON
Sven Gothel [Thu, 9 Jan 2014 17:56:47 +0000 (18:56 +0100)]
NEWT bcm_vc_iv.c: Disable VERBOSE_ON

4 years agoBug 676 - Add support for native Mouse Pointer rendering (Rasp.-Pi.) - Intercept...
Sven Gothel [Thu, 9 Jan 2014 17:51:16 +0000 (18:51 +0100)]
Bug 676 - Add support for native Mouse Pointer rendering (Rasp.-Pi.) - Intercept sendMouseEvent(..)

Intercepting 'sendMouseEvent(..)' to reduce the lag (time) and listener footprint.

4 years agoBug 676 - Add support for native Mouse Pointer rendering (Rasp.-Pi.)
Sven Gothel [Thu, 9 Jan 2014 17:44:35 +0000 (18:44 +0100)]
Bug 676 - Add support for native Mouse Pointer rendering (Rasp.-Pi.)

- Utilizing layer element 2000 for PointerIcon

- Using NEWT PointerIcon code

- Using MouseListener to update PointerIcon position
  - FIXME: Check whether we shall intercept sendMouseEvent directly (lag)

  - Properly open, assign and close the BCM display handle
  - Properly destroy the window (BCM element)
  - Prepare for multiple windows, set position and size

4 years agoNEWT DisplayImpl/PointerIcon: Don't use blocking isNativeValid() before and after...
Sven Gothel [Thu, 9 Jan 2014 17:35:44 +0000 (18:35 +0100)]
NEWT DisplayImpl/PointerIcon: Don't use blocking isNativeValid() before and after EDT entry (deadlock)

4 years agoBug 676: Use proper pointer icon images (artwork)
Sven Gothel [Thu, 9 Jan 2014 17:34:33 +0000 (18:34 +0100)]
Bug 676: Use proper pointer icon images (artwork)

.. shameless inspired by KDE's Oxgen scheme .. (they are best)

4 years agoPixelRectangle.GenericPixelRect: hashCode() impl. didn't set volatile hashCodeCompute...
Sven Gothel [Thu, 9 Jan 2014 09:33:16 +0000 (10:33 +0100)]
PixelRectangle.GenericPixelRect: hashCode() impl. didn't set volatile hashCodeComputed := true (always re-computes hash code - duh!)

4 years agoMerge remote-tracking branch 'hharrison/master'
Sven Gothel [Thu, 9 Jan 2014 06:15:07 +0000 (07:15 +0100)]
Merge remote-tracking branch 'hharrison/master'

4 years agoBug 935: NEWT PointerIcon: Utilize Toolkit Agnostic PixelFormat and Conversion Utilit...
Sven Gothel [Wed, 8 Jan 2014 20:56:26 +0000 (21:56 +0100)]
Bug 935: NEWT PointerIcon: Utilize Toolkit Agnostic PixelFormat and Conversion Utilities (Allowing 'arbitrary' PointerIcon data input)

Commit fe28bc125429b38cdcd016746081f4a6d521c6fd added the notion of toolkit agnostic PixelFormat and conversion utilities,
utilized and further tested by this patch.


- PointerIcon is a PixelRectangle
  and hence holds the decoded data.
  This allows on-the-fly conversion if required
  as well as recreation w/o PNG re-decoding.

- Using array-backed PointerIcon data where possible,
  allowing better performance when converting PixelFormat etc.

- NEWT Display adds 'createPointerIcon(final IOUtil.ClassResources pngResource...'
  method to support agnostic PointerIcon creation.

- NEWT Display adds methods to allow users to avoid PixelFormat and
  Buffer NIO type forced conversion:
    - PixelFormat getNativePointerIconPixelFormat()
    - boolean getNativePointerIconForceDirectNIO()


PNGImage -> PNGPixelRect
  Deleted: com.jogamp.opengl.util.texture.spi.PNGImage
  Added:   com.jogamp.opengl.util.PNGPixelRect

  (We hope nobody was using PNGImage directly since it was a service-plugin for TextureIO)

  PNGPixelRect is a PixelRectangle

  PNGPixelRect actually is implemented OpenGL agnostic,
  however - since our PNGJ support lives under package 'jogamp.opengl.util.pngj'
  it cannot be moved up (yet).

  PNGPixelRect now handles all PixelFormat for the target format
  and also added support for grayscale+alpha (2 channels).
  The latter is force-converted to RGB* - similar to paletted.

  Further more, PNGPixelRect allows simply passing an OutputStream to write the PNG data.

  Used by: TextureIO and NEWT


- OffscreenSurfaceLayer's setCursor(..) uses the agnostic PixelRectangle
  instead of a PNG resource.

- AWTMisc uses the PixelRectangle to produce the AWT Cursor
  and converts it to the required format.
  Hence same pixels are used for NEWT and AWT pointer/cursor icon.

- TestGearsES2Newt and NewtAWTReparentingKeyAdapter 'tests'
  iterate over 3 custom PointerIcon when pressed 'c'.

- JOGLNewtAppletBase uses the new custom PointerIcon
  'newt/data/crosshair-lumina-trans-32x32.png', which is included in NEWT (213 bytes only).


4 years agoBug 935: NEWT PointerIcon: Add Toolkit Agnostic PixelFormat and Conversion Utilities...
Sven Gothel [Wed, 8 Jan 2014 20:27:20 +0000 (21:27 +0100)]
Bug 935: NEWT PointerIcon: Add Toolkit Agnostic PixelFormat and Conversion Utilities (Allowing 'arbitrary' PointerIcon data input)

To allowing 'arbitrary' PointerIcon data input, i.e. via raw pixels
we need to define an agnostic PixelFormat and required conversion utilities.

The latter is not hw accelereated (toolkit agnostic), but this shall be expected
and satisfying for small amount of 'pixels'.

4 years agowww: update the address for the jaamsim project
Harvey Harrison [Wed, 25 Dec 2013 18:36:03 +0000 (10:36 -0800)]
www: update the address for the jaamsim project

Signed-off-by: Harvey Harrison <>
4 years agoBug 935: NEWT PointerIcon/Visibility: Perform JAWTWindow's OffscreenLayerSurface...
Sven Gothel [Sun, 5 Jan 2014 17:23:06 +0000 (18:23 +0100)]
Bug 935: NEWT PointerIcon/Visibility: Perform JAWTWindow's OffscreenLayerSurface PointerIcon/Visibility tasks async on AWT-EDT

setCursor(..) and hideCursor(..) must happen on the AWT-EDT w/o blocking,
otherwise we may deadlock the NEWT-EDT.

4 years agoBug 935: NEWT PointerIcon/Visibility: Perform OffscreenLayerSurface delegation _alway...
Sven Gothel [Sun, 5 Jan 2014 17:21:26 +0000 (18:21 +0100)]
Bug 935: NEWT PointerIcon/Visibility: Perform OffscreenLayerSurface delegation _always_ in common WindowImpl ; Workaround for Windows+Applet issue.

Perform OffscreenLayerSurface delegation _always_ in common WindowImpl

Instead of performing OffscreenLayerSurface task on OSX's WindowDriver implementation,
use generic implementation in WindowImpl for all platform exposing same behavior.

ReparentAction takes care of reset/setup of PointerIcon/Visibility states.


This is also a workaround for Windows+Applet issue,
where the PointerIcon gets periodically overridden
by the AWT Component's icon.

4 years agoNEWT OSX: Add missing NewtCommon_init(env) (duh!) - Issuing NewtCommon_throwNewRuntim...
Sven Gothel [Sun, 5 Jan 2014 17:12:43 +0000 (18:12 +0100)]
NEWT OSX: Add missing NewtCommon_init(env) (duh!) - Issuing NewtCommon_throwNewRuntimeException(..) if given references are of invalid type

Missing NewtCommon_init(env) always lead to a crash when calling NewtCommon_throwNewRuntimeException(..)
due to uninitialized clazz instances!

4 years agoNativewindowCommon_init: Add define STDERR_TO_FILE (default undefined) to redirect...
Sven Gothel [Sun, 5 Jan 2014 17:09:41 +0000 (18:09 +0100)]
NativewindowCommon_init: Add define STDERR_TO_FILE (default undefined) to redirect stderr to file jogamp_stderr.log (Useful for Applets)

4 years agoBug 935: NEWT Windows Pointer-Icon WM_SETCURSOR: Don't use DefWindowProc, SetCursor...
Sven Gothel [Sun, 5 Jan 2014 17:08:45 +0000 (18:08 +0100)]
Bug 935: NEWT Windows Pointer-Icon WM_SETCURSOR: Don't use DefWindowProc, SetCursor(..) if HTCLIENT && isChildWin && customCursor

4 years agoBug 935: NEWT Windows Window-Icon: Use WNDCLASSEX w/ Small/Big Default Icons (NativeW...
Sven Gothel [Sun, 5 Jan 2014 02:38:15 +0000 (03:38 +0100)]
Bug 935: NEWT Windows Window-Icon: Use WNDCLASSEX w/ Small/Big Default Icons (NativeWindow GDI / NEWT )

.. this allows using the icon definition of WNDCLASSEX instead of setting them at CreateWindow0(..).

- NativeWindow GDIUtil/RegisteredFactory uses WNDCLASSEX and Small/Big Defailt Icons

4 years agoTestInitConcurrent01NEWT: Fix test enumeration
Sven Gothel [Sat, 4 Jan 2014 16:22:42 +0000 (17:22 +0100)]
TestInitConcurrent01NEWT: Fix test enumeration

4 years agoBug 935: NEWT Windows Window-Icon: Fix Window-Icon Visibility after Reparenting CHILD...
Sven Gothel [Sat, 4 Jan 2014 16:22:05 +0000 (17:22 +0100)]
Bug 935: NEWT Windows Window-Icon: Fix Window-Icon Visibility after Reparenting CHILD -> TOP

Hiding the window via 'ShowWindow(.., SW_HIDE)' before reparenting and subsequent
style change incl. visibility renders the Window-Icon visible.

4 years agoJOGLNewtAppletBase Default Key-Action: Add 'j' for setPointerConfined() .. i.e. ...
Sven Gothel [Sat, 4 Jan 2014 16:20:00 +0000 (17:20 +0100)]
JOGLNewtAppletBase Default Key-Action: Add 'j' for setPointerConfined() .. i.e. 'jailed'

4 years agoBug 935: NEWT OSX PointerIcon/Pointer-Visibility: Impl. OffscreenLayerSurface (OSX...
Sven Gothel [Sat, 4 Jan 2014 16:18:47 +0000 (17:18 +0100)]
Bug 935: NEWT OSX PointerIcon/Pointer-Visibility: Impl. OffscreenLayerSurface (OSX CALayer) w/ JAWTWindow Path

Add setCursor(..) and hideCursor() to OffscreenLayerSurface interface,
impl. in JAWTWindow w/ AWT.

This allows an OSX NEWT Window using CALayer (i.e. NewtCanvasAWT)
to have setPointerIcon(..) and setPointerVisible(..) functionality!

4 years agoBug 935: NEWT PointerIcon: Refine Spec and Implementation / Fix OSX Crash and Issues
Sven Gothel [Sat, 4 Jan 2014 16:15:04 +0000 (17:15 +0100)]
Bug 935: NEWT PointerIcon: Refine Spec and Implementation / Fix OSX Crash and Issues

- Refine Display.PointerIcon: Complete type allowing re-creation
  - Add associated Display reference
  - Add used IOUtil.ClassResources reference
  - Add isValid()/validate() methods for recreation
  - Refine API doc

- Move Display.destroyPointerIcon(PointerIcon) -> PointerIcon.destroy()

- Move DisplayImpl.PointerIconImpl -> PointerIconImpl (own source file)

- Creation/Destruction and setting of PointerIcon happens on EDT

- DisplayImpl.shutdownAll() and Display.destroy() calls destroyAllPointerIconFromList

- WindowDriver.setPointerIconImpl: Validates PointerIconImpl (i.e. re-creates if required)

- Fix 'initial' window.setPointerIcon(..) before createNative(..),
  tested w/ TestGearsES2NEWT

- OSX Native Code:
  - Move mouse and pointer-state handling from NewtMacWindow -> NewtView class
    to retain states (pointer handle, pointer visibility, etc) when reparenting.
    Reparenting will move an exisiting NewtView into a new NewtMacWindow.

  - Enable all mouse move events:
    - NewtView::mouseEnter [nsWin makeFirstResponder: nsView];
    - NewtView::mouseExited if( !mouseConfined ) { [nsView resignFirstResponder]; }

  - NewtView::mouseMoved issued [myCurser set] if required, fixing
    OSX issue not updating NSCursor properly.

 - MacWindow:
    - Test NewtMacWindow, NewtView and NSCursor handles before usage
    - Fix DBG_PRINT(..) warnings

4 years agoBug 935: NEWT PointerIcon PNGIcon: Remove return value 'elem_bytesize[]' which is...
Sven Gothel [Fri, 3 Jan 2014 03:45:03 +0000 (04:45 +0100)]
Bug 935: NEWT PointerIcon PNGIcon: Remove return value 'elem_bytesize[]' which is always 4 (RGBA/BGRA

4 years agoBug 935: NEWT PointerIcon PNGIcon: Remove return value 'elem_bytesize[]' which is...
Sven Gothel [Fri, 3 Jan 2014 03:32:44 +0000 (04:32 +0100)]
Bug 935: NEWT PointerIcon PNGIcon: Remove return value 'elem_bytesize[]' which is always 4 (RGBA/BGRA)

4 years agoBug 935: NEWT PointerIcon OSX: Safe use of NSCursor handle
Sven Gothel [Fri, 3 Jan 2014 03:29:38 +0000 (04:29 +0100)]
Bug 935: NEWT PointerIcon OSX: Safe use of NSCursor handle

4 years agoNewtMacWindow: NSView: Remove unused 'myCursor' field
Sven Gothel [Thu, 2 Jan 2014 19:24:36 +0000 (20:24 +0100)]
NewtMacWindow: NSView: Remove unused 'myCursor' field

4 years agoMacWindow.m: Add missing NSAutoreleasePool 'decoration'
Sven Gothel [Thu, 2 Jan 2014 19:23:28 +0000 (20:23 +0100)]
MacWindow.m: Add missing NSAutoreleasePool 'decoration'

4 years agoBug 935: NEWT PointerIcon: Add size, hotspot 'getter' and String representation
Sven Gothel [Tue, 31 Dec 2013 15:54:07 +0000 (16:54 +0100)]
Bug 935: NEWT PointerIcon: Add size, hotspot 'getter' and String representation

PointerIcon's size and hotspot maybe be useful for certain user-app calculation.

4 years agoBug 935: NEWT: Expose Pointer Icons Feature in JOGLNewtAppletBase Tests
Sven Gothel [Tue, 31 Dec 2013 07:40:48 +0000 (08:40 +0100)]
Bug 935: NEWT: Expose Pointer Icons Feature in JOGLNewtAppletBase Tests

4 years agoBug 934, Bug 935: NEWT: Add support for custom Application/Window and Pointer Icons
Sven Gothel [Tue, 31 Dec 2013 07:14:21 +0000 (08:14 +0100)]
Bug 934, Bug 935: NEWT: Add support for custom Application/Window and Pointer Icons

- Utilizing JOGL's PNG decoder for all icons, if available.

- Application/window icons:
  - Providing default application/window icons in 16x16 and 32x32 size
  - NewtFactory.setWindowIcons(..) or property 'newt.window.icons' maybe used to override default icons.
  - Using icons at application/window instantiation

- Display.PointerIcons:
  - NativeWindow Win32 WindowClass no more references a default cursor
    in favor of fine grained cursor control [in NEWT]

  - Display provides create/destroy methods,
    where display destruction also releases open PointerIcon references.

  - Window.setPointerIcon(..) sets custom PointerIcon

- Implemented Platforms
  - X11
  - Windows
  - OSX

- Manual Test: TestGearsES2NEWT (Press 'c')

4 years agoNEWT Cleanup - Remove Type Casts and OSX Newt/Fmod Workaround (Early WindowImpl initi...
Sven Gothel [Tue, 31 Dec 2013 07:01:28 +0000 (08:01 +0100)]
NEWT Cleanup - Remove Type Casts and OSX Newt/Fmod Workaround (Early WindowImpl initialization)

4 years agoNEWT WindowImpl: Add 'final' qualifier where possible
Sven Gothel [Mon, 30 Dec 2013 23:47:21 +0000 (00:47 +0100)]
NEWT WindowImpl: Add 'final' qualifier where possible

4 years agoOSX Test Scripts: Use dedicated location for libav/ffmpeg libraries for DYLD_LIBRARY_PATH
Sven Gothel [Mon, 30 Dec 2013 20:30:04 +0000 (21:30 +0100)]
OSX Test Scripts: Use dedicated location for libav/ffmpeg libraries for DYLD_LIBRARY_PATH

'/usr/local/lib' may cause hacoc w/ other preinstalled libs, see:

4 years agoJOGL Assets: Preserve 'original' 'test-ntsc01-160x90.png' (Removed from jar files...
Sven Gothel [Fri, 27 Dec 2013 23:40:43 +0000 (00:40 +0100)]
JOGL Assets: Preserve 'original' 'test-ntsc01-160x90.png' (Removed from jar files by commit 80edd3f92f5afb3e1971d0b59fd91f8714a772db)

4 years agoJOGL Assets: Replace test-ntsc01-160x90.png w/ test-ntsc01-57x32.png (Save ~2 kB)
Sven Gothel [Fri, 27 Dec 2013 23:38:02 +0000 (00:38 +0100)]
JOGL Assets: Replace test-ntsc01-160x90.png w/ test-ntsc01-57x32.png (Save ~2 kB)

4 years agoBug 930 - OSX: Using 'Apple Software Renderer' GLRendererQuirks Quirk GL4NeedsGL3Requ...
Sven Gothel [Mon, 23 Dec 2013 22:09:23 +0000 (23:09 +0100)]
Bug 930 - OSX: Using 'Apple Software Renderer' GLRendererQuirks Quirk GL4NeedsGL3Request not set

GL3 core version validation failed due to missing braces around 'isES' _and_ term,
where the latter consist out of 2 _or_ terms testing version mismatch.

On OSX we validate a GL3 core context first and expect it to return a GL4 version if available,
which in turn triggers the quirk GL4NeedsGL3Request.
This behavior was disabled due to above mentioned bug, where the unqual major version caused
the validation to fail.

TestGLProfile01NEWT: Fixed 'GL4ES3' test, where 'GL4ES3' is only available
if extension <code>GL_ARB_ES3_compatibility</code> is available as well.

4 years agoBug 929, Bug 852 - Reflect ES3 Compatibility with ES2 / Add CPU Sourced Data API...
Sven Gothel [Sun, 22 Dec 2013 02:30:26 +0000 (03:30 +0100)]
Bug 929, Bug 852 - Reflect ES3 Compatibility with ES2 / Add CPU Sourced Data API Func to ES3 Interface

Since ES3 is compatible w/ ES2 and CPU sourced data is [still] allowed (but marked deprecated),
re-adding them to the ES3 interface for completness.

Note: CPU sourced data API functions will be removed in ES4, similar to GL core >= 3.0 git info: FAQ, tutorial and man pages.