diff options
author | Sven Gothel <[email protected]> | 2013-09-03 15:24:10 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-09-03 15:24:10 +0200 |
commit | 54dcdf1f53c9fc1f7124cf77bbf5aa952d42053a (patch) | |
tree | 1acd6a02b71eb257b228231faed372a8e2355814 /src/jogl/classes | |
parent | 14eab8af439e6e7ce7ee08a9ca13fec3f3a80d25 (diff) |
GL*, GLContext: Expose isGL2ES3() and getGL2ES3() for convenience.
Diffstat (limited to 'src/jogl/classes')
3 files changed, 23 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java index 262fed934..b04f35230 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java @@ -657,6 +657,7 @@ public class BuildComposablePipeline { emitGLIsMethod(output, "GLES3"); emitGLIsMethod(output, "GL2ES1"); emitGLIsMethod(output, "GL2ES2"); + emitGLIsMethod(output, "GL2ES3"); emitGLIsMethod(output, "GL3ES3"); emitGLIsMethod(output, "GL4ES3"); emitGLIsMethod(output, "GL2GL3"); @@ -724,6 +725,7 @@ public class BuildComposablePipeline { emitGLGetMethod(output, "GLES3"); emitGLGetMethod(output, "GL2ES1"); emitGLGetMethod(output, "GL2ES2"); + emitGLGetMethod(output, "GL2ES3"); emitGLGetMethod(output, "GL3ES3"); emitGLGetMethod(output, "GL4ES3"); emitGLGetMethod(output, "GL2GL3"); diff --git a/src/jogl/classes/javax/media/opengl/GLBase.java b/src/jogl/classes/javax/media/opengl/GLBase.java index a9de70698..07dfc7e72 100644 --- a/src/jogl/classes/javax/media/opengl/GLBase.java +++ b/src/jogl/classes/javax/media/opengl/GLBase.java @@ -168,6 +168,12 @@ public interface GLBase { public boolean isGL2ES2(); /** + * Indicates whether this GL object conforms to a either a GL2GL3 or GL3ES3 compatible profile. + * @see GLContext#isGL2ES3() + */ + public boolean isGL2ES3(); + + /** * Indicates whether this GL object conforms to a GL3ES3 compatible profile. * @see GLContext#isGL3ES3() */ @@ -318,6 +324,12 @@ public interface GLBase { public GL2ES2 getGL2ES2() throws GLException; /** + * Casts this object to the GL2ES3 interface. + * @throws GLException if this object is not a GL2ES3 implementation + */ + public GL2ES3 getGL2ES3() throws GLException; + + /** * Casts this object to the GL3ES3 interface. * @throws GLException if this object is not a GL3ES3 implementation */ diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index 0c5459b57..f6c03b537 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -1114,6 +1114,15 @@ public abstract class GLContext { } /** + * Indicates whether this GLContext is capable of GL2ES3. <p>Includes [ GL4bc, GL4, GL3bc, GL3, GLES3, GL3ES3, GL2, GL2GL3 ].</p> + * @see GLProfile#isGL3ES3() + * @see GLProfile#isGL2GL3() + */ + public final boolean isGL2ES3() { + return isGL3ES3() || isGL2GL3(); + } + + /** * Indicates whether this GLContext is capable of GL3ES3. <p>Includes [ GL4bc, GL4, GL3bc, GL3, GLES3 ].</p> * @see GLProfile#isGL3ES3() */ |