diff options
author | Sven Gothel <[email protected]> | 2010-04-17 01:32:26 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-17 01:32:26 +0200 |
commit | 8778a3d70f8d57bc4f9142a3f59ea59754f08c1d (patch) | |
tree | 29a0c7fe341fcabf217cba8a0c9774d77b3cb169 /src/jogl/classes/javax/media/opengl/GLProfile.java | |
parent | 60da84a5ca8fa5e74e995ad0343c8967ba9463a5 (diff) |
JOGL GL4 preperation (cont):
- Cont. on Context creation refactoring (bb028021be2714e66d9b1062298a3e308c649c56)
- Added Windows/WGL implementation
- Added efficienct sharedContext usage if ARB is available,
ie no more temp context has to be created.
- Added more GLProfile GL4* code ..
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLProfile.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLProfile.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index 231faab8c..e1fc9f53f 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -715,6 +715,8 @@ public class GLProfile implements Cloneable { private static final boolean isAWTAvailable; private static final boolean isAWTJOGLAvailable; + private static final boolean hasGL4bcImpl; + private static final boolean hasGL4Impl; private static final boolean hasGL3bcImpl; private static final boolean hasGL3Impl; private static final boolean hasGL2Impl; @@ -791,6 +793,8 @@ public class GLProfile implements Cloneable { } // FIXME: check for real GL3 availability .. ? + hasGL4bcImpl = hasDesktopGL && NWReflection.isClassAvailable("com.jogamp.opengl.impl.gl4.GL4bcImpl"); + hasGL4Impl = hasDesktopGL && NWReflection.isClassAvailable("com.jogamp.opengl.impl.gl4.GL4Impl"); hasGL3bcImpl = hasDesktopGL && NWReflection.isClassAvailable("com.jogamp.opengl.impl.gl3.GL3bcImpl"); hasGL3Impl = hasDesktopGL && NWReflection.isClassAvailable("com.jogamp.opengl.impl.gl3.GL3Impl"); hasGL2Impl = hasDesktopGL && NWReflection.isClassAvailable("com.jogamp.opengl.impl.gl2.GL2Impl"); @@ -837,6 +841,8 @@ public class GLProfile implements Cloneable { System.err.println("GLProfile.static hasNativeOSFactory "+hasNativeOSFactory); System.err.println("GLProfile.static hasDesktopGLES12 "+hasDesktopGLES12); System.err.println("GLProfile.static hasDesktopGL "+hasDesktopGL); + System.err.println("GLProfile.static hasGL4bcImpl "+hasGL4bcImpl); + System.err.println("GLProfile.static hasGL4Impl "+hasGL4Impl); System.err.println("GLProfile.static hasGL3bcImpl "+hasGL3bcImpl); System.err.println("GLProfile.static hasGL3Impl "+hasGL3Impl); System.err.println("GLProfile.static hasGL2Impl "+hasGL2Impl); @@ -891,6 +897,7 @@ public class GLProfile implements Cloneable { * Returns the profile implementation */ private static String computeProfileImpl(String profile) { + // FIXME Order of return profiles, after we can test their availability if (GL2ES1.equals(profile)) { if(hasGL2ES12Impl) { return GL2ES12; @@ -908,9 +915,21 @@ public class GLProfile implements Cloneable { return GL3; } else if(hasGL3bcImpl) { return GL3bc; + } else if(hasGL4Impl) { + return GL4; + } else if(hasGL4bcImpl) { + return GL4bc; } else if(hasGLES2Impl) { return GLES2; } + } else if(GL4bc.equals(profile) && hasGL4bcImpl) { + return GL4bc; + } else if(GL4.equals(profile)) { + if(hasGL4Impl) { + return GL4; + } else if(hasGL4bcImpl) { + return GL4bc; + } } else if(GL3bc.equals(profile) && hasGL3bcImpl) { return GL3bc; } else if(GL3.equals(profile)) { |