summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1312: GLContextShareSet CleanupSven Gothel2019-12-312-15/+63
| | | | | | | | | - refine some method names, eg -- 'addNew' -> 'mapNewEntry' -- 'hasCreatedSharedLeft(..)' -> 'hasCreatedSharesLeft(..)' - add 'getCreatedShareCount(..)' and 'getDestroyedShareCount(..)' - add 'getSize()' and 'printMap(..)'
* 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-251-1/+37
| | | | | | | | | | | | | | | | | | 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: NEWT WindowDriver: Handle case with requested ↵Sven Gothel2019-12-092-0/+29
| | | | CapabilitiesImmutable not being GLCapabilitiesImmutable
* Bug 1416 - Allow EGLDrawableFactory re-creation after shutdown() - be functionalSven Gothel2019-12-091-0/+1
| | | | | | | | | | 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 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, 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.
* VC4: Only load Broadcom EGL driver when guessVCIVUsedXerxes Rånby2019-12-042-40/+36
| | | | | | | | | | | | | 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 1200: probeSurfacelessCtx works at least since NVIDIA 430.40.Sven Gothel2019-11-281-2/+2
| | | | | | Added this version as the safe version to limit GLRendererQuirks.NoSurfacelessCtx setting. Bug 1200 - JOGL crashes on Debian8 GNU/Linux x86_64 'NVidia beta driver 355.06' @ probeSurfacelessCtx
* Bug 1156: Using EGL.eglCreatePlatformWindowSurface(..) crashes on NVIDIA ↵Sven Gothel2019-11-281-1/+4
| | | | | | 430.40 on GNU/Linux X11 Avoiding this method for now.
* Bug 1156 - Implement DRM/GBM Support for JOGL(EGL) and NEWTSven Gothel2019-11-284-40/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding new classes DRMLib (gluegen of drm + gbm), DRMUtil and DRMMode GBMDummyUpstreamSurfaceHook to new package jogamp.nativewindow.drm, allowing full awareness of DRM + GBM within NativeWindow for JOGL + NEWT. DRMMode replaces the previous native code of collecting drmMode* attributes: active connector, used mode, encoder etc and also supports multiple active connectors. DRMUtil handles the global static drmFd (file descriptor), currently only the GNU/Linux DRM device is supported. GBMDummyUpstreamSurfaceHook provides a simple dummy GBM surface. NativeWindow provides the new nativewindow_drm.so and nativewindow-os-drm.jar, which are included in most 'all' jar packages. build property: setup.addNativeEGLGBM -> setup.addNativeDRMGBM Changes NativeWindowFactory: - TYPE_EGL_GBM -> TYPE_DRM_GBM while keeping the package ID of '.egl.gbm' for NEWT (using EGL) - Initializing DRMUtil at initialization Changes EGLDrawableFactory: - Using native GBM device for the default EGL display creation instead of EGL_DEFAULT_DISPLAY. This resolves issues as seen in Bug 1402, as well in cases w/o surfaceless support. - GL profile mapping uses surfaceless when available for GBM, otherwise uses createDummySurfaceImpl (dummy GBM surface via GBMDummyUpstreamSurfaceHook) - createDummySurfaceImpl uses a dummy GBM surface via GBMDummyUpstreamSurfaceHook - DesktopGL not available with GBM, see Bug 1401 NEWT's DRM + GBM + EGL Driver - Using DRMLib, DRMUtil and DRMMode, removed most native code but WindowDriver swapBuffer - ScreenDriver uses DRMMode, however currently only first connected CRT. - WindowDriver aligns position and size to screen, positions other than 0/0 causes DRM failure - WindowDriver reconfigure n/a NEWT TODO: - DRM Cursor support (mouse pointer) - Pointer event handling
* Bug 1156: GBM: Bring up incl GL rendering (TODO: GBM working page flip / sync)Sven Gothel2019-11-231-13/+20
| | | | | | | | | | | | | | | | | - EGLSurface: Factor out 'eglCreate[Platform]WindowSurface' NEWT egl.gbm.WindowDriver -- Properly use GBM fourcc format and use as visualID for GBM surface creation and EGL config selection -- Create eglSurface within this class -- Hook up GBM/DRM page flip (not working yet, no visible artifacts - no swap) - ProxySurfaceImpl.surfaceSwap() call upstreamSurface's implementation if available TODO: 'Permission denied' calling: - drmSetMaster (optional) - drmModeSetCrtc - drmModePageFlip
* Bug 1156: EGL-GBM: Fix NativeWindowFactory native-window-type query ↵Sven Gothel2019-11-221-1/+1
| | | | | | | | | | | | | | | | | | according to Bug 1156 - Special files like '/dev/dri/card0' can't be tested via isFile(), use exists() Order for GNU/Linux (and other unices) IMHO is 1) Display Server (Vendor neutral) 1.1) running X11 display server (DISPLAY check enough?) 1.2) running WAYLAND display server (WAYLAND_DISPLAY check enough?) 2) Console Mode Vendor Neutral 2.1) GBM (how to check?) 3) Console Mode Vendor Specific 3.1) VCIV (how to check)
* Bug 1156: EGL-GBM: [Re]use EGL Platform type for ↵Sven Gothel2019-11-222-35/+66
| | | | eglCreatePlatformWindowSurface as well (like eglGetPlatformDisplay)
* Bug 1156: GBM: FIXME: Remove scanning for desktop-GL via EGL, see commit ↵Sven Gothel2019-11-221-1/+6
| | | | e674f4fa0e795bd67335025123f9af727d856f7d
* Bug 1156: Utilize internal glGetStringi (same as glGetString) - RobostnessSven Gothel2019-11-222-81/+130
| | | | | | | | | Using EGL-GBM, using desktop GL we end up with an unsatisfied linkage error after the ProcAddressTable has been reset using the 'hasMajor' and 'hasCtxOptions'. However looking up using 'reqMajor' and 'reqCtxOptions' seems to work. Needs more analysis. This change also increases robustness for scanning through GL profiles at initialization.
* Bug 1156: EGL-GBM: Fix Cleanup (Newt package relocation / hack default GBM)Sven Gothel2019-11-211-4/+5
| | | | Now: TYPE_EGL_GBM == ".egl.gbm"
* Bug 1156: EGL-GBM: Cleanup Code & Replace Newt GBM implementationSven Gothel2019-11-211-11/+18
| | | | | | GBM driver is now under egl/gbm subpackage and has been replaced by bcm_vc_iv boilerplate. Native code is reentrant capable and cleaned up. TODO: EGLDisplayUtil work with SharedResourceRunner
* detect gbm platform on linux when no other display server is runningErik De Rijcke2019-11-211-1/+22
|
* make void* an opaque long in EGL generated classErik De Rijcke2019-11-211-11/+9
|
* IOS: CGL.updateContextRegister(..) call on main-thread using AppKitSven Gothel2019-11-211-2/+21
|
* Buig 1389: Fix SIGSEGV on OpenJDK11 on [NSApplicationAWT sendEvent:]Sven Gothel2019-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | Culprit of the crash and the non propagated action on NSApp main-thread was _simply_ our OSXUtil_KickNSApp() 'kick alive' NSApplicationDefined NSEvent sent to the NSApp. Java11's NSApp code overrides sendEvent and handles NSApplicationDefined + subtype=ExecuteBlockEvent using the given data1 as a function pointer. 8-O ExecuteBlockEvent defined as 0, which we have sent. Simply passing subtype=8888 avoids this side-effect. Whether it is still required to KickNSApp() is another question. +++ Further, make code a bit more robuts regarding the offscreenSurfaceLayer at JAWTWindow invalidate. I.e. if still not detached, do the late cleanup there. This just in case the OSX Context callback to disassociate the drawable has been missed.
* Bug 1392: Simplify CapabilitiesFilter: Criteria -> Test, remove ↵Sven Gothel2019-09-072-11/+11
| | | | RemovalCriteria as all Test definitions may be used for anything.
* Bug 1392: X11PixmapGLXDrawable::createPixmap() requires ↵Sven Gothel2019-09-071-2/+2
| | | | | | | X11GLXGraphicsConfiguration having a valid XVisualInfo Therefor X11GLXGraphicsConfiguration::GLXFBConfig2GLCapabilities(..) also needs to clean the GLGraphicsConfigurationUtil.BITMAP_BIT from drawableTypeBits and if all removed, drop the FBConfig.
* Bug 1391 Bug 1392: Implement GLRendererQuirks DontChooseFBConfigBestMatch ↵Sven Gothel2019-09-078-69/+175
| | | | | | | | | and No10BitColorCompOffscreen Further enhance unit tests TestGLProfile03NEWTOffscreen, i.e. test all meta profile types on all offscreen drawable types (fbo, pbuffer and bitmap). Align unit test name numbers of TestGLProfile01NEWT to TestGLProfile03NEWTOffscreen.
* Bug 1392: Add CapabilitiesFilter and GLCapabilitiesFilter supporting diverse ↵Sven Gothel2019-09-071-0/+73
| | | | | | | | reusable [GL]CapabilitiesImmutable list filter To implement fix for Bug 1392, we have to remove certain GLCapabilitiesImmutable from the availability list. These filter provide a a clean reusable utility for the fix.
* Bug 1391: Cleanup to submit fix: Update known Quirk range; ↵Sven Gothel2019-09-073-11/+25
| | | | BuggyColorRenderbuffer enables NoFullFBOSupport
* Bug 1390: Fix GLPixelBuffer.GLPixelAttributes::convert(GL, int, boolean) ↵Sven Gothel2019-09-051-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | failure on unsupported GL data format/type GLPixelBuffer.GLPixelAttributes::convert(GL, int, boolean) failed on unsupported GL data format/type On Mesa/AMD for GLPBuffer chosen GLCaps used rgba 10/10/10/2 and the GLContext set default values: GL_IMPLEMENTATION_COLOR_READ_FORMAT: 0x1908 GL_RGBA GL_IMPLEMENTATION_COLOR_READ_TYPE: 0x8368 GL_UNSIGNED_INT_2_10_10_10_REV GLPixelBuffer.GLPixelAttributes::getPixelFormat(int format, int type) currently does not handle the type GL_UNSIGNED_INT_2_10_10_10_REV and hence returned a null PixelFormat. Therefor the ctor GLPixelAttributes failed and threw the exception: "Caught GLException: Could not find PixelFormat for format and/or type: PixelAttributes[fmt 0x1908, type 0x8368, null]" This fix has the GLContext default values pre-validated in the convert(..) method and to use default GL_RGBA and GL_UNSIGNED_BYTE fallback values if not supported. This is most important to be future proof. Later we may shall add these 32bit coding 2+10+10+10 and its reverse.
* Bug 1363: Java 11: JAWTUtil: Use sun.awt.SunToolkit.awtLock/Unlock and ↵Sven Gothel2019-09-041-58/+5
| | | | | | | | | | | | | | | disableBackgroundErase (impl. semantics) Commit 13c6bbbde5ea476d60e0a2f04a5172d3302d0edd simply removed the AWT commonly used SunToolkit lock/unlock methods, which was incorrect. It lead to certain resources access collisions as access has to be synchronized using the same reentry lock across AWT and NativeWindow/JOGL. We utilize the new com.jogamp.common.util.UnsafeUtil of GlueGen commit 07c1885e9a3d1f3a3853414648c06fb3864bc69f to disable the IllegalAccessLogger while fetching the methods/fields and making them accessible. JAWUtil also hosts access to SunToolkit's disableBackgroundAccess(Component) aligning the code for GLCanvas, NewtCanvasAWT and AWTCanvas.
* Bug 1384: Move remaining 'lose' property quirks into GLRendererQuirks.OverrideSven Gothel2019-08-233-42/+27
|
* Bug 1385: Limit Quirk GL3CompatNonCompliant to Mesa < 18.2.0Sven Gothel2019-08-231-3/+4
|
* Bug 1383: Tighten version/profile qualification: fail if: requested compat ↵Sven Gothel2019-08-231-2/+10
| | | | | | | | | | | | | | profile && has core profile On Mesa, if requesting a 3.1 compat profile, we receive a 4.5 core profile. This is natural due to constraints within glXCreateContextAttribsARB, i.e. GLX_CONTEXT_PROFILE_MASK_ARB is only a available for versions >= 3.2 and these are not available on Mesa. Tested with Mesa 18.3.6 of Debian 10 Buster, which also confirms Bug 1385 fix of limitating GL3CompatNonCompliant to Mesa < 18.2.0
* Bug 1383: Final fix: Always test GL3CompatNonCompliant and test on requested ↵Sven Gothel2019-08-222-2/+18
| | | | | | | | | | | | | | version/profile, also .. also, if requested version is within GL3CompatNonCompliant valid range, i.e. < 3.1, the detected actual version will be clipped for valid mapping to the requested data. Here it might be essential to know, that all versions are being 'scanned' via mapGLVersions from high to low. Therefor Version 3.0 would be tried before 2.0 and both will be mapped to the clipped actual version 3.0. The true actual version could be the maximum, however, using the very same would lead to trying an invalid unavailable GLProfile.
* Bug 1383: GLContextImpl.setGLFunctionAvailbility(..): Ensure only one ↵Sven Gothel2019-08-221-2/+33
| | | | | | | requested profile bit is set; Query GL_CONTEXT_PROFILE_MASK for hasCtxProfileBits and finally guess the GL profile bit if none could be determined: 'isESReq ? GLContext.CTX_PROFILE_ES : GLContext.CTX_PROFILE_COMPAT'
* Bug 1283: GLContextImpl.setGLFunctionAvailbility(..) calls: When leaving ↵Sven Gothel2019-08-225-6/+6
| | | | | | OpenGL version open, don't assume the profile The profile should be queried at runtime like the version in these situations.
* Bug 1383: GLContext.isValidGLVersion() ensure only one profile bit is set ↵Sven Gothel2019-08-221-1/+14
| | | | max; Add OpenGL version 4.6
* Bug 1383: Cleanup GLContextImpl.setGLFunctionAvailability(..): Parameter, ↵Sven Gothel2019-08-221-119/+151
| | | | | | | | | variables and clip at 180 line width This cleanup became necessary to re-analyse the code after quite some time. Using clear immutable input input parameters for the requested OpenGL version+profile and mutable current state 'has'.
* GLRendererQuirks: Fix typoSven Gothel2019-08-211-1/+1
|
* JoglVersion.getGLInfo: Increase robustness of debug outputSven Gothel2019-08-212-8/+20
|
* Bug 1384: Allow GLRendererQuirks to be overridden by user propertiesSven Gothel2019-08-212-69/+131
| | | | | | | | | | | | | | | | | | | | | Allow GLRendererQuirks to be overridden by user properties, allowing to either force (inject) a quirk by a user property or to ignore a quirk by a user property. This helps: - debugging certain quirk behavior (See Bug 1383) - allowing a user to customize the quirk setting +++ This patch also refines the quirk: GLNonCompliant -> GL3CompatNonCompliant, i.e. constraints its semantics to GL3 compatible context. +++ This patch also removed useless code of GLRendererQuirk, i.e. the 'int[] quirk' array arguments which are nonsense or wasteful, as we operate with bitmasks.
* Bug 1101: Add missing disposal of Pipelined_QuadRenderer's VBOsSven Gothel2019-08-201-3/+15
| | | | Original author is 'Tof'
* Removed illegal reflective access to sun.java2d.opengl.OGLUtilitiesWade Walker2019-08-191-31/+8
| | | | | | | | We were reading a variety of surface type definitions from sun.java2d.opengl.OGLUtilities using reflection, which has thrown warnings since Java 9 and which soon will become illegal. For now, just hard-coded these types to remove the warnings that happen during static initialization. Eventually the entire Java2D class will have to be revamped if we want to be able to actually use it.
* Removed references to non-existent method getPeer() in debug codeWade Walker2019-08-191-2/+2
|
* iOS: EAGLLayer FBO w/ DEPTH buffer workaround 1Sven Gothel2019-06-241-0/+10
| | | | | | | | | | | | | | | Notable bug as mentioned before: The FBO used and sharing the COLORBUFFER RENDERBUFFER memory resources with CAEAGLLayer to be displayed in the UIView seemingly cannot handle GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24 or GL_DEPTH_COMPONENT32 depth buffer - none at all (Device + Simulation). This workaround re-binds the used color renderbuffer for EAGLLayer presentation at the end of the FBO drawable instantiation. FBO DEPTH buffer works now as demonstrated w/ GearsES2. We have to issue one more test now, using a demo using an FBO itself.
* iOS: Clean up promotion of EAGLLayer use down to FBObjectSven Gothel2019-06-245-142/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial commit bba73bc096250a3c7fc036d84b1ea054d1b70b06 hacked its path using a context global EGLLayer instance attachement. The hack was good for the first demo, however, it forbid using other FBObjects etc on the way. Properly specifying FBObject.Attachment.StorageDefinition, allowing the user to inject code for selected FBO attachements to define their storage. This might be useful for different platforms as well - however, it is OS agnostic and instance specific now. In this sense, GLFBODrawableImpl, hosting FBObject, has a more specific instance of FBObject.Attachment.StorageDefinition for color-renderbuffer. It is passed along newly created color renderbuffer. GLDrawableFactoryImpl.createGLDrawable uses a derived interface, OnscreenFBOColorbufferStorageDefinition which is defined in IOSEAGLDrawableFactory and return by its getter. GLDrawableFactoryImpl.createGLDrawable is therefor platform agnostic again. Bottom line is, as more platforms will be added, these semi-public interfaces have to adapt to suit them all .. All this due to iOS architecture for 'onscreen rendering' using a FBO which shares its color renderbuffer storage with the EAGLLayer, associated with the UIView. A bit weird maybe in first sight, but efficient for creating cheap hardware design ;-) Only criticism here is that Apple didn't bother using EGL and an extension.
* iOS: Initial working commit supporting iOS (ipad pro 11)Sven Gothel2019-06-2317-114/+1663
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | using our OpenJFK 9 x86_64 and arm64 build. Test demo class is 'com.jogamp.opengl.demos.ios.Hello', residing in the new demo folder 'src/demos/com/jogamp/opengl/demos/ios/Hello.java'. This commit does not yet include a working NEWT specialization for iOS, but it shall followup soon. Instead this commit demonstrates JOGL operating on native UIWindow, UIView and CAEAGLLayer as provided by Nativewindow's IOSUtil. Test Video https://www.youtube.com/watch?v=Z4lUQNFTGMI +++ Notable bug: The FBO used and sharing the COLORBUFFER RENDERBUFFER memory resources with CAEAGLLayer to be displayed in the UIView seemingly cannot handle GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24 or GL_DEPTH_COMPONENT32 depth buffer - none at all (Device + Simulation). Therefor the default demo GLEventListener chosen here don't require a depth buffer ;-) This issue can hopefully be mitigated with other means than using a flat FBO sink similar to FBO multisampling.
* Bug 1381: Keep host PixelFormat functional using requested immutable ↵Sven Gothel2019-05-132-13/+34
| | | | alphaRequested + add appropriate API doc