Jogamp
jogl.git
2 years agoBump scripts to jre1.8.0_66 master pulled rc
Sven Gothel [Mon, 16 Nov 2015 02:09:36 +0000 (03:09 +0100)]
Bump scripts to jre1.8.0_66

2 years agoX11Util.openDisplay: DEBUG: Show reusable and pending display count
Sven Gothel [Sun, 15 Nov 2015 04:18:42 +0000 (05:18 +0100)]
X11Util.openDisplay: DEBUG: Show reusable and pending display count

2 years agoBug 1270 - Fix OSX El Capitan 10.11 stuttering: ALAudioSink: DEBUG: Show OpenAL Version
Sven Gothel [Sun, 15 Nov 2015 04:18:01 +0000 (05:18 +0100)]
Bug 1270 - Fix OSX El Capitan 10.11 stuttering: ALAudioSink: DEBUG: Show OpenAL Version

2 years agoBug 1268: Adapt to GlueGen commit 2034bbfac88b7d1360f9c939e173ff758f7f47ac
Sven Gothel [Sun, 15 Nov 2015 04:03:32 +0000 (05:03 +0100)]
Bug 1268: Adapt to GlueGen commit 2034bbfac88b7d1360f9c939e173ff758f7f47ac

2 years agoBug 1267 - OSX El Capitan: Animated NEWT GLWindow flickers at resize
Sven Gothel [Sun, 15 Nov 2015 03:34:51 +0000 (04:34 +0100)]
Bug 1267 - OSX El Capitan: Animated NEWT GLWindow flickers at resize

OSX El Capitan 10.11.1 using JRE 1.8.0_66:

Animated NEWT GLWindow flickers at resize.

While at live resize the animation thread renders
into the live resized NSView which causes flickering on OSX 10.11.

Resolution is to pause animation during live resize
and resume at its end.

2 years agoRemove deprectated classes and methods
Sven Gothel [Thu, 15 Oct 2015 12:04:21 +0000 (14:04 +0200)]
Remove deprectated classes and methods

2 years agoCleanup IgnoreExtension for GL3 and GL4 exclusive extensions
Sven Gothel [Mon, 12 Oct 2015 07:07:33 +0000 (09:07 +0200)]
Cleanup IgnoreExtension for GL3 and GL4 exclusive extensions

2 years agoTestGearsES2NEWT: Adding programmatic Debug|Trace pipeline
Sven Gothel [Mon, 12 Oct 2015 06:25:22 +0000 (08:25 +0200)]
TestGearsES2NEWT: Adding programmatic Debug|Trace pipeline

2 years agoStreamline Composed Pipeline's interfaces and implementations (Trace* Debug*)
Sven Gothel [Mon, 12 Oct 2015 06:13:43 +0000 (08:13 +0200)]
Streamline Composed Pipeline's interfaces and implementations (Trace* Debug*)

Only add the required direct interfaces / implementations
to interface / class derivations, not polluting overview in IDEs.

Aligns w/ commit bf76b6b77f078178fc5e6a42c70d354369004b94

2 years agoStreamline GL* profile interfaces and implementations
Sven Gothel [Mon, 12 Oct 2015 06:11:28 +0000 (08:11 +0200)]
Streamline GL* profile interfaces and implementations

Only add the required direct interfaces / implementations
to interface / class derivations, not polluting overview in IDEs.

2 years agoDrop Vendor Extensions: INGR and PGI for all profiles
Sven Gothel [Mon, 12 Oct 2015 06:09:54 +0000 (08:09 +0200)]
Drop Vendor Extensions: INGR and PGI for all profiles

2 years agoVersion Semantics Test: Bump for 2.3.2 -> 2.4.x
Sven Gothel [Mon, 12 Oct 2015 06:09:02 +0000 (08:09 +0200)]
Version Semantics Test: Bump for 2.3.2 -> 2.4.x

2 years agoWindowImpl.quirks: Access default -> protected, also fix API doc comment. v2.3.2
Sven Gothel [Sat, 10 Oct 2015 01:08:14 +0000 (03:08 +0200)]
WindowImpl.quirks: Access default -> protected, also fix API doc comment.

2 years agoBug 1249: NEWT/X11 Visibility: Listening to more events for updated state; Adding...
Sven Gothel [Fri, 9 Oct 2015 23:47:07 +0000 (01:47 +0200)]
Bug 1249: NEWT/X11 Visibility: Listening to more events for updated state; Adding QUIRK_BIT_VISIBILITY

1) More visibility detection on post ConfigureNotify events,
since the latter may not yet contain the updated visibility state
as it whould (WM bug!):
  - EnterNotify
  - LeaveNotify
  - Disabled
    - Expose
    - VisibilityNotify

2) Introducing quirks.
   Setting QUIRK_BIT_VISIBILITY to handle the issue where
   visibility -> false could not even be set.

2 years agoBug 1247 - TestGearsNewtAWTWrapper fails AWT recreation case removeNotify -> addNotif...
Sven Gothel [Fri, 9 Oct 2015 04:14:00 +0000 (06:14 +0200)]
Bug 1247 - TestGearsNewtAWTWrapper fails AWT recreation case removeNotify -> addNotify, e.g. by moving to other monitor

AWTCanvas removeNotify didn't cause 'local' destruction of the NEWT window,
allowing a 'recreate' w/ subsequent addNotify.

This case has been hacked-into NEWT.AWT.WindowDriver + AWTCanvas:
  - suppression of window destroy events
  - keeping fields/states intact in NEWT.AWT.WindowDriver
  - propagating signals appropriately

Note: This is barely a working hack and not a fine piece of software :)

This AWT backend driver exists only due to historical reasons.

This hack simply proves that JAWTWindow works properly.

2 years agoBug 1247: JAWTWindow fail early w/ useful info: setAWTGraphicsConfiguration(..) if...
Sven Gothel [Fri, 9 Oct 2015 04:08:06 +0000 (06:08 +0200)]
Bug 1247: JAWTWindow fail early w/ useful info: setAWTGraphicsConfiguration(..) if awtConfig is null, getGraphicsConfiguration() if awtConfig is null

2 years agoBug 1247: Enhance JAWTWindow DEBUG output (not fixing any issues)
Sven Gothel [Fri, 9 Oct 2015 04:06:20 +0000 (06:06 +0200)]
Bug 1247: Enhance JAWTWindow DEBUG output (not fixing any issues)

2 years agoBug 1247: Align NEWT AWT driver w/ GLCanvas (not fixing any issues)
Sven Gothel [Fri, 9 Oct 2015 04:04:18 +0000 (06:04 +0200)]
Bug 1247: Align NEWT AWT driver w/ GLCanvas (not fixing any issues)

2 years agoBug 1249 - NEWT X11: setVisible(false) IconicState/_NET_WM_STATE_HIDDEN: Handle case...
Sven Gothel [Fri, 9 Oct 2015 00:24:05 +0000 (02:24 +0200)]
Bug 1249 - NEWT X11: setVisible(false) IconicState/_NET_WM_STATE_HIDDEN: Handle case where KDE unmaps the window

Update our internal JavaWindow.isMapped according to MapNotify and UnmapNotify.
This takes care of a situation (KDE) where a window is unmapped
during IconicState.

For unmapped windows we cannot interprete _NET_WM_STATE_HIDDEN
and we have to issue XMapWindow for restoring the window.

2 years agoBug 1249: Revert TestParenting01NEWT durationPerTest back to 600 (otherwise breaks...
Sven Gothel [Fri, 9 Oct 2015 00:03:27 +0000 (02:03 +0200)]
Bug 1249: Revert TestParenting01NEWT durationPerTest back to 600 (otherwise breaks test)

2 years agoBug 1249 - NEWT X11: setVisible(*) _NET_WM_STATE_HIDDEN update not received at Config...
Sven Gothel [Thu, 8 Oct 2015 23:54:32 +0000 (01:54 +0200)]
Bug 1249 - NEWT X11: setVisible(*) _NET_WM_STATE_HIDDEN update not received at ConfigureNotify event (2)

On gnome shell WM, sometimes KDE WM,
it has been observed that the _NET_WM_STATE_HIDDEN update (visible or invisible)
is not received at ConfigureNotify event.

Turns out the state is finally updated at FocusOut!

This change tests _NET_WM_STATE_HIDDEN visibility hint
for mapped window also for FocusIn and FocusOut events,
besides the ConfigureNotify event.

Further more, NormalState to restore a hidden but mapped
window did not work, so it is no more being sent.
We limit us here to _NET_ACTIVE_WINDOW.

2 unit tests are prepared to test this issue:
  - TestGLWindows00NEWT
  - TestParenting01NEWT

2 years agoBug 1249 - NEWT X11: setVisible(false) IconicState not listening to _NET_WM_STATE_HID...
Sven Gothel [Thu, 8 Oct 2015 18:13:12 +0000 (20:13 +0200)]
Bug 1249 - NEWT X11: setVisible(false) IconicState not listening to _NET_WM_STATE_HIDDEN; setVisible(true) not restoring from _NET_WM_STATE_HIDDEN

Using Gnome Shell 3.14.4-1~deb8u1 disclosed an issue w/ our newly utilized IconicState/_NET_WM_STATE_HIDDEN,
i.e. visibleChanged(false) was never received.

This is a regression of commit 2d837a7a7130702ad36b694875613fae77c7ef06,
which utilizes WM_CHANGE_STATE_IDX + IconicState for visibility
on top-level windows.

This bug consist out of _two_ isssue:

1) setVisible(false) IconicState not listening to _NET_WM_STATE_HIDDEN
  Here, we 'listen' to _NET_WM_STATE_HIDDEN when receiving ConfigureNotify
  if supported _and_ XMapWindow has been issued.
  In such case existence/non-existence of _NET_WM_STATE_HIDDEN determines visibility.
  Otherwise, we have wait for MapNotify/UnmapNotify.

  The 'XMapWindow has been issued' criteria is tracked by new field 'JavaWindow.isMapped'
  and set/cleared when we actually issue XMapWindow/XUnmapWindow!

2) setVisible(true) not restoring from _NET_WM_STATE_HIDDEN
  It has been observed that restoring IconicState/_NET_WM_STATE_HIDDEN
  via XMapWindow or even NormalState may not work reliably on WMs.
  See <https://stackoverflow.com/questions/30192347/how-to-restore-a-window-with-xlib>

  Hence we restore from this WM state via NormalState _and_ _NET_ACTIVE_WINDOW.

Both strategies seem to work well on KDE as well as on Gnome.

2 years agoBug 1189: Fix gcc redefinition error, even thought typedef equals - on OpenIndiana...
Sven Gothel [Wed, 7 Oct 2015 22:20:25 +0000 (00:20 +0200)]
Bug 1189: Fix gcc redefinition error, even thought typedef equals - on OpenIndiana w/ old'ish gcc

2 years agoBug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part5: GL_ARB_ES3_2_...
Sven Gothel [Wed, 7 Oct 2015 09:54:31 +0000 (11:54 +0200)]
Bug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part5: GL_ARB_ES3_2_compatibility -> [GL|GLContext].isGLES32Compatible()

2 years agoBug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part4: Fix GLNameRes...
Sven Gothel [Wed, 7 Oct 2015 09:15:03 +0000 (11:15 +0200)]
Bug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part4: Fix GLNameResolver: Add all known vendor extensions

2 years agoBug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part3: GLEmitter...
Sven Gothel [Wed, 7 Oct 2015 09:14:15 +0000 (11:14 +0200)]
Bug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part3: GLEmitter: Don't RenameExtensionIntoCore for IgnoredExtensions

2 years agoBug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part2: Update gluege...
Sven Gothel [Wed, 7 Oct 2015 09:13:01 +0000 (11:13 +0200)]
Bug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part2: Update gluegen configs

+#
+# Ignored new extensions added in gl2ext.h 2015-10-06
+# see jogl/make/scripts/diff-gl2ext.sh
+# FIXME: Refine for 2.4.0
+#
+IgnoreExtension GL_KHR_no_error
+IgnoreExtension GL_EXT_YUV_target
+IgnoreExtension GL_EXT_blend_func_extended
+IgnoreExtension GL_EXT_buffer_storage
+IgnoreExtension GL_EXT_color_buffer_float
+IgnoreExtension GL_EXT_float_blend
+IgnoreExtension GL_EXT_multisampled_compatibility
+IgnoreExtension GL_EXT_post_depth_coverage
+IgnoreExtension GL_EXT_raster_multisample
+IgnoreExtension GL_EXT_sparse_texture
+IgnoreExtension GL_EXT_texture_filter_minmax
+IgnoreExtension GL_EXT_texture_sRGB_R8
+IgnoreExtension GL_EXT_texture_sRGB_RG8
+IgnoreExtension GL_OVR_multiview
+IgnoreExtension GL_OVR_multiview2

2 years agoBug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part1b: Update Khron...
Sven Gothel [Wed, 7 Oct 2015 09:11:32 +0000 (11:11 +0200)]
Bug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part1b: Update Khronos Headers eglext.h (missed)

2 years agoBug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part1: Update Khrono...
Sven Gothel [Wed, 7 Oct 2015 09:09:32 +0000 (11:09 +0200)]
Bug 1189 - Add OpenGL ES 3.2 and new GL 4.5 Extensions support - Part1: Update Khronos Headers

2 years agoBug 1239: Fix comment in c-code 'how to set preferred pixel_format'
Sven Gothel [Mon, 5 Oct 2015 12:24:40 +0000 (14:24 +0200)]
Bug 1239: Fix comment in c-code 'how to set preferred pixel_format'

2 years agoBug 1239: Support OSX input via 'avfoundation' ; Use remaining camera ID (index)...
Sven Gothel [Mon, 5 Oct 2015 11:51:51 +0000 (13:51 +0200)]
Bug 1239: Support OSX input via 'avfoundation' ; Use remaining camera ID (index) as filename for OSX

2 years agoBug 1239: Update FFMPEGMediaPlayer API doc (versions and OSX resources)
Sven Gothel [Mon, 5 Oct 2015 11:50:33 +0000 (13:50 +0200)]
Bug 1239: Update FFMPEGMediaPlayer API doc (versions and OSX resources)

2 years agoBug 1239: Add support for UYVY422 (swizzled YUYV422)
Sven Gothel [Mon, 5 Oct 2015 11:49:40 +0000 (13:49 +0200)]
Bug 1239: Add support for UYVY422 (swizzled YUYV422)

2 years agoBug 1239: Fix GLMediaPlayer.CameraInputScheme API doc; GLMediaPlayerImpl.updateAttrib...
Sven Gothel [Mon, 5 Oct 2015 11:48:18 +0000 (13:48 +0200)]
Bug 1239: Fix GLMediaPlayer.CameraInputScheme API doc; GLMediaPlayerImpl.updateAttributes avoid div-by-zero (fps inf)

2 years agoBug 1223: Add '-traceMouse' commandline argument to check whether mouse events are...
Sven Gothel [Mon, 5 Oct 2015 07:06:39 +0000 (09:06 +0200)]
Bug 1223: Add '-traceMouse' commandline argument to check whether mouse events are still received after manual maximize

2 years agoMerge remote-tracking branch 'xranby/junit'
Sven Gothel [Mon, 5 Oct 2015 06:28:18 +0000 (08:28 +0200)]
Merge remote-tracking branch 'xranby/junit'

2 years agoBug 1206 - Security: Clear exposed framebuffer after creation and before visibility
Sven Gothel [Mon, 5 Oct 2015 06:24:43 +0000 (08:24 +0200)]
Bug 1206 - Security: Clear exposed framebuffer after creation and before visibility

Experimenting w/ no GLEventListener attached to an GLAutoDrawable,
e.g. GLWindow (onscreen), GLJPanel (fbo offscreen),
indeed on some GL implementations the default framebuffer is uninitialized
and hence shows garbage.

GLDrawableHelper.setViewportAndClear(..)
 - Clear framebuffer after setting viewport
 - Called from:
   - public final void init(..)
   - public final void reshape(..)

 - Method is used independent of GLEventListener,
   hence this simplifies implementation: removes 'setViewport' criteria
   for init, display, reshape: it is always performed!

Note: We only attempt to help against leaking un-initialized framebuffer content
not against user-app faults, we do not clear a 2nd-buffer (double-buffering).

Note: We may still be late at resize, i.e. small noisy flickering might be visible.
This might be due to lack of proper vsync.

2 years agoGLContextImpl: clarify surfacelessOK -> isSurfaceless
Sven Gothel [Mon, 5 Oct 2015 04:28:54 +0000 (06:28 +0200)]
GLContextImpl: clarify surfacelessOK -> isSurfaceless

2 years agoFix: junit/jogl/awt/TestBug1225EventQueueInterruptedAWT and junit/jogl/util/texture...
Xerxes Rånby [Sun, 4 Oct 2015 17:22:19 +0000 (19:22 +0200)]
Fix: junit/jogl/awt/TestBug1225EventQueueInterruptedAWT and junit/jogl/util/texture/TestTextureIONEWT
replacing import junit.framework.* with import org.junit.* fixed the "Stub!" Exception seen
when runing the junit tests from inside Eclipse

2 years agoBug 1245: Adding Unit Test, similar to TestBug816JTabbedPanelVisibilityB849B878AWT
Sven Gothel [Sat, 3 Oct 2015 23:31:55 +0000 (01:31 +0200)]
Bug 1245: Adding Unit Test, similar to TestBug816JTabbedPanelVisibilityB849B878AWT

TestBug1245JTabbedPanelCrashAWT passed as expected on
GNU/Linux, Debian8, amd64 w/:
- proprietary NV

- GL_RENDERER   = Gallium 0.4 on AMD ARUBA
  GL_VERSION    = 3.0 Mesa 10.3.2
  GL_VENDOR     = X.Org

2 years agoMerge remote-tracking branch 'xranby/master'
Sven Gothel [Sat, 3 Oct 2015 19:55:55 +0000 (21:55 +0200)]
Merge remote-tracking branch 'xranby/master'

2 years agoBug 1206: Test TestGearsES2NEWT: Versatile 'demoType' allows also no GLEventListener...
Sven Gothel [Sat, 3 Oct 2015 18:17:13 +0000 (20:17 +0200)]
Bug 1206: Test TestGearsES2NEWT: Versatile 'demoType' allows also no GLEventListener at all

2 years agoFix: com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile04NEWTOffscreenNoARBCtx
Xerxes Rånby [Sat, 3 Oct 2015 14:49:32 +0000 (16:49 +0200)]
Fix: com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile04NEWTOffscreenNoARBCtx
java.lang.AssertionError: Property 'jogl.disable.openglarbcontext' set, but created w/ ARB
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertFalse(Assert.java:64)
at com.jogamp.opengl.test.junit.jogl.acore.GLProfile0XBase.validateOnlineOffscreen(GLProfile0XBase.java:920)

2 years agoBug 1244: MovieSimple: String format %d implicit conversion from boolean to int fails...
Xerxes Rånby [Sat, 3 Oct 2015 13:40:21 +0000 (15:40 +0200)]
Bug 1244: MovieSimple: String format %d implicit conversion from boolean to int fails using OpenJDK 1.8
Replace %d with %b

2 years agoBug 1238 - Fix NPE for Window-Icon's PNGPixelRect for unresolved location; Bug 1199...
Sven Gothel [Sat, 3 Oct 2015 10:05:37 +0000 (12:05 +0200)]
Bug 1238 - Fix NPE for Window-Icon's PNGPixelRect for unresolved location; Bug 1199 - Add setting to disable default window icons

Bug 1238 - Fix NPE for Window-Icon's PNGPixelRect for unresolved location, i.e. null URLConnections

Testing w/ jogl/make/scripts/tests.sh USE_BUILDDIR=1,
discloses this issue - since the icons are available in jar only.

Handling all unresolved resources, i.e. null URLConnection,
is required.

Further more, the icon list passed via property 'newt.window.icons'
shall be separated by comma as well.
This allows passing the list via scripts more conveniently.
  -Dnewt.window.icons="newt/data/jogamp-16x16.png,newt/data/jogamp-32x32.png"

+++

Bug 1199 - Add setting to disable default window icons

This patch also allows disabling JogAmp's own window icons
by simply defining a non-existing location, i.e.
  -Dnewt.window.icons="null,null"

2 years agoBug 1237: Adopt GlueGen's clarification of IOUtil.getResource(..), commit d78bb1be0a6...
Sven Gothel [Sat, 3 Oct 2015 03:07:46 +0000 (05:07 +0200)]
Bug 1237: Adopt GlueGen's clarification of IOUtil.getResource(..), commit d78bb1be0a6290cb94918b21865a023c01825048

- Skip relative lookup for IOUtil.ClassResources using 'asset' only (from JAR file)

- Tested w/ jar file and build-dir, see scripts/tests.sh 'USE_BUILDDIR'

2 years agoBug 1241 - Util's Texture.coords (image coordinates) not updated properly
Sven Gothel [Fri, 2 Oct 2015 14:03:41 +0000 (16:03 +0200)]
Bug 1241 - Util's Texture.coords (image coordinates) not updated properly

Adding 'imageTarget', i.e. GL target for this texture or its sub-components if cubemap
The imageTarget preserves the used 2D image type
for the 2D Texture coordinates.

Note: 'Texture.updateImage(final GL gl, final TextureData data, final int targetOverride)'
needs an overhaul targeted for 2.4.0.

2 years agoBug 1205: Revert clear background to support fix for Bug 1232: NEWT Translucency...
Sven Gothel [Thu, 1 Oct 2015 21:58:43 +0000 (23:58 +0200)]
Bug 1205: Revert clear background to support fix for Bug 1232: NEWT Translucency Windows >= 8

Reverting 'clear backrgound' portion of commit f607c0148736fa198fb91b60123824e53366022e.
It has been identified, that Windows does initialize onscreen windows (i.e. w/ white/DESKTOP color).

This is also required for allowing translucent windows,
since clearing the background intefers on Windows >= 8 (undecorated windows).

2 years agoBug 1232 - NEWT Translucent Decorated Windows Not Working On Windows >= 8 (Lack of...
Sven Gothel [Thu, 1 Oct 2015 21:36:54 +0000 (23:36 +0200)]
Bug 1232 - NEWT Translucent Decorated Windows Not Working On Windows >= 8 (Lack of Aero / Blur )

Adopting new undocumented user32.dll Windows >= 8 API:
  - SetWindowCompositionAttribute / AccentState

See:
  - <https://github.com/riverar/sample-win10-aeroglass/blob/master/MainWindow.xaml.cs>
  - <http://withinrafael.com/adding-the-aero-glass-blur-to-your-windows-10-apps/>
  - <http://undoc.airesoft.co.uk/user32.dll/SetWindowCompositionAttribute.php>
  - <http://undoc.airesoft.co.uk/user32.dll/GetWindowCompositionAttribute.php>

+++

Cleaning up WindowsDWM.h, use on header file (in stub_includes)
for GlueGen and implementation.

+++

Merge java implementation within GDIUtil.DwmSetupTranslucency(..),
to be utilized by NEWT and JOGL.

NEWT issues GDIUtil.DwmSetupTranslucency(..) at creation
and when toggling decoration.

Toggling decoration on Win >= 8 leads to lost of translucency
when returning to decorated window.
On Win 7, this may work .. but is also buggy.

+++

Followup patch is needed for NEWT to _not_ clear the background!

2 years agoBug 1225: Unit test shall not fail if AWT is not alive, simply report and return...
Sven Gothel [Tue, 29 Sep 2015 16:35:56 +0000 (18:35 +0200)]
Bug 1225: Unit test shall not fail if AWT is not alive, simply report and return - assume failure is recorded

2 years agoBug 1225: Unit test timeout := 3minutes
Sven Gothel [Tue, 29 Sep 2015 16:31:16 +0000 (18:31 +0200)]
Bug 1225: Unit test timeout := 3minutes

2 years agoBug 1225: Unit test shall not fail if AWT is not alive, ignore it via assume
Sven Gothel [Tue, 29 Sep 2015 16:29:29 +0000 (18:29 +0200)]
Bug 1225: Unit test shall not fail if AWT is not alive, ignore it via assume

2 years agoBug 1205 - NEWT Security: Clear framebuffer after creation and before visibility...
Sven Gothel [Tue, 29 Sep 2015 09:25:33 +0000 (11:25 +0200)]
Bug 1205 - NEWT Security: Clear framebuffer after creation and before visibility (Windows Onscreen)

WindowsWindow.c:
  - WindowUserData.isInCreation set while window at initizalization,
    i.e. before final size/pos/visibility.

    Also no visibility until final NewtWindow_setVisiblePosSize(..) call.
    This is possible since even w/o ShowWindow upfront,
    UpdateInsets(..) is able to gather accurate values.

  - Suppress any Java callback while WindowUserData.isInCreation,
    issue one callback when window is final.
    Use newly accumulated callback WindowImpl.sizePosInsetsFocusVisibleChanged(..)

  - While WindowUserData.isInCreation, WM_PAINT triggers WM_ERASEBKGND
    and WM_ERASEBKGND actually erases background w/ window background color.

2 years agoNEWT WindowImpl.createNative(): Post creation: Only perform mod-actions if non defaul...
Sven Gothel [Tue, 29 Sep 2015 09:18:21 +0000 (11:18 +0200)]
NEWT WindowImpl.createNative(): Post creation: Only perform mod-actions if non default (performance)

2 years agoBug 1225: Make unit test more robuts, notify if JRE 1.7.0 issue w/ interrupted AWT-EDT
Sven Gothel [Mon, 28 Sep 2015 20:40:42 +0000 (22:40 +0200)]
Bug 1225: Make unit test more robuts, notify if JRE 1.7.0 issue w/ interrupted AWT-EDT

The reporter claims that an interrupt on the AWT-EDT shall not disturb neither AWT nor JOGL's GLCanvas
and rendering shall continue.

- This seems to be true for JRE 1.8.0_60
- This seems to be false for JRE 1.7.0_45. This JRE's AWT-EDT even dies occasionally when interrupted.

2 years agoBug 1234 - GLReadBufferUtil.readPixelsImpl(..) not using [xy] offset in readTexture...
Sven Gothel [Mon, 28 Sep 2015 04:53:37 +0000 (06:53 +0200)]
Bug 1234 - GLReadBufferUtil.readPixelsImpl(..) not using [xy] offset in readTexture.updateSubImage(..)

The passed inX and inY x/y offset for readPixel -> [textureData] buffer,
must be passed to readTexture.updateSubImage(..)'s destination offset.

I.e. the buffer's content starting at beginning is filled via glReadPixels
w/ offset applied.

Hence the texture update must pass the offset as the destination offset,
i.e. to be used for glTexSubImage2D's offset.

2 years agoBug 1233 - Add missing range- and pbo-bound checks on glTexture[Sub]Image[123]D*
Sven Gothel [Mon, 28 Sep 2015 04:44:37 +0000 (06:44 +0200)]
Bug 1233 - Add missing range- and pbo-bound checks on glTexture[Sub]Image[123]D*

Adding missing range- and pbo-bound checks for:
- glTextureImage1DEXT
- glTextureImage2DEXT
- glTextureImage3DEXT
- glTextureSubImage1D
- glTextureSubImage1DEXT
- glTextureSubImage2D
- glTextureSubImage2DEXT
- glTextureSubImage3D
- glTextureSubImage3DEXT

2 years agoBug 1125: Unit test to validate that Thread.interrupt() does not disturb continued...
Sven Gothel [Mon, 28 Sep 2015 01:51:18 +0000 (03:51 +0200)]
Bug 1125: Unit test to validate that Thread.interrupt() does not disturb continued rendering of AWT and GLCanvas

2 years agoBug 1232 - NEWT Translucent Decorated Windows Not Working On Windows >= 8 (Lack of...
Sven Gothel [Sat, 26 Sep 2015 07:56:06 +0000 (09:56 +0200)]
Bug 1232 - NEWT Translucent Decorated Windows Not Working On Windows >= 8 (Lack of Aero / Blur )

- Wrap GDI::DwmIsCompositionEnabled() in GDIUtil,
  so it always returns true if Windows >= 8 (even if not manifested)

- Nothing we seem to be able to do about the lack of Aero,
  i.e. blur effect of decorated windows

- Undecorated windows work well though ..

2 years agoTestGearsES2NEWT: Print bounds @ window resized/moved instead of just x/y
Sven Gothel [Sat, 26 Sep 2015 05:41:10 +0000 (07:41 +0200)]
TestGearsES2NEWT: Print bounds @ window resized/moved instead of just x/y

2 years agoBug 1226 - GLPixelBuffer.GLPixelAttributes.getPixelFormat() doesn't handle glDataType...
Sven Gothel [Sat, 26 Sep 2015 05:40:39 +0000 (07:40 +0200)]
Bug 1226 - GLPixelBuffer.GLPixelAttributes.getPixelFormat() doesn't handle glDataType GL_UNSIGNED_INT_8_8_8_8_REV

2 years agoBug 1222 - NEWT OSX: setAlwaysOnTop() and setAlwaysOnBottom() not working
Sven Gothel [Sat, 26 Sep 2015 04:28:51 +0000 (06:28 +0200)]
Bug 1222 - NEWT OSX: setAlwaysOnTop() and setAlwaysOnBottom() not working

- The NSWindow level must be set at window creation

- Levels are
  - aontop: kCGMaximumWindowLevel
  - aonbottom: kCGDesktopIconWindowLevel (w/ input)
  - normal: NSNormalWindowLevel

- Hence we need to recreate the NSWindow if toggling the state,
  similar to opaque .. etc.

2 years agoNEWTDemoListener: Fix 'v' modifier collision of ctrl, use shift.
Sven Gothel [Sat, 26 Sep 2015 02:29:43 +0000 (04:29 +0200)]
NEWTDemoListener: Fix 'v' modifier collision of ctrl, use shift.

2 years agoAdapt Test NApplet HTML Pages to NEWTDemoListener (all key-actions)
Sven Gothel [Sat, 26 Sep 2015 02:28:44 +0000 (04:28 +0200)]
Adapt Test NApplet HTML Pages to NEWTDemoListener (all key-actions)

2 years agoBug 1223 OSX: GLWindow loses focus after maximizing - Analysis
Sven Gothel [Sat, 26 Sep 2015 01:50:09 +0000 (03:50 +0200)]
Bug 1223 OSX: GLWindow loses focus after maximizing - Analysis

TestGearsES2NEWT reacts on key-press 'n', opening another GLWindow.

Procedure:
[1] Pressing 'n' (2nd GLWindow) and manual re-focus 1st GLWindow

[2] Pressing 'm' (single, alt, shift) on 1st GLWindow maximizes it
    Focus is still on 1st GLWindow!

[3] Pressing ctrl-m un-maximizes ..
    Focus is still on 1st GLWindow!

2 years agoBug 1188: Fix setMaximized(..) isReconfigureMaskSupported(..) query
Sven Gothel [Sat, 26 Sep 2015 01:41:39 +0000 (03:41 +0200)]
Bug 1188: Fix setMaximized(..) isReconfigureMaskSupported(..) query

setMaximized(..) isReconfigureMaskSupported(..) was using the state bit-number
instead of the state bit-mask!

Fixed.

2 years agoBug 1214: Fix Deadlock in screenPositionChanged(..); Use screenPositionChanged(....
Sven Gothel [Sat, 26 Sep 2015 00:58:00 +0000 (02:58 +0200)]
Bug 1214: Fix Deadlock in screenPositionChanged(..); Use screenPositionChanged(..) in size[Screen]PosInsetsChanged(..) on OSX; Cleanup OSX Code

- Fix Deadlock in screenPositionChanged(..)
  Defer requires to spawn whole child-window action to another thread
  since we may come from native 'NewtWindow::windowDidMove()' on MainThread.

- Use screenPositionChanged(..) in size[Screen]PosInsetsChanged(..) on OSX
  Move callback WindowImpl::sizePosInsetsChanged(..)
  to OSX's WindowDriver::sizeScreenPosInsetsChanged(..),
  since we need to use screenPositionChanged(..) to calculate
  child window relative position to parent.
  I.e. we receive the location on screen.

- Cleanup OSX Code
  - Native JNI entries shall handle NULL windowHandle -> return

  - Clarify usage of 'getWindowHandle()' and use 'isNativeValid()'
    if appropriate.

  - Don't re-use cached getWindowHandle()
    for non-blocking off-thread actions, since handle may become invalid.

  - Clarify getLocationOnScreen*(..) implementation code,
    i.e. separate getLocationOnScreenByParent(..) semantics.

2 years agoBug 1214 - NEWT MacOSX: Detect auto-resize of Window when it is larger than screen
Sven Gothel [Fri, 25 Sep 2015 07:43:21 +0000 (09:43 +0200)]
Bug 1214 - NEWT MacOSX: Detect auto-resize of Window when it is larger than screen

- On OSX (similar to X11) a created window with size > screen
  will get resized to fit screen size implicitly.

- Fix detects insets, position and size after onscreen window creation.

- Patch also merges insets and size change java callback

2 years agoNEWTDemoListener: Double-Mouse-Click Fullscreen only w/ 3 pointers involved
Sven Gothel [Sat, 19 Sep 2015 19:34:19 +0000 (21:34 +0200)]
NEWTDemoListener: Double-Mouse-Click Fullscreen only w/ 3 pointers involved

2 years agoTestGearsES2*AWT / NewtDemoListener: Show pixel-scale in title bar.
Sven Gothel [Fri, 18 Sep 2015 07:17:39 +0000 (09:17 +0200)]
TestGearsES2*AWT / NewtDemoListener: Show pixel-scale in title bar.

2 years agoUnit Tests: NEWTDemoListener: Less verbose; GraphUI-Demos: Show DPI and Pixel-Scale...
Sven Gothel [Thu, 17 Sep 2015 01:17:23 +0000 (03:17 +0200)]
Unit Tests: NEWTDemoListener: Less verbose; GraphUI-Demos: Show DPI and Pixel-Scale in GLEventListener.init(...)

2 years agoFFMPEGDynamicLibraryBundleInfo.initSymbols(): Just return null instead of throwing...
Sven Gothel [Thu, 17 Sep 2015 00:25:57 +0000 (02:25 +0200)]
FFMPEGDynamicLibraryBundleInfo.initSymbols(): Just return null instead of throwing an exception, it is OK not to have ffmpeg/libav

2 years agoBug 1211: Fix regression of GLMediaPlayerImpl caused by commit 68c8e39fa8d6e700f0a992...
Sven Gothel [Wed, 16 Sep 2015 22:12:43 +0000 (00:12 +0200)]
Bug 1211: Fix regression of GLMediaPlayerImpl caused by commit 68c8e39fa8d6e700f0a99241c1a01a435b7f6284

GLMediaPlayerImpl.updateAttributes(..):
  - always set state -> Initialized if it was Uninitialized,
    regardless whether we start StreamWorker.

  - No need to handle exceptions here, just throw/pass/propagate them,
    since called catches them and deals w/ 'em.

2 years agoUnit Tests: Add listening to NEWTDemoListener* (Missed in prev. patch)
Sven Gothel [Wed, 16 Sep 2015 02:46:01 +0000 (04:46 +0200)]
Unit Tests: Add listening to NEWTDemoListener* (Missed in prev. patch)

2 years agoNEWT Window Maximize: re-gain focus after maximize action (maybe lost on platforms...
Sven Gothel [Tue, 15 Sep 2015 10:26:03 +0000 (12:26 +0200)]
NEWT Window Maximize: re-gain focus after maximize action (maybe lost on platforms, i.e. OSX)

2 years agoFix NEWT DisplayImpl.createPointerIcon: Pass through Exceptions, as required by API...
Sven Gothel [Tue, 15 Sep 2015 10:24:56 +0000 (12:24 +0200)]
Fix NEWT DisplayImpl.createPointerIcon: Pass through Exceptions, as required by API doc.

2 years agoBug 1211: Refine NEWTDemoListener, JOGLNewtAppletBase
Sven Gothel [Tue, 15 Sep 2015 10:23:27 +0000 (12:23 +0200)]
Bug 1211: Refine NEWTDemoListener, JOGLNewtAppletBase

- NEWTDemoListener.createPointerIcons(..)
  - Use Display instance
  - Simplify PointerIcon creation using a list,
    skipping all non-found resources.

- JOGLNewtAppletBase
  - Bring back reparent action via key 'r'
  - Drop redundant PointerIcon, using NEWTDemoListener

2 years agoBug 1211: Adopt changes to unit test from commit 68c8e39fa8d6e700f0a99241c1a01a435b7f6284
Sven Gothel [Tue, 15 Sep 2015 05:54:07 +0000 (07:54 +0200)]
Bug 1211: Adopt changes to unit test from commit 68c8e39fa8d6e700f0a99241c1a01a435b7f6284

2 years agoBug 1211: Hardening Condition-Wait from Spurious-Wakeups and unintended InterruptedEx...
Sven Gothel [Tue, 15 Sep 2015 05:50:50 +0000 (07:50 +0200)]
Bug 1211: Hardening Condition-Wait from Spurious-Wakeups and unintended InterruptedException(s)

Below is an updated list of Condition-Wait classifications
as described in Bug 1211.

This list includes recent changes on GlueGen
regarding this Bug 1211.

A followup commit will address the unit tests.

  - Noncancelable + Persistent-Wait
    - GLMediaPlayerImpl.StreamWorker thread (changed)
        - pauses thread in case of intr

  - Cancelable + Persistent-Wait:
    - LFRingbuffer.getImpl(..)
    - LFRingbuffer.waitForFreeSlots(int)
    - SyncedRingbuffer.getImpl(..)
    - SyncedRingbuffer.waitForFreeSlots(int)
    - FunctionTask.invokeOnNewThread(..) (changed)
    - RunnableTask.invokeOnNewThread(..) (changed)
    - SharedResourceRunner.run()
    - SharedResourceRunner.doAndWait() (changed)
    - SharedResourceRunner.start() (changed)
    - SharedResourceRunner.stop() (changed)
    - GLMediaPlayerImpl.StreamWorker ctor  (changed)
    - GLMediaPlayerImpl caller thread actions do*() (changed)
    - AndroidGLMediaPlayerAPI14.getNextTextureImpl(..) (changed)
    - DisplayImpl.enqueueEvent(..) (changed)
        -> Persistent-Wait
        -> Cancels wait and NEWTEvent
        -> dispatchMessage(NEWTEventTask): always notifyCaller!
    - GLDrawableHelper.invoke(..) (changed)
    - DefaultEDTUtil.waitUntilIdle() (changed)
    - DefaultEDTUtil.waitUntilStopped() (changed)
    - DefaultEDTUtil.invokeImpl(..)  (changed)
    - DefaultEDTUtil.NEDT.run(..)  (changed)
    - AWTEDTUtil.waitUntilStopped(..)  (changed)
    - AWTEDTUtil.invokeImpl(..)  (changed)
    - AWTEDTUtil.NEDT.run(..)  (changed)
    - SWTEDTUtil.invokeImpl(..)  (changed)
    - SWTEDTUtil.waitUntilStopped(..)  (changed)
    - SWTEDTUtil.NEDT.run(..)  (changed)
    - GLWorkerThread.invokeAndWait(..)
    - GLWorkerThread.start() (changed)
    - GLWorkerThread.WorkerRunnable.run() (changed)
    - Animator.run() (changed)
    - AnimatorBase.finishLifecycleAction() (changed)
    - OSXUtil.RunOnMainThread(..) (changed)
    - SingletonInstanceServerSocket.Server.shutdown() (changed)
    - SingletonInstanceServerSocket.Server.start() (changed)
    - com.jogamp.audio.windows.waveout.Mixer.shutdown() (changed)

  - Extending/Using InterruptSource.Thread (changed)
      - DefaultEDTUtil.NEDT
      - AWTEDTUtil.NEDT
      - SWTEDTUtil.NEDT
      - GLWorkerThread.thread
      - Mixer.FillerThread
      - Mixer.MixerThread

  - Using InterruptSource.Thread (changed)
      - TempFileCache
      - LauncherTempFileCache
      - Animator.thread
      - SingletonInstanceServerSocket.Server.serverThread

Deprecated:
    - FunctionTask.invoke(..)  (changed)
        -> on current thread, no wait -> deprecated
    - RunnableTask.invoke(..) (changed)
        -> on current thread, no wait -> deprecated

2 years agoBug 1211 TestBug1211IRQ00NEWT: Cover whole JOGL initialization by MyThread, intercept...
Sven Gothel [Sat, 5 Sep 2015 03:10:03 +0000 (05:10 +0200)]
Bug 1211 TestBug1211IRQ00NEWT: Cover whole JOGL initialization by MyThread, intercepting all interrupt() calls used.

This disclosed issue Bug 1213, "RecursiveThreadGroupLockImpl01Unfairish.unlock() always interrupts original-owner, even if not waiting at unlock()".

So far no InterruptedException nor interrupt() call has been detected
by MyThread.

2 years agoBug 1211 TestBug1211IRQ00NEWT: Add assertions incl. testing Thread.interrupted()...
Sven Gothel [Thu, 3 Sep 2015 16:48:57 +0000 (18:48 +0200)]
Bug 1211 TestBug1211IRQ00NEWT: Add assertions incl. testing Thread.interrupted() assuring no silence interruption occured

2 years agoBug 1211 TestBug1211IRQ00NEWT: Fix using durationTest01; Make createWindow(..) analog...
Sven Gothel [Thu, 3 Sep 2015 16:21:36 +0000 (18:21 +0200)]
Bug 1211 TestBug1211IRQ00NEWT: Fix using durationTest01; Make createWindow(..) analog to GLWindow.main(..)

2 years agoBug 1211: Custom size for TestBug1211IRQ00NEWT
Sven Gothel [Thu, 3 Sep 2015 16:14:08 +0000 (18:14 +0200)]
Bug 1211: Custom size for TestBug1211IRQ00NEWT

Tested on GNU/Linux desktop machines (also our test node w/ nvidia, producing the issue sometimes)
with jre8, jre7 and jre6.
No interruption detected .. sadly.

2 years agoBug 1211: Show Platform-Info for unit test TestBug1211IRQ00NEWT (commit 5f5553f1c0b67...
Sven Gothel [Thu, 3 Sep 2015 16:02:55 +0000 (18:02 +0200)]
Bug 1211: Show Platform-Info for unit test TestBug1211IRQ00NEWT (commit 5f5553f1c0b6731970db6df24d79654661238247)

2 years agoBug 1211: Adding unit test to identify Thread.interrupt() caller for DefaultEDTUtil...
Sven Gothel [Thu, 3 Sep 2015 15:43:33 +0000 (17:43 +0200)]
Bug 1211: Adding unit test to identify Thread.interrupt() caller for DefaultEDTUtil.invokeImpl(..) wait interruption

2 years agoNativeWindowFactory.createDevice(..): Support creating EGLGraphicsDevice using reflec...
Sven Gothel [Wed, 2 Sep 2015 02:25:43 +0000 (04:25 +0200)]
NativeWindowFactory.createDevice(..): Support creating EGLGraphicsDevice using reflection for 'jogamp.opengl.egl.EGLDisplayUtil'

2 years agoWindows Scripts: Bump JVM to 1.8.0_60
Sven Gothel [Tue, 1 Sep 2015 21:49:00 +0000 (23:49 +0200)]
Windows Scripts: Bump JVM to 1.8.0_60

2 years agoBug 1212 - OSX: Crash using CALayer at UnsetJAWTRootSurfaceLayer0(..) w/ Java 1.8...
Sven Gothel [Tue, 1 Sep 2015 03:19:14 +0000 (05:19 +0200)]
Bug 1212 - OSX: Crash using CALayer at UnsetJAWTRootSurfaceLayer0(..) w/ Java 1.8.0_60

- OSX 10.10.5
- Java 1.8.0_60

Crash using CALayer at UnsetJAWTRootSurfaceLayer0(..)
as called within MacOSXJAWTWindow.invalidateNative() (caller: destroy())
on the MainThread.

It has been observed that the
JAWT_SurfaceLayers protocol instance 'surfaceLayers' has been pulled beforehand.

'surfaceLayers' is fetched from the locked JAWT instance
via JAWT_DrawingSurfaceInfo's platformInfo.

It now seems required to retain the instance
at GetJAWTSurfaceLayersHandle0 and release it
at UnsetJAWTRootSurfaceLayer0 to keep it alive.

+++

Manually executed 'ant junit.run' on OSX, no failures or errors.

2 years agoBug 1202: Fix vsync regression on OSX when using CALayer
Sven Gothel [Tue, 1 Sep 2015 00:05:50 +0000 (02:05 +0200)]
Bug 1202: Fix vsync regression on OSX when using CALayer

On OSX using CALayer for onscreen rendering,
the drawable is utilizing an offscreen FBO.

Hence we need to move the vsync-skip-operation criteria,
i.e. skip if offscreen, down to the implementation.

2 years agoBug 1205 - NEWT Security: Clear framebuffer after creation and before visibility...
Sven Gothel [Mon, 31 Aug 2015 06:52:58 +0000 (08:52 +0200)]
Bug 1205 - NEWT Security: Clear framebuffer after creation and before visibility (X11 Onscreen)

X11Window.c:

Adding CWBackPixel BlackPixel(..) resulting in an initial black window (zero).

com.jogamp.opengl.test.junit.newt.TestWindows02NEWT shows the content
w/ opaque background and transparent one.
Note: To be able to receive a transparent background,
one needs to utilize a compositor WM (e.g. KWin w/ effects enabled).

Due to commit cf9e2f2cb8ead7efd7751dcbfaecb36ed06cf9d6 (Bug 1210)
this works in pure NEWT mode w/o utilizing GLX.

2 years agoBug 1210 - Use manual impl. XRenderFindVisualFormat instead of buggy generated version
Sven Gothel [Mon, 31 Aug 2015 06:41:07 +0000 (08:41 +0200)]
Bug 1210 - Use manual impl. XRenderFindVisualFormat instead of buggy generated version

- XRenderDirectFormat XVisual2XRenderMask(..):
  - Move from JOGL's X11GLXGraphicsConfiguration -> Nativewindow X11GraphicsConfiguration
  - Always use manual impl. of XRenderFindVisualFormat

Additionally:

- Add X11GraphicsConfiguration.XVisualInfo2X11Capabilities(..)
  allowing to properly setup the resulting Capabilities instance
  as used in X11GraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(..)

- XVisualInfo:
    - Add 'String toString()'
    - 'XVisualInfo create(XVisualInfo s)' uses source buffer size!
    - XGetVisualInfo: Use returned buffer-capacity/count for element-size
      and also bail out if count<=0

2 years agoBug 1208 - NEWT: Window: Consider avoiding operations if not supported, see getSuppor...
Sven Gothel [Mon, 31 Aug 2015 04:16:49 +0000 (06:16 +0200)]
Bug 1208 - NEWT: Window: Consider avoiding operations if not supported, see getSupportedStateMask()

- Skip operation if not supported

- Fix skip operation if isFullscreen() && !isNativeValid():
    We have to store the state w/o action,
    so the state can be picked up at native creation.

2 years agoFix Bug 1209 - Regression of Bug 1188 Patches: Parented Fullscreen Issues (X11, Windows)
Sven Gothel [Mon, 31 Aug 2015 04:11:46 +0000 (06:11 +0200)]
Fix Bug 1209 - Regression of Bug 1188 Patches: Parented Fullscreen Issues (X11, Windows)

The regression was caused by WindowImpl changes:
  (1) Not ignoring maximizedChanged(..) during fullscreen.
      X11 windows may promote maximized state, which will be passed
      in reconfigure -> non-fullscreen and hinders reseting the original size.

  (2) getReconfigureMask(..) was wrongly translated to state-mask,
      i.e. special handling of STATE_MASK_UNDECORATED and STATE_MASK_CHILDWIN
      was removed.

- Issues above were corrected

- Replace PSTATE_MASK_FULLSCREEN_NFS* w/ own stateMaskNFS for simplification

2 years agoBug 1188: Refine getSupportedStateMask() semantics and minimum requirements (adding...
Sven Gothel [Mon, 31 Aug 2015 03:51:13 +0000 (05:51 +0200)]
Bug 1188: Refine getSupportedStateMask() semantics and minimum requirements (adding STATE_MASK_FULLSCREEN)

Refine getSupportedStateMask():
 - always for _after_ native creation, i.e. first visibility
 - removed STATE_MASK_AUTOPOSITION
 - adding STATE_MASK_FULLSCREEN to minimum requirements

2 years agoBug 1203: Add missing constraints in desktop *GLContext.create* methods: Bail out...
Sven Gothel [Sun, 30 Aug 2015 04:26:29 +0000 (06:26 +0200)]
Bug 1203: Add missing constraints in desktop *GLContext.create* methods: Bail out if GL ES is requested ; Fix test case

*GLContext.createImpl(..) shall throw an GLException:
*GLContext.createContextARBImpl(..) shall return 0:
  - Desktop implementation: if GL ES is requested
  - EGL implementation: if GL Desktop is requested, but not available

Otherwise GLContextImpl may mistake a desktop context for an ES one.

+++

Fix unit test TestGLAutoDrawableFactoryGLProfileDeviceNEWT.test11ES2OnDesktop():
  We have to query the factory by desired profile,
  since the desktop factory cannot produce an GL ES context.

2 years agoBug 1203: OpenGL ES 3.1 NVIDIA 355.06's EGL impl. is unstable requires GLRendererQuir...
Sven Gothel [Sun, 30 Aug 2015 02:59:11 +0000 (04:59 +0200)]
Bug 1203: OpenGL ES 3.1 NVIDIA 355.06's EGL impl. is unstable requires GLRendererQuirk.SingletonEGLDisplayOnly

Test cases with multiple EGLDisplay init/terminate result to crashes
due to NVidia's 355.06 driver.

Hence enable GLRendererQuirk.SingletonEGLDisplayOnly
if EGL vendor is NVIDIA until a good driver version is known.

2 years agoBug 1207 - GLDebugMessageHandler: Support GL_KHR_debug for Desktop and ES profile
Sven Gothel [Sun, 30 Aug 2015 02:55:12 +0000 (04:55 +0200)]
Bug 1207 - GLDebugMessageHandler: Support GL_KHR_debug for Desktop and ES profile

GL_KHR_debug <https://www.opengl.org/registry/specs/KHR/debug.txt>

GL_KHR_debug shall be favorized before
  - GL_ARB_debug_output
  - GL_AMD_debug_output

Allow GL_KHR_debug for GL2GL3 and GL2ES2 profiles,
i.e. including ES profiles: GLES2, GLES3.

GL_ARB_debug_output and GL_AMD_debug_output
are only allowed for desktop GL2GL3 profiles.

2 years agoBug 1203: Optimize OpenGL Profile probing/mapping (Skip redundant queries)
Sven Gothel [Sun, 30 Aug 2015 00:30:26 +0000 (02:30 +0200)]
Bug 1203: Optimize OpenGL Profile probing/mapping (Skip redundant queries)

Via GLDrawableFactory[Impl] the following details are considered
while GLContextImpl.mapGLVersions(..):
  - hasOpenGLDesktopSupport
    If false, skip OpenGL Desktop queries

  - hasOpenGLESSupport
    If false, skip OpenGL ES queries

  - hasMajorMinorCreateContextARB
    If false, reduce [maxMajor.maxMinor..minMajor.minMinor]
    iteration, reducing to [maxMajor..minMajor],
    usually only one query.

2 years agoBug 1203: Fix regression: Handle GLRendererQuirks.GLES3ViaEGLES2Config
Sven Gothel [Sun, 30 Aug 2015 00:19:58 +0000 (02:19 +0200)]
Bug 1203: Fix regression: Handle GLRendererQuirks.GLES3ViaEGLES2Config

Need to handle GLRendererQuirks.GLES3ViaEGLES2Config,
i.e. a created ES3 context via ES2 request must result in
mapping ES3 as well.

2 years agoBug 1203: Fix TestGLAutoDrawableFactoryGLProfileDeviceNEWT: Do not assume EGL/Desktop...
Sven Gothel [Sat, 29 Aug 2015 21:10:30 +0000 (23:10 +0200)]
Bug 1203: Fix TestGLAutoDrawableFactoryGLProfileDeviceNEWT: Do not assume EGL/Desktop factories are available!

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