diff options
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLProfile.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLProfile.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index 1ac09c12e..8c5d8a3bf 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -201,12 +201,14 @@ public class GLProfile { return GLES2.equals(profile); } + /* Indicates whether a GL2ES1 capable profile is in use, ie GL2ES1, GL2, GLES1 */ public static final boolean isGL2ES1() { - return GL2ES1.equals(profile); + return GL2ES1.equals(profile) || isGL2() || isGLES1() ; } + /* Indicates whether a GL2ES2 capable profile is in use, ie GL2ES2, GL2, GLES2 */ public static final boolean isGL2ES2() { - return GL2ES2.equals(profile); + return GL2ES2.equals(profile) || isGL2() || isGLES2() ; } /** Indicates whether either of the OpenGL ES profiles are in use. */ @@ -214,6 +216,11 @@ public class GLProfile { return isGLES2() || isGLES1(); } + /** Indicates whether a GLSL capable profiles is in use. */ + public static final boolean hasGLSL() { + return isGL2ES2(); + } + public static final boolean matches(String test_profile) { return (null==test_profile)?false:test_profile.equals(profile); } |