aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawableFactory.java2
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java11
2 files changed, 10 insertions, 3 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 5a3f9f4e9..7e46b822c 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -104,7 +104,7 @@ public abstract class GLDrawableFactory {
} catch (Exception e) {
e.printStackTrace();
}
- } else if (!GLProfile.isGL2() && !GLProfile.isGL2ES1() && !GLProfile.isGL2ES2()) {
+ } else if (!GLProfile.isGL2ES1() && !GLProfile.isGL2ES2()) {
// We require that the user passes in one of the known profiles
throw new GLException("Unknown or unsupported profile \"" + GLProfile.getProfile() + "\"");
}
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);
}