summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLContext.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index 55050f25c..e83d60b66 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -118,20 +118,20 @@ public abstract class GLContext {
/** Indicates that a newly-created context was made current during the last call to {@link #makeCurrent makeCurrent}, value {@value}. */
public static final int CONTEXT_CURRENT_NEW = 2;
- /* Version 1.00, i.e. GLSL 1.00 for ES 2.0. */
+ /** Version 1.00, i.e. GLSL 1.00 for ES 2.0. */
public static final VersionNumber Version100 = new VersionNumber(1, 0, 0);
- /* Version 1.10, i.e. GLSL 1.10 for GL 2.0. */
+ /** Version 1.10, i.e. GLSL 1.10 for GL 2.0. */
public static final VersionNumber Version110 = new VersionNumber(1, 10, 0);
- /* Version 1.20, i.e. GLSL 1.20 for GL 2.1. */
+ /** Version 1.20, i.e. GLSL 1.20 for GL 2.1. */
public static final VersionNumber Version120 = new VersionNumber(1, 20, 0);
- /* Version 1.30, i.e. GLSL 1.30 for GL 3.0. */
+ /** Version 1.30, i.e. GLSL 1.30 for GL 3.0. */
public static final VersionNumber Version130 = new VersionNumber(1, 30, 0);
- /* Version 1.40, i.e. GLSL 1.40 for GL 3.1. */
+ /** Version 1.40, i.e. GLSL 1.40 for GL 3.1. */
public static final VersionNumber Version140 = new VersionNumber(1, 40, 0);
- /* Version 1.50, i.e. GLSL 1.50 for GL 3.2. */
+ /** Version 1.50, i.e. GLSL 1.50 for GL 3.2. */
public static final VersionNumber Version150 = new VersionNumber(1, 50, 0);
- /** Version 3.0. As an OpenGL version, it qualifies for desktop {@link #isGL2()} only, or ES 3.0. */
+ /** Version 3.0. As an OpenGL version, it qualifies for desktop {@link #isGL2()} only, or ES 3.0. Or GLSL 3.00 for ES 3.0. */
public static final VersionNumber Version300 = new VersionNumber(3, 0, 0);
/** Version 3.1. As an OpenGL version, it qualifies for {@link #isGL3core()}, {@link #isGL3bc()} and {@link #isGL3()} */
@@ -749,7 +749,8 @@ public abstract class GLContext {
* <p>
* Examples w/ <code>major.minor</code>:
* <pre>
- * 1.00 (ES 2.0), 1.10 (GL 2.0), 1.20 (GL 2.1), 1.50 (GL 3.2),
+ * 1.00 (ES 2.0), 3.00 (ES 3.0)
+ * 1.10 (GL 2.0), 1.20 (GL 2.1), 1.50 (GL 3.2),
* 3.30 (GL 3.3), 4.00 (GL 4.0), 4.10 (GL 4.1), 4.20 (GL 4.2)
* </pre >
* </p>
@@ -800,7 +801,9 @@ public abstract class GLContext {
protected static final VersionNumber getStaticGLSLVersionNumber(int glMajorVersion, int glMinorVersion, int ctxOptions) {
if( 0 != ( CTX_PROFILE_ES & ctxOptions ) ) {
- if( 3 > glMajorVersion ) {
+ if( 3 == glMajorVersion ) {
+ return Version300; // ES 3.0 -> GLSL 3.00
+ } else if( 2 == glMajorVersion ) {
return Version100; // ES 2.0 -> GLSL 1.00
}
} else if( 1 == glMajorVersion ) {
@@ -850,11 +853,12 @@ public abstract class GLContext {
}
/**
- * @return true if context supports GLSL, i.e. is either {@link #isGLES2()}, {@link #isGL3()} or {@link #isGL2()} <i>and</i> major-version > 1.
+ * @return true if context supports GLSL, i.e. is either {@link #isGLES3()}, {@link #isGLES2()}, {@link #isGL3()} or {@link #isGL2()} <i>and</i> major-version > 1.
* @see GLProfile#hasGLSL()
*/
public final boolean hasGLSL() {
- return isGLES2() ||
+ return isGLES3() ||
+ isGLES2() ||
isGL3() ||
isGL2() && ctxVersion.getMajor()>1 ;
}