diff options
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLProfile.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLProfile.java | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index ead5f6396..756c80009 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -78,10 +78,13 @@ public class GLProfile implements Cloneable { /** The intersection of the desktop GL3, GL2 and embedded ES2 profile */ public static final String GL2ES2 = "GL2ES2"; + /** The intersection of the desktop GL3 and GL2 profile */ + public static final String GL2GL3 = "GL2GL3"; + /** - * All GL Profiles in the order of default detection: GL2, GL2ES2, GL2ES1, GLES2, GLES1, GL3 + * All GL Profiles in the order of default detection: GL2, GL2ES2, GL2ES1, GLES2, GLES1, GL2GL3, GL3 */ - public static final String[] GL_PROFILE_LIST_ALL = new String[] { GL2, GL2ES2, GL2ES1, GLES2, GLES1, GL3 }; + public static final String[] GL_PROFILE_LIST_ALL = new String[] { GL2, GL2ES2, GL2ES1, GLES2, GLES1, GL2GL3, GL3 }; /** * All GL2ES2 Profiles in the order of default detection: GL2ES2, GL2, GLES2, GL3 @@ -273,6 +276,11 @@ public class GLProfile implements Cloneable { return GL2ES2.equals(profile) || isGL2() || isGL3() || isGLES2() ; } + /** Indicates whether this profile is capable os GL2GL3. */ + public final boolean isGL2GL3() { + return GL2GL3.equals(profile) || isGL2() || isGL3() ; + } + /** Indicates whether this profile uses the native OpenGL ES1 implementations. */ public final boolean usesNativeGLES1() { return GLES1.equals(profileImpl) || GL2ES1.equals(profileImpl) ; @@ -709,6 +717,8 @@ public class GLProfile implements Cloneable { System.err.println("GLProfile.static hasGL3Impl "+hasGL3Impl); System.err.println("GLProfile.static hasGL2Impl "+hasGL2Impl); System.err.println("GLProfile.static hasGL2ES12Impl "+hasGL2ES12Impl); + System.err.println("GLProfile.static hasEGLDynLookup "+hasEGLDynLookup); + System.err.println("GLProfile.static hasEGLDrawableFactory "+hasEGLDrawableFactory); System.err.println("GLProfile.static hasGLES2Impl "+hasGLES2Impl); System.err.println("GLProfile.static hasGLES1Impl "+hasGLES1Impl); } @@ -758,10 +768,10 @@ public class GLProfile implements Cloneable { */ private static String computeProfileImpl(String profile) { if (GL2ES1.equals(profile)) { - if(hasGL2Impl) { - return GL2; - } else if(hasGL2ES12Impl) { + if(hasGL2ES12Impl) { return GL2ES12; + } else if(hasGL2Impl) { + return GL2; } else if(hasGLES1Impl) { return GLES1; } @@ -779,6 +789,8 @@ public class GLProfile implements Cloneable { return GL3; } else if(GL2.equals(profile) && hasGL2Impl) { return GL2; + } else if(GL2GL3.equals(profile) && hasGL2Impl) { + return GL2; } else if(GLES2.equals(profile) && hasGLES2Impl) { return GLES2; } else if(GLES1.equals(profile) && hasGLES1Impl) { |