aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Reuse Gluegen's Bitfield.Util for 'PowerOf2' computationSven Gothel2019-12-311-30/+6
| | | | See gluegen commit 178c7b9d40e06a04790542241912ca21d2c7b92f
* Bug 1347: Resolve Merged EGL/Desktop Profile MappingSven Gothel2019-12-285-19/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | GLProfile.computeProfileImpl(..) as of Bug 1084 is not the culprit here and its hardware criteria filter works. The issue is commit 99a064327bf991318841c858d21d13e55d6b39db of Bug 1203, in particular the change in GLProfile re: "Merge computed EGL-Profile-Map (1) and Desktop-Profile-Map (2) per device, instead of just using the last computation, preserving and favoratizing the Desktop-Profile-Map." Here the Desktop-Profile-Map overwrites the EGL-Profile-Map and hence the software mapping gets used. Indeed, this is a regression cause by the work of Bug 1203. +++ Resolution is to revert the explicit 'union mapping' and rely on an enhanced 'GLContextImpl.remapAvailableGLVersions(fromDevice, toDevice)' function. Here the EGLDrawableFactory _already_ maps the EGL device's GL Versions to the 'host' device (e.g. X11). This has to be refined so that the remap will not overwrite the 'host' device's already detected GL Versions. That alone is enough, so that GLProfile can simply use the 'mappedEGLProfiles' of the 'host' device if detected, which already is a merged mapping of X11 host- and EGL sub-device. In case no 'mappedEGLProfiles' are available, we simply use the 'mappedDesktopProfiles'.
* Bug 1287 - Complete Immutable glNamedBufferStorage support in ↵Sven Gothel2019-12-271-8/+9
| | | | | | | | | | | | GLBufferObjectTracker As of the time of implementation, named immutable buffers were not fully supported within GL 4.4. This has changed, i.e. GL 4.5 supports glNamedBufferStorage. This patch adds support for the immutable named buffer storage case. jogl commit 09fc7aa5539731bb0fba835caee61f6eb837ecff, added GLBufferObjectTracker allowing to keep required references to NIO object. This tracker complements the NIO buffer lifecycle with the GL semantics.
* Bug 1156 Regression (Bug 1417): Probe whether 'eglGetPlatformDisplay(..)' is ↵Sven Gothel2019-12-252-1/+38
| | | | | | | | | | | | | | | | | | available before using commit f4281b5ee80d7674134bfee357695a98382884a3 for Bug 1156 (DRM/GBM) introduced the call to 'eglGetPlatformDisplay(..)' for known EGL-platforms. However, 'eglGetPlatformDisplay(..)' is only available for EGL versions >= 1.5 or 'eglGetPlatformDisplayEXT(..)' if EGL extension 'EGL_EXT_platform_base' is available. This patch adds a singular EGL version probe and a secondary extension fallback test at first call using EGL_NO_DISPLAY on both EGL_VERSION and EGL_EXTENSION eglQueryString(..) calls. If 'eglGetPlatformDisplay*(..)' is not available, simply use 'eglGetDisplay(..)'. This regression also impacted Bug 1417 (Android bringup using current SDK + NDK), i.e. disabled most Android devices as their EGL version is often 1.4.
* Bug 1156: Seperate DRM/GBM NEWT native library from main head NEWT native ↵Sven Gothel2019-12-2512-13/+33
| | | | | | | | | | | | | | | | library DRM/GBM is enabled for Linux in general. Nativewindow's 'nativewindow_drm' DRM/GBM native library is already seperated. NEWT get its 'newt_drm' DRM/GBM native library. NEWT's main head native library is renamed from 'newt' -> 'newt_head' and is earmarked for further seperation similar to Nativewindow's. At least a 'newt_wayland' will probably followup when support is added. Goal is to remove DRM/GBM dependency for Linux X11 operation as well as removing X11 dependency for Linux DRM/GBM operation.
* Bug 1156: NEWT WindowDriver: Handle case with requested ↵Sven Gothel2019-12-093-2/+31
| | | | CapabilitiesImmutable not being GLCapabilitiesImmutable
* Bug 852: TestCPUSourcingAPINEWT Reference the bug entry and add a little ↵Sven Gothel2019-12-091-0/+5
| | | | reminder
* Bug 1416 - Allow EGLDrawableFactory re-creation after shutdown() - be functionalSven Gothel2019-12-094-5/+36
| | | | | | | | | | TestShutdownCompleteNEWT revealed that EGLDrawableFactory won't be properly re-created within subsequent GLProfile/GLDrawableFactory initSingleton() after a GLProfile.shutdown() call. Hence after the shutdown() call, subsequent GLProfile have no EGLDrawableFactory available and hence may not have a default device existent in case no desktop-factory is available. Allow EGLDrawableFactory to be re-created after a shutdown().
* Bug 1156: NEWT Window: Better handling of fixed console case: Not resizable ↵Sven Gothel2019-12-0915-32/+150
| | | | | | | | | | | | | | | | | | | | | | | and not repositionable. Our two fixed size and position console cases 'bcm.egl' and 'egl.gbm' (drm.gbm) only operate in a console like fullscreen mode. We should earmark and expose this behavior, as well as handle it by not waiting for a position / size and not attempting to change position and size. Reducing WindowImpl.minimumReconfigStateMask to bare minimum values: STATE_MASK_VISIBLE | STATE_MASK_FOCUSED; New WindowImpl.mutableSizePosReconfigStateMask extends WindowImpl.minimumReconfigStateMask, representing previous values: STATE_MASK_VISIBLE | STATE_MASK_FOCUSED | STATE_MASK_FULLSCREEN | STATE_MASK_RESIZABLE | STATE_MASK_REPOSITIONABLE; All WindowDriver implementations previously using WindowImpl.minimumReconfigStateMask are now using WindowImpl.mutableSizePosReconfigStateMask but the explicit console driver named above. I would have liked to add the STATE_BIT_FULLSCREEN to the current stateMask to notify this semantics, however this would have lead to more code changes as our fullscreen mode assumes to be 'on top' of the normal mode. Here the normal mode is essentially fullscreen and no back/forth fullscreen setting is useful or allowed. Therefore, both fixed size & position console driver won't expose themselves as being in fullscreen mode.
* Bug 1393: Apply 12eed5d38616d23b6e8e2e5b497dfc2f54d90c90 to IOS, avoiding ↵Sven Gothel2019-12-081-4/+6
| | | | AppKit/EDT deadlock for parent screen location lookup
* Bug 1393: Resolve EDT + AppKit Deadlock with native parenting: Fetch parent ↵Sven Gothel2019-12-081-4/+6
| | | | screen position directly w/o locking.
* Bug 1415: MacOS: Disable multiple Window creation on ExclusiveContextThread ↵Sven Gothel2019-12-082-0/+15
| | | | in test case
* Bug 1415: ExclusiveContextBase00+10: Utilize one Animator per Window for ↵Sven Gothel2019-12-082-185/+248
| | | | | | | clean ExclusiveContextThread No, this does not resolve the issue - but is the proper test case. ExclusiveContextBase10 also gets the preVis test.
* NEWT WindowImpl: Wording in commentSven Gothel2019-12-081-1/+1
|
* Bug 1393: Make window position check more tolerant (2x insets or 64 pixels, ↵Sven Gothel2019-12-083-14/+33
| | | | | | | | | | | whichever is greater) Certain WM's may modify the windowing position 'a little', which has been experienced on one X11 server during invisible setting. The insets were removed and its value added to the position! We could argue that this is an issue in our windowing code, however, the WM is free to reposition a window. Refines commit b8db98376069a72ad40b7ef2fe2d9003aea2b091
* Bug 1200: GLRendererQuirks.NoSurfacelessCtx still persists on Linux/X11 ↵Sven Gothel2019-12-082-3/+4
| | | | | | | | | | NVIDIA 440.36 using FBO Tested with com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsNewtAWT, which crashes in native makeCurrent of NV driver gl-core when using SurfacelessCtx. Therefor we had to revert the commit 4fe9e1dfa67f4e5d614f48c02ad88e4cdd1ed415 enabling SurfacelessCtx with NV driver >= 430.40.
* Bug 1156: DRM/GBM NEWT: Clarify drmModeSetCrtc(..)'s x/y parameter and ↵Sven Gothel2019-12-072-160/+84
| | | | | | earmark spanning across monitors drmModeSetCrtc(..)'s x/y parameter are the surface's offset to be scanned out from one CRT!
* Bug 1412: Fix commit a8c2de110a2254af137a3d99007cc77e3ecd8078Sven Gothel2019-12-062-6/+11
|
* Bug 1412 - JNI: NEWT Check & Handle Exception after calling back into Java ↵Sven Gothel2019-12-061-0/+1
| | | | (NewtCommon.c)
* Bug 1413 - NEWT X11Window: NewtWindows_getFrameExtends(..) may hang on ↵Sven Gothel2019-12-063-18/+28
| | | | | | | | | | | XPeekEvent(..) The wait loop uses XPeekEvent(dpy, &e), which can block indefinite if queue is empty. Replace with timeout only _and_ only wait on CreateWindow0(..) not when queried via X11Display dispatch loop on events when it is assumed the information has been propagated already.
* Bug 1412 - JNI: NEWT Check & Handle Exception after calling back into Java ↵Sven Gothel2019-12-064-7/+57
| | | | (X11Display + X11Window)
* Bug 1410: Fix NEWT PointerIcon Lifecycle (destroy and clean references @ ↵Sven Gothel2019-12-062-10/+35
| | | | | | | | | | | closing) Commit d5ba4cae824087879a4857e20961a95da04eaebb clarified and simplified the lifecycle of a PointerImpl instance, i.e. drop its resurrection in PointerImpl.validateHandle() in favor of a hard exception. This caused detection of subsequent PointerImpl lifecycle issues, as instances were not fully destroyed on Display closing and references not null'ed in Display and Screen instances.
* Fix regression of commit 2b899a55e365aa03aeb234187600526777c1a9acSven Gothel2019-12-061-1/+1
| | | | This bug never allowed a PointerIconImpl to be destroyed via PointerIconImpl.destroy()
* Bug 1409: GNU/Linux DRM Console: Clear stdin before exit and don't act on ↵Sven Gothel2019-12-053-3/+60
| | | | | | | | | stdin in vsync-wait-loop User input during test from the console will also end up in stdin of the console after the java application has been closed. This is not only annoying, but also a security concern, as the input gets executed if containing a CR. Further, the vsync-wait-loop shall ignore stdin.
* PointerIcon new instances are always valid ..Sven Gothel2019-12-052-7/+15
| | | | Move native handle check to pre-destruction call in PointerIconImpl.destroyOnEDT(..), unifying single destruction and all.
* Bug 1405, Bug 1406, Bug 1408: Resolution: Call ↵egl-gbmSven Gothel2019-12-051-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ReleasePrimitiveArrayCritical(..) in GetPrimitiveArrayCritical(..) code path! Now that was quite a miss, causing the bugs in the first place! The freeze was caused in the JVM, as this open GetPrimitiveArrayCritical(..) disabled the GC. This was reported via '-Xcheck:jni'. Depending on the system/jvm, the freeze may happen early or only after a while. This code path was not executed with new property 'newt.disable.PointerIcon' set, but from there to finding the missing critical release - a journey: - jstack showed "main" #1 prio=5 os_prio=0 cpu=275.71ms elapsed=51.93s allocated=9710K defined_classes=472 tid=0x00007f7084015000 nid=0x1a39 waiting on condition [0x00007f70897c2000] java.lang.Thread.State: RUNNABLE at jogamp.opengl.es3.GLES3Impl.dispatch_glUniformMatrix4fv1(Native Method) at jogamp.opengl.es3.GLES3Impl.glUniformMatrix4fv(GLES3Impl.java:2585) at jogamp.opengl.es3.GLES3Impl.glUniform(GLES3Impl.java:10713) -- said that this thread was no more running, waiting on condition .. -- glUniformMatrix4fv1 was given an array! - '-Xcheck:jni' gave: Warning: Calling other JNI functions in the scope of Get/ReleasePrimitiveArrayCritical or Get/ReleaseStringCritical -- Now it is clear that the lack of releasing the critical array, returning to Java and then calling other JNI methods caused the Warning - and eventually the freeze.
* LinuxKeyEventTracker: Factor out 'sendKeyEvent(..)' call with null check.Sven Gothel2019-12-051-12/+12
|
* Bug 1406, Bug 1405: demos.Launcher0: Defaults to use multiple PointerIcons againSven Gothel2019-12-051-4/+4
| | | | launch script test-demo-launcher0.sh: Tested with '-Xcheck:jni'
* Bug 1156, Bug 1401: Disable DesktopGL on EGL w/ DRM/GBM earlier in ↵Sven Gothel2019-12-051-20/+22
| | | | | | | initialization Was within hasOpenGLDesktopSupport(), but then DesktopGL libs would have been already loaded and looked-up. This is not necessary and only wastes resources and time.
* NEWTDemoListener: Fix NPESven Gothel2019-12-051-4/+7
|
* Bug 1406, Bug 1405: demos.Launcher0: Allow passing GLEventListener via ↵Sven Gothel2019-12-051-14/+34
| | | | '-demo classname'
* Bug 1156: NEWT DRM/GBM PointerIcon: Use hotX/hotY drmModeSetCursor2(..), ↵Sven Gothel2019-12-054-30/+35
| | | | hence pass PointerIconImpl through
* Bug 1408: NEWT DRM/GBM WindowDriver: Adding glFinish() before ↵Sven Gothel2019-12-041-0/+1
| | | | | | | eglSwapBuffers(..) just in case .. This is the poor man's SYNC: glFenceSync () with glWaitSync(). However, this change did not resolve Bug 1408. Earmarked to be removed!
* Bug 1408: NEWT DisplayImpl PointerIcon: Property 'newt.disable.PointerIcon' ↵Sven Gothel2019-12-041-1/+7
| | | | disables PointerIcon usage in general.
* Bug 1408: NEWT DRM/GBM DisplayDriver: Add device locking/unlocking ↵Sven Gothel2019-12-042-9/+44
| | | | decoration for PointerIcon operations
* NEWT: Align DisplayImpl.createPointerIcon(..) behavior; ↵Sven Gothel2019-12-043-40/+16
| | | | | | | | | | | | | | | | PointerIconImpl.validatedHandle() shall not create native resource. Semantic cleanup for clarity and equal behavior Align DisplayImpl.createPointerIcon(..) behavior - return null handle of createPointerIconImplChecked(..) shall be accepted, no exception for neither of the two creation methods. PointerIconImpl.validatedHandle() shall not create native resource. - throws exception if handle is null (about to be used) - no native creation shall happen here. Display.PointerIcon.validate(): Removed, not used.
* Bug 1406, Bug 1405: demos.Launcher0: No sleep w/o animator. VSYNC setting ↵Sven Gothel2019-12-041-1/+0
| | | | rules (launch script w/ key tracker)
* Bug 1156, Bug 1406: NEWT DRM/GBM WindowDriver.surfaceSwap(): Pass ↵Sven Gothel2019-12-042-16/+41
| | | | swapInterval to optionally skip VSYNC if 0
* Bug 1406: demos.Launcher0: More code path reduction: useMultiplePointerIcon ↵Sven Gothel2019-12-043-11/+21
| | | | must be enabled via -pointerIcon
* Merge remote-tracking branch 'xranby/master'Sven Gothel2019-12-043-42/+62
|\
| * VC4: Only load Broadcom EGL driver when guessVCIVUsedXerxes Rånby2019-12-043-44/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | Broadcom VC IV can be used from both console and from inside X11 When used from inside X11 rendering is done on an DispmanX overlay surface while keeping an X11 nativewindow under as input. When Broadcom VC IV is guessed only the Broadcom DispmanX EGL driver is loaded. Therefore standard TYPE_X11 EGL can not be used.
| * VC4: Broadcom uses libbrcmEGL.so, libbrcmGLESv2.so, libbrcmOpenVG.so and ↵Xerxes Rånby2019-12-022-3/+17
| | | | | | | | | | | | | | libbrcmWFC.so since 7 Jul 2016 Raspbian integration (two libGLES side-by-side) https://github.com/anholt/mesa/issues/24
* | Bug 1406: demos.Launcher0: More tests ..Sven Gothel2019-12-042-76/+14
| | | | | | | | | | | | | | | | | | | | | | | | Misc: - Remove unused SysExit.. - showFPS=true default - allow setting 'useDoubleBuffer' via '-single' - demos.es2.GearsES2: Don't be verbose on display even w/o animator IF '-noanim', issue glWindow.display() from main thread instead of using the animator thread otherwise. This shall test the swap buffering code in single threaded mode!
* | Bug 1406: DRMUtil: Probe DRM device whether it has resources attached (and ↵Sven Gothel2019-12-041-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is the desired one) First issue was that the proper DRM file had to be queries, as Raspberry 4 may have two of them: <-- /dev/dri/dri0 /dev/dri/dri0 /dev/dri/by-path/platform-fec00000.v3d-card -> ../card0 /dev/dri/by-path/platform-soc:gpu-card -> ../card1 --> This patch attempts to probe all /dev/dri/card[0..99] using this arbitrary range. The test loop ends if: - drmOpenFile succeeds and drmModeGetResources delivers non-null value - the iterated probed file doesn't even exist - 100 files has been tested ;-)
* | Bug 1405: Provide stand alone demo launcher reducing complexitySven Gothel2019-12-042-0/+743
|/ | | | The launcher script also allows inflating classes and native libs to test impact on Raspberry Pi 3 Model B+.
* Bug 1156: Remove verbose print in native CreatePointer..Sven Gothel2019-11-301-1/+1
|
* Bug 1156: LinuxKeyEventTracker, LinuxMouseTracker: Robostness (+NEWT fix)Sven Gothel2019-11-306-41/+65
| | | | | | | | commit 453f80e38bcb0945e7eac27a5917dce9bdc6446b added disabling the tracker, however the NEWT usage didn't cover all mouse tracker null pointer. Further, let's initialize and spawn off the threads only at first getSingleton() call not at class initialization earlier.
* Bug 1156: LinuxKeyEventTracker, LinuxMouseTracker: Adding property to ↵Sven Gothel2019-11-302-14/+42
| | | | | | | | | | | disable each LinuxKeyEventTracker also disable the eventX reading by default, but can be enabled via new property. The 'return bug' (crash due to underlying console) is indeed not occuring when using a VT w/o running console application underneath. As Xerxes showed, one may use chvt to a free known VT or openvt.
* Bug 1156: LinuxKeyEventTracker: Add '/dev/input/by-path/*-event-kbd' and ↵Sven Gothel2019-11-291-42/+75
| | | | more documentation
* Bug 1156: DRM/GBM: Add full PointerIcon (Cursor) SupportSven Gothel2019-11-296-40/+307
| | | | | | | | | | | | DRM allows 64x64 pixel cursor images, using GBM_FORMAT_ARGB888 only. Notable: GBM_FORMAT_ARGB888 == PixelFormat.BGRA8888 Having fixed mouse and keyboard input with previous commit, the demo com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT shows via key press - i -> pointer visible/invisible - c -> pointer icon change