diff options
author | Sven Gothel <[email protected]> | 2008-07-21 00:18:02 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-07-21 00:18:02 +0000 |
commit | 3e43ef1a81bca32d2840c714c8e791d192ad88cc (patch) | |
tree | f607023a72696db5112b0e1f2236f0e4467964a3 /src/classes/com/sun/opengl/impl | |
parent | de0eaef37caf13314114ab37cc53edc48610a7bf (diff) |
- New profile GL2ES12 (desktop)
- Intersection of GL2 + GLES1 + GLES2
- Common set of GLES1 + GLES2
- Utilized new 'ExtendedInterfaceSymbolsOnly' gluegen config
- DroppingUniqVendorExtension + 3DFX + APPLE
- Some APPLE enumerates are manually provided!
- Removing of 'jogl.oswin.jar' - since it is redundant now!
- Proper partitioning of 'jogl.gl2' and 'jogl.gl2es12' for
- x11, win and osx
- Profile selection/trial for e.g. GL2ES1 is now in the following order:
1) GLES1
2) GL2ES12
3) GL2
- Footprint for all profiles below 1/2 MB,
NEWT:
ES1: 284 kB
ES2: 280 kB
GL2ES12: 332 kB
GL2: 456 kB
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1729 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl')
-rw-r--r-- | src/classes/com/sun/opengl/impl/GLContextImpl.java | 17 | ||||
-rw-r--r-- | src/classes/com/sun/opengl/impl/GLReflection.java | 4 | ||||
-rw-r--r-- | src/classes/com/sun/opengl/impl/NativeLibLoader.java | 9 |
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() { |