4 years agodoc/Platforms.txt: Update Virtualbox 4.3 Tests .. w/ Debian Host and Client (Wheezy... 2.1-maint v2.1.5
Sven Gothel [Tue, 11 Mar 2014 00:59:24 +0000 (01:59 +0100)]
doc/Platforms.txt: Update Virtualbox 4.3 Tests .. w/ Debian Host and Client (Wheezy Mesa 8.0.5-SW and Jessie Mesa 9.2.2-SW)

4 years agoBug 961: Fix commit fdd60adb1d421f2018b47ee17e9079c94b54910f (memmove byte-count)
Sven Gothel [Tue, 11 Mar 2014 00:44:31 +0000 (01:44 +0100)]
Bug 961: Fix commit fdd60adb1d421f2018b47ee17e9079c94b54910f (memmove byte-count)

memmove's byte-count was just giving the element-count, missing the element-size multiplier to actually pass byte-count

4 years agoBug 961: Stabilize glXGetFBConfigAttrib(..) and glXChooseFBConfig(..) Usage Against...
Sven Gothel [Mon, 10 Mar 2014 21:14:34 +0000 (22:14 +0100)]
Bug 961: Stabilize glXGetFBConfigAttrib(..) and glXChooseFBConfig(..) Usage Against OpenGL Bugs ; Fix glXGetFBConfigs

- glXChooseFBConfig(..)
  - Remove NULL FBConfig pointer from result in native code,
    which has been observed in Mesa 8.0.5-4 libgl1-mesa-swx11 (Debian-7).

- glXGetFBConfigs
  - Add manual implementation similar to glXChooseFBConfig

- glXGetFBConfigAttrib(..)
  - glXGetFBConfig(..)
     - Returns boolean reflecting success, don't throw exception - caller handles error
     - Caller ignore failure if not essential (i.e. already chosen config)

4 years agoTest script: Add TestGLReadBuffer01GLCanvasAWT
Sven Gothel [Fri, 7 Mar 2014 16:29:13 +0000 (17:29 +0100)]
Test script: Add TestGLReadBuffer01GLCanvasAWT

4 years agoBug 975: Add TestGLReadBuffer01GLCanvasAWT Unit Test (AWT Frame w/ GLCanvas)
Sven Gothel [Fri, 7 Mar 2014 16:28:48 +0000 (17:28 +0100)]
Bug 975: Add TestGLReadBuffer01GLCanvasAWT Unit Test (AWT Frame w/ GLCanvas)

4 years agoRefine commit 9fb1e46e43900ec9b2f9c9af1fc8984e101c8811: Avoid loading [j]awt native...
Sven Gothel [Fri, 28 Feb 2014 08:13:19 +0000 (09:13 +0100)]
Refine commit 9fb1e46e43900ec9b2f9c9af1fc8984e101c8811: Avoid loading [j]awt native libs and null-cursor creation in headless mode

Commit 9fb1e46e43900ec9b2f9c9af1fc8984e101c8811 exposed sideffects,
i.e. could not be loaded in JAWTUtil's static-init while in headless mode.

JAWTUtil's static init block was triggered from AWTMisc debug flag changes.

Fix drops operations in headless mode:
  - JAWTUtil
    - awt native lib loading
    - querying headfull features (locking, java2d ..)

  - AWTMisc
    - creating null cursor

4 years agoBug 984 - Fix GLBufferObjectTracker.mapBuffer(..)'s mapBufferImpl(..) parameters...
Sven Gothel [Wed, 26 Feb 2014 15:54:21 +0000 (16:54 +0100)]
Bug 984 - Fix GLBufferObjectTracker.mapBuffer(..)'s mapBufferImpl(..) parameters for mapBufferRange(..) and mapNamedBufferRange(..)

GLBufferObjectTracker.mapBuffer(..) variant for mapBufferRange(..) and mapNamedBufferRange(..)
used wrong parameters in it's mapBufferImpl(..) call.

Fixed and added mapBufferRange(..) test in TestMapBufferRead01NEWT

4 years agoAWTMisc.static: Allow static creation of 'null' AWT cursor to fail (i.e. AWT headless)
Sven Gothel [Wed, 26 Feb 2014 14:53:41 +0000 (15:53 +0100)]
AWTMisc.static: Allow static creation of 'null' AWT cursor to fail (i.e. AWT headless)

4 years agoFix whitespaces of commit 78fcb8228d4a391054501aef16eb0462322ba39d and WindowImpl...
Sven Gothel [Tue, 25 Feb 2014 16:16:47 +0000 (17:16 +0100)]
Fix whitespaces of commit 78fcb8228d4a391054501aef16eb0462322ba39d and WindowImpl comment

4 years agoMerge remote-tracking branch 'xranby/master'
Sven Gothel [Tue, 25 Feb 2014 16:08:10 +0000 (17:08 +0100)]
Merge remote-tracking branch 'xranby/master'

4 years agoMerge remote-tracking branch 'petros-koutsolampros/master'
Sven Gothel [Tue, 25 Feb 2014 16:08:02 +0000 (17:08 +0100)]
Merge remote-tracking branch 'petros-koutsolampros/master'

4 years agoBug 937 : Fix regression of commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 (which...
Sven Gothel [Tue, 25 Feb 2014 15:53:10 +0000 (16:53 +0100)]
Bug 937 : Fix regression of commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 (which disables print if !isShowing())

Commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651
uses 'isShowing' state to determine whether to display or not.

It also uses 'isShowing' instead of 'isVisible' for printing,
which is a regression, since not showing elements offscreen shall be able to be printed.

4 years agoBug 927: Try fix deadlock.
Xerxes Rånby [Tue, 25 Feb 2014 13:36:22 +0000 (14:36 +0100)]
Bug 927: Try fix deadlock.

(14:15:13) sgothel: @Xerxes: In doResume .. do a 'while( !isActive && !shallPause && isRunning ) {'
(14:15:52) sgothel: doPause: while( isActive && !shallPause && isRunning )
(14:31:55) sgothel: doPause only: while( isActive && isRunning ) {

4 years agoA more wholesome solution to the windowing problems in OSX. As described
Petros Koutsolampros [Mon, 24 Feb 2014 16:37:01 +0000 (16:37 +0000)]
A more wholesome solution to the windowing problems in OSX. As described
in bug

4 years agoBug 927 - Multithreading (MT) - GLMediaPlayer.GLMediaEventListener: Remind that comma...
Sven Gothel [Sat, 22 Feb 2014 07:05:42 +0000 (08:05 +0100)]
Bug 927 - Multithreading (MT) - GLMediaPlayer.GLMediaEventListener: Remind that commands shall be off-loaded on another thread!

4 years agoALAudioSink: Add thread-name to exceptions; stopImpl shall not throw an exception...
Sven Gothel [Sat, 22 Feb 2014 07:04:45 +0000 (08:04 +0100)]
ALAudioSink: Add thread-name to exceptions; stopImpl shall not throw an exception at destroy

4 years agoBug 927 - Multithreading (MT) issues ALAudioSink
Sven Gothel [Sat, 22 Feb 2014 06:53:29 +0000 (07:53 +0100)]
Bug 927 - Multithreading (MT) issues ALAudioSink

Add global synchronization around ALAudioSink constructor code,
which 'magically' solves the openal-soft multithreading issues ..

This is a workaround.

4 years agoBug 927 - Multithreading (MT) issues libav/ffmpeg
Sven Gothel [Sat, 22 Feb 2014 06:48:03 +0000 (07:48 +0100)]
Bug 927 - Multithreading (MT) issues libav/ffmpeg

FFMPEG Natives:

  - Move 'mutex_avcodec_openclose' to local static and initialize at initSymbols0

  - setStream0:
    - Add another locked mutex block around:
       - [ sp_avformat_open_input .. sp_avformat_find_stream_info ]

  This solves the issue of:

    [NULL @ 0x89d20c60] insufficient thread locking around avcodec_open/close()

4 years agoMerge remote-tracking branch 'xranby/master'
Sven Gothel [Fri, 21 Feb 2014 14:02:41 +0000 (15:02 +0100)]
Merge remote-tracking branch 'xranby/master'

4 years agoMatch Bitstream changes of gluegen commit 4447232af0d95a4348d09d4ed03fbef48394ca3a
Sven Gothel [Fri, 21 Feb 2014 11:30:03 +0000 (12:30 +0100)]
Match Bitstream changes of gluegen commit 4447232af0d95a4348d09d4ed03fbef48394ca3a

4 years agoBug 927: demos/es2/av/CrossFadePlayer
Xerxes Rånby [Thu, 20 Feb 2014 23:46:47 +0000 (00:46 +0100)]
Bug 927: demos/es2/av/CrossFadePlayer
Parallel media player that demonstrate CrossFade of audio volume during playback.
This player also demonstrate audio only playback of the GLMediaPlayer.

The CrossFadePlayer is a reproducer for
FFMPEGMediaPlayer libav multithreading initialization errors.
[NULL @ 0x7ff904065280] insufficient thread locking around avcodec_open/close()

java -cp gluegen/build/gluegen-rt.jar:jogl/build/jar/jogl-all-mobile.jar:jogl/build/jar/jogl-test.jar:joal/build/jar/joal.jar com.jogamp.opengl.test.junit.jogl.demos.es2.av.CrossFadePlayer *.mp3

Signed-off-by: Xerxes Rånby <>
4 years agoCleanup imports TestGLReadBuffer01GL*
Sven Gothel [Thu, 20 Feb 2014 16:48:21 +0000 (17:48 +0100)]
Cleanup imports TestGLReadBuffer01GL*

4 years agoBug 980: Use Bitsream class for JPEGDecoder
Sven Gothel [Thu, 20 Feb 2014 16:47:41 +0000 (17:47 +0100)]
Bug 980: Use Bitsream class for JPEGDecoder

4 years agoGLContextImpl/GLDrawableImpl.getDefaultReadBuffer(..): Pass hint whether dedicated...
Sven Gothel [Tue, 18 Feb 2014 20:49:37 +0000 (21:49 +0100)]
GLContextImpl/GLDrawableImpl.getDefaultReadBuffer(..): Pass hint whether dedicated read-drawable is being used (double buffering)

4 years agoBug 975 - GLJPanel's OffscreenDrawable shall not double swap - Fix auto-swap mechanis...
Sven Gothel [Tue, 18 Feb 2014 20:47:06 +0000 (21:47 +0100)]
Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Fix auto-swap mechanism ; Refined API doc getDefaultReadBuffer() ; Add GLDrawableUtil.swapBuffersBeforeRead(..)

Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 which introduces the default swap-buffers
mechanism is erroneous:

The OffscreenBack backend requires the following operation order:

  [1] - GL display
  [2] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable)
  [3] - readPixels


Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 however introduced:

  [a] - GL display
  [b] - readPixels
  [c] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable)

since [a] and [b] happened in Updater's display method, and [c] followed the same
triggered by GLAutoDrawableHelper.


The proof, commit d46d9ad8f998a7128d9f023294d5f489673d6d8a, is faulty,
since it always included the 'snapshot' GL event listener
which turned-off auto-swap and swapped before read-pixels.
TL;DR it enforced proper Order-1.


This fix allows the Backend to intercept disable GLDrawableHelper's setAutoSwapBufferMode(..)
and perform the auto-swap mode itself in the proper Order-1.

The unit test has been refined to optionally disable the snapshot
to validate auto-swap mode.


Refined GLBase and GLContext's API doc for 'getDefaultReadBuffer()'


Add GLDrawableUtil.swapBuffersBeforeRead(..)
and reuse it for TileRendererBase (original impl.).

4 years agoBug 975 - GLJPanel's OffscreenDrawable shall not double swap - Refine unit test for...
Sven Gothel [Tue, 18 Feb 2014 18:12:46 +0000 (19:12 +0100)]
Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Refine unit test for visual validation of 'no frame lag'

To validate whether a 'display' command w/o animator results to the desired frame
we introduce a 'userCounter' in TextRendererGLEL.

The latter gets increased and maybe visually validated by a key-press -> display.

Results: In all modes, MSAA or !MSAA, or flip - the result is valid.

Tested on windows and linux.

4 years agoBug 927: Fix minor MT issues w/ libav/ffmpeg
Sven Gothel [Sun, 16 Feb 2014 05:12:45 +0000 (06:12 +0100)]
Bug 927: Fix minor MT issues w/ libav/ffmpeg

  [NULL @ 0x35bde60] insufficient thread locking around avcodec_open/close()

Decorating said libav functions w/ mutex lock/release.

Abstract impl. to either use pthread or JNI Monitor,
but using the latter to reduce dependencies (ming64 windows).

FFMPEGNatives is now an abstract class containing the
  'static final Object mutex_avcodec_openclose'

4 years agoAdd make/scripts/
Sven Gothel [Sat, 15 Feb 2014 22:36:19 +0000 (23:36 +0100)]
Add make/scripts/

4 years agodoc/HowToBuild.html: Remove duplicate line
Sven Gothel [Sat, 15 Feb 2014 22:33:47 +0000 (23:33 +0100)]
doc/HowToBuild.html: Remove duplicate line

4 years agoMovie* Demo: Utilize TextRendererGLELBase (fps, vsync, ..)
Sven Gothel [Sat, 15 Feb 2014 22:33:26 +0000 (23:33 +0100)]
Movie* Demo: Utilize TextRendererGLELBase (fps, vsync, ..)

4 years agoExtract TextRendererGLELBase (demo) - Utilize general text rendering for demos.
Sven Gothel [Sat, 15 Feb 2014 22:32:27 +0000 (23:32 +0100)]
Extract TextRendererGLELBase (demo) - Utilize general text rendering for demos.

4 years agoGraph: RendereState: Create own PMVMatrix if passed value is null; Renderer: Add...
Sven Gothel [Sat, 15 Feb 2014 22:28:25 +0000 (23:28 +0100)]
Graph: RendereState: Create own PMVMatrix if passed value is null; Renderer: Add reshapeNotify(..) for NOP PMV reshape notification

4 years agodoc/HowToBuild.html: Complete Debian package list, add note on multiarch packages
Sven Gothel [Sat, 15 Feb 2014 08:17:43 +0000 (09:17 +0100)]
doc/HowToBuild.html: Complete Debian package list, add note on multiarch packages

4 years agoBug 927 - Multithreading (MT) issues with ALAudioSink (openal-soft)
Sven Gothel [Sat, 15 Feb 2014 08:12:30 +0000 (09:12 +0100)]
Bug 927 - Multithreading (MT) issues with ALAudioSink (openal-soft)

- Using update openal-soft (commit 7297c3214a4c648aaee81a9877da15b88f798197)

- Analyzed openal-soft threading issues:
  - a global-lock would have removed the issue

  - turns out that using ALC_EXT_thread_local_context's alcSetThreadContext(..)
    instead of alcMakeContextCurrent(..) solves the issue

- Cleaned up al*GetError() queries and handling

- Simplified flush/dequeue buffers

4 years agoBug 975 - GLJPanel's OffscreenDrawable shall not double swap - Use default auto-swap...
Sven Gothel [Fri, 14 Feb 2014 05:37:13 +0000 (06:37 +0100)]
Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Use default auto-swap mechanims

Refines commit 908ebd99d1eb57ce773a1fdd67c76886da86b9e6

Note that the test case decide whether to auto-swap (after read-pixels)
or not auto-swap (manual swap before read-pixels).

See UITestCase.swapBuffersBeforeRead(GLCapabilitiesImmutable chosenCaps):
   Determines whether the chosen GLCapabilitiesImmutable requires a swap-buffers before reading pixels.

   Usually one uses the default-read-buffer, i.e. GL.GL_FRONT for single-buffer
   and GL.GL_BACK for double-buffer GLDrawables
   and GL.GL_COLOR_ATTACHMENT0 for offscreen framebuffer objects.
   Here swap-buffers shall happen after calling reading pixels, the default.

   However, multisampling offscreen GLFBODrawables utilize swap-buffers to downsample
   the multisamples into the readable sampling sink.
   In this case, we require a swap-buffers before reading pixels.

   Returns:  chosenCaps.isFBO() && chosenCaps.getSampleBuffers()


- GLJPanel:
  - Remove SurfaceUpdatedListener mechanism in favor of
    default auto-swap-buffer via GLDrawableHelper.
    This removes complexity.

  - postGL does not need to perform explicit swapBuffer operation,
    but rely on GLDrawableHelper and the default mechanism.
    This is also compatible w/ J2D backend.

  - Use GLDrawableHelper for setAutoSwapBufferMode(..) and getAutoSwapBufferMode()



- UITestCase:
  - Add 'boolean swapBuffersBeforeRead(GLCapabilitiesImmutable chosenCaps)'
    to determine whether swapBuffers() must occure before read-pixels. See above.

- GLReadBuffer00Base*
  - remove explicit addSnapshotGLEL/removeSnapshotGLEL

  - add TextRendererGLEL, to display frame-count and -dimension

  - SnapshotGLEL*
    - simply toggle auto-swap in their init(..) and dispose(..) method!

    - clear back-buffer if 'swapBuffersBeforeRead'
      to test whether the right buffer is being used for read-pixels.

4 years agoGLReadBufferUtil: Set PACK_ROW_LENGTH for ES3 as well - also set ReadBuffer to default.
Sven Gothel [Fri, 14 Feb 2014 05:19:35 +0000 (06:19 +0100)]
GLReadBufferUtil: Set PACK_ROW_LENGTH for ES3 as well - also set ReadBuffer to default.

4 years agoGLPixelStorageModes: Safe and restore GL2ES3 modes, i.e. add missing GLES3 modes...
Sven Gothel [Fri, 14 Feb 2014 05:18:27 +0000 (06:18 +0100)]
GLPixelStorageModes: Safe and restore GL2ES3 modes, i.e. add missing GLES3 modes. GLStateTracker: Use proper GL names for enums

4 years agoBug 975 - GLJPanel's OffscreenDrawable shall not double swap (custom swap by GLEventL...
Sven Gothel [Thu, 13 Feb 2014 20:32:36 +0000 (21:32 +0100)]
Bug 975 - GLJPanel's OffscreenDrawable shall not double swap (custom swap by GLEventListener using [AWT]GLReadBufferUtil)

When utilizing [AWT]GLReadBufferUtil it is usually desired to read from the front-buffer
instead the back-buffer. The latter may not be defined, e.g. when using MSAA.

A GLEventListener utilizing [AWT]GLReadBufferUtil,
must perform the drawable.swapBuffers() to be able to read from the front-buffer.

Usually GLAutoDrawable.setAutoSwapBuffer(false) should be called here,
to avoid a double swap - however GLJPanel does not support toggling auto-swap
since it requires to control swap for it's own read-pixels.

Remedy for GLJPanel:
  - GLJPanel issues helper.setAutoSwapBufferMode(false) - immutable

  - Enable GLJPanel.swapBuffer() if initializes
    This was previously disabled.

  - GLJPanel's OffscreenBackend listens to  surfaceUpdated,
    to be notified whether postGL needs to swap buffer
    or the drawable.swapBuffer() was already called between preGL and postGL.

See unit tests adding/removing a snapshot GLEventListener
performing swapBuffers() and setting auto-swap accordingly.

4 years agoSurfaceUpdatedListener: Order methods in impl. Class; SurfaceUpdatedListener: Mark...
Sven Gothel [Thu, 13 Feb 2014 17:12:27 +0000 (18:12 +0100)]
SurfaceUpdatedListener: Order methods in impl. Class; SurfaceUpdatedListener: Mark methods final, use volatile 'isEmpty' to bail out early @ surfaceUpdated.

4 years agoBug 974 - Add missing [GL4] glMultiDrawArraysIndirect(int mode, int type, long indire...
Sven Gothel [Thu, 13 Feb 2014 02:33:03 +0000 (03:33 +0100)]
Bug 974 - Add missing [GL4] glMultiDrawArraysIndirect(int mode, int type, long indirect_offset, int drawcount, int stride)

4 years agoTextureIO: Fix PNGTextureWriter Vertical-Flip, i.e. pass TextureData's getMustFlipVer...
Sven Gothel [Thu, 13 Feb 2014 00:06:31 +0000 (01:06 +0100)]
TextureIO: Fix PNGTextureWriter Vertical-Flip, i.e. pass TextureData's getMustFlipVertically() to PNGPixelRect

4 years agoBug 962 - AWTGLReadBufferUtil should use aligned BufferedImage [for resized images...
Sven Gothel [Thu, 13 Feb 2014 00:04:47 +0000 (01:04 +0100)]
Bug 962 - AWTGLReadBufferUtil should use aligned BufferedImage [for resized images]; Fix GLReadBufferUtil GL_PACK_ROW_LENGTH

AWTGLPixelBuffer is being reused when used via AWTGLPixelBufferProvider
even when resized.

AWTGLPixelBufferProvider uses  GLPixelBufferProvider's requiresNewBuffer(..)
which returns true if
  - allowRowStride==true and pixel-buffer size < required-size, or
  - allowRowStride==false and pixel-buffer size < required _or_ width doesn't match

otherwise it returns true, i.e. the AWTGLPixelBuffer is reused.

Hence the used BufferedImage might need to be aligned,
i.e. using AWTGLPixelBuffer's getAlignedImage(..).


GLReadBufferUtil shall use current texture-data width for GL_PACK_ROW_LENGTH,
not the static GLPixelBuffer's width, which may not reflect image dimension (resize)


4 years agoTextureIO: Support PNGTextureWriter w/ TextureData IntBuffer (via PNGPixelRect and...
Sven Gothel [Wed, 12 Feb 2014 23:17:09 +0000 (00:17 +0100)]
TextureIO: Support PNGTextureWriter w/ TextureData IntBuffer (via PNGPixelRect and PixelFormatUtil)

TextureData IntBuffer could be caused by AWT read-pixels
but is not seamlessly supported via PNGPixelRect since the latter
uses a hardcoded ByteBuffer.

Add static PNGPixelRect.write(..) supporting IntBuffer
to support this case for now.
PNGPixelRect instances do not support any Buffer type to avoid
a bloated implementation.

PixelFormatUtil adds support for int32 pixel format conversion.

4 years agoBug 973: NativeWindowFactory: Needs service provider interface (SPI) for TK specific...
Sven Gothel [Wed, 12 Feb 2014 01:55:14 +0000 (02:55 +0100)]
Bug 973: NativeWindowFactory: Needs service provider interface (SPI) for TK specific implementations (Scaling)

4 years agoBug 973: NativeWindowFactory: Needs service provider interface (SPI) for TK specific...
Sven Gothel [Wed, 12 Feb 2014 01:54:50 +0000 (02:54 +0100)]
Bug 973: NativeWindowFactory: Needs service provider interface (SPI) for TK specific implementations (Scaling)

Add FIXME note ..

4 years agoBug 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..): GLProfile, GLContextImpl...
Sven Gothel [Wed, 12 Feb 2014 01:48:08 +0000 (02:48 +0100)]
Bug 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..): GLProfile, GLContextImpl, DisplayImpl

GLProfile, GLContextImpl:
  - ReflectionUtil.DEBUG_STATS_FORNAME: Dump forName stats if set
  - Cache GL*Impl and GL*ProcAddressTable Constructor<?> for GLContextImpl's createInstance(..)
  - Remove off-thread early classloading thread which only adds complications

  - Remove one redundant availability test

4 years agoBug 970: NEWT OSX ChildWindow setVisible(..) does not hide child window appropriately
Sven Gothel [Mon, 10 Feb 2014 17:46:28 +0000 (18:46 +0100)]
Bug 970: NEWT OSX ChildWindow setVisible(..) does not hide child window appropriately

Instead of using [mWin orderBack: mWin] for child windows,
utilize [mWin orderWindow: NSWindowOut relativeTo: [pWin windowNumber]]

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 git info: FAQ, tutorial and man pages.