aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-12-28 04:16:18 +0100
committerSven Gothel <[email protected]>2019-12-28 04:16:18 +0100
commite2223107cc54e08031bd9505ce8a9ccc72673be0 (patch)
tree735fdd776ce7a4ad8db137bfcbc6a62d7c5877c5 /src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
parent50f9c9e113b09ab54ba40abba6b2face27c9a139 (diff)
Bug 1347: Resolve Merged EGL/Desktop Profile Mapping
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'.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index 026776769..b0c5d1928 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -659,7 +659,9 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
}
if( mappedToDefaultDevice[0] ) {
- EGLContext.remapAvailableGLVersions(defaultDevice, adevice);
+ // map all GL versions (ES, CORE or COMPAT) to 'adevice' if not existing (no overwrite)
+ EGLContext.remapAvailableGLVersions(defaultDevice, adevice, false /* overwrite */,
+ EGLContext.CTX_PROFILE_ES | EGLContext.CTX_PROFILE_CORE | EGLContext.CTX_PROFILE_COMPAT );
sr = defaultSharedResource;
} else {
if( hasX11 ) {