aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun')
-rw-r--r--src/classes/com/sun/opengl/impl/GLContextImpl.java17
-rw-r--r--src/classes/com/sun/opengl/impl/GLReflection.java4
-rw-r--r--src/classes/com/sun/opengl/impl/NativeLibLoader.java9
3 files changed, 11 insertions, 19 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java
index 5a4cd82fd..75b24c0af 100644
--- a/src/classes/com/sun/opengl/impl/GLContextImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java
@@ -229,22 +229,7 @@ public abstract class GLContextImpl extends GLContext {
//
private Object createInstance(String suffix, Class[] cstrArgTypes, Object[] cstrArgs) {
- String clazzName = null;
-
- try {
- if(GLProfile.isGL2()) {
- clazzName="com.sun.opengl.impl.gl2.GL2"+suffix;
- } else if(GLProfile.isGLES1()) {
- clazzName="com.sun.opengl.impl.es1.GLES1"+suffix;
- } else if(GLProfile.isGLES1()) {
- clazzName="com.sun.opengl.impl.es2.GLES2"+suffix;
- } else {
- throw new GLUnsupportedException("uncovered profile");
- }
- return GLReflection.createInstance(clazzName, cstrArgTypes, cstrArgs);
- } catch (Exception e) {
- throw new GLException(e);
- }
+ return GLReflection.createInstance(GLProfile.getGLImplBaseClassName()+suffix, cstrArgTypes, cstrArgs);
}
/** Create the GL for this context. */
diff --git a/src/classes/com/sun/opengl/impl/GLReflection.java b/src/classes/com/sun/opengl/impl/GLReflection.java
index bbcb7c8ea..256a9b9af 100644
--- a/src/classes/com/sun/opengl/impl/GLReflection.java
+++ b/src/classes/com/sun/opengl/impl/GLReflection.java
@@ -44,9 +44,7 @@ public final class GLReflection {
public static final boolean isClassAvailable(String clazzName) {
try {
Class clazz = Class.forName(clazzName);
- if (null!=clazz) {
- return true;
- }
+ return null!=clazz;
} catch (Exception e) { }
return false;
}
diff --git a/src/classes/com/sun/opengl/impl/NativeLibLoader.java b/src/classes/com/sun/opengl/impl/NativeLibLoader.java
index 6a1270ac2..6327c17d2 100644
--- a/src/classes/com/sun/opengl/impl/NativeLibLoader.java
+++ b/src/classes/com/sun/opengl/impl/NativeLibLoader.java
@@ -124,6 +124,15 @@ public class NativeLibLoader {
});
}
+ public static void loadGL2ES12() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_gl2es12", null, false, false);
+ return null;
+ }
+ });
+ }
+
public static void loadES2() {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {