summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-01-23 15:10:20 +0100
committerSven Gothel <[email protected]>2015-01-23 15:10:20 +0100
commitec138f2f5c38a677d840e8719292031d91befaa8 (patch)
tree176ab71efb8fac231bf625f5deb3d7f38129a2fd /src/jogl/classes/javax/media/opengl
parent3471ee732ab1b642a37066c70acbb749eb696d21 (diff)
Simplify GLDrawable[Impl|Factory].getGLDynamicLookupHelper(..)
- Using GLDrawableFactory.getGLDynamicLookupHelper(String profileName) - Based on String GLProfile name - throws GLException if no lookup handler installed (EGL) - final implementation of GLDrawableImpl.getGLDynamicLookupHelper() using getGLProfile().getImplName()
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLContext.java4
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java10
2 files changed, 5 insertions, 9 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index 01e0e8270..a71961122 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -1643,9 +1643,7 @@ public abstract class GLContext {
synchronized ( deviceVersionsAvailableSet ) {
final String devKey = device.getUniqueID();
if( set ) {
- if( null != deviceVersionsAvailableSet.put(devKey, devKey) ) {
- throw new InternalError("Already set: "+devKey);
- }
+ deviceVersionsAvailableSet.put(devKey, devKey);
} else {
deviceVersionsAvailableSet.remove(devKey);
}
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 7f29bb7dc..9df2a84d6 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -1745,7 +1745,7 @@ public class GLProfile {
try {
desktopFactory = (GLDrawableFactoryImpl) GLDrawableFactory.getFactoryImpl(GL2);
if(null != desktopFactory) {
- final DesktopGLDynamicLookupHelper glLookupHelper = (DesktopGLDynamicLookupHelper) desktopFactory.getGLDynamicLookupHelper(0);
+ final DesktopGLDynamicLookupHelper glLookupHelper = (DesktopGLDynamicLookupHelper) desktopFactory.getGLDynamicLookupHelper(GL2);
if(null!=glLookupHelper) {
hasDesktopGLFactory = glLookupHelper.isLibComplete() && hasGL234Impl;
}
@@ -1782,8 +1782,8 @@ public class GLProfile {
if(null != eglFactory) {
hasEGLFactory = true;
// update hasGLES1Impl, hasGLES3Impl based on EGL
- hasGLES3Impl = null!=eglFactory.getGLDynamicLookupHelper(2) && hasGLES3Impl;
- hasGLES1Impl = null!=eglFactory.getGLDynamicLookupHelper(1) && hasGLES1Impl;
+ hasGLES3Impl = null!=eglFactory.getGLDynamicLookupHelper(GLES2) && hasGLES3Impl;
+ hasGLES1Impl = null!=eglFactory.getGLDynamicLookupHelper(GLES1) && hasGLES1Impl;
}
} catch (final LinkageError le) {
t=le;
@@ -1961,9 +1961,7 @@ public class GLProfile {
}
}
- if(!GLContext.getAvailableGLVersionsSet(device)) {
- GLContext.setAvailableGLVersionsSet(device, true);
- }
+ GLContext.setAvailableGLVersionsSet(device, true);
if (DEBUG) {
System.err.println("GLProfile.initProfilesForDevice: "+device.getConnection()+": added profile(s): desktop "+addedDesktopProfile+", egl "+addedEGLProfile);