aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLProfile.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-03-20 18:40:32 +0000
committerSven Gothel <[email protected]>2009-03-20 18:40:32 +0000
commite4d142fa647f470a9dd434fb89db4425c9b3f527 (patch)
tree97e58e551c50f145bed0bf5eb1948475579652df /src/jogl/classes/javax/media/opengl/GLProfile.java
parent3e71baf09a671f975654a20cdaae2e39263db620 (diff)
Fix GLProfile.isGL2ES[12](), adding GLProfile.hasGLSL()
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1896 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLProfile.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java11
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);
}