diff options
-rw-r--r-- | make/gl-impl-CustomJavaCode-common.java | 59 | ||||
-rw-r--r-- | make/gl-impl-CustomJavaCode-gl2.java | 44 | ||||
-rw-r--r-- | make/gl-impl-CustomJavaCode-gl2es12.java | 44 | ||||
-rwxr-xr-x | make/gl-impl-CustomJavaCode-gles1.java | 44 | ||||
-rwxr-xr-x | make/gl-impl-CustomJavaCode-gles2.java | 44 |
5 files changed, 176 insertions, 59 deletions
diff --git a/make/gl-impl-CustomJavaCode-common.java b/make/gl-impl-CustomJavaCode-common.java index 2ddfccc27..866fbc7ae 100644 --- a/make/gl-impl-CustomJavaCode-common.java +++ b/make/gl-impl-CustomJavaCode-common.java @@ -1,62 +1,3 @@ - public final boolean isGL2() { - return GLProfile.implementationOfGL2(this); - } - - public final boolean isGLES1() { - return GLProfile.implementationOfGLES1(this); - } - - public final boolean isGLES2() { - return GLProfile.implementationOfGLES2(this); - } - - public final boolean isGLES() { - return GLProfile.implementationOfGLES(this); - } - - public final boolean isGL2ES1() { - return GLProfile.implementationOfGL2ES1(this); - } - - public final boolean isGL2ES2() { - return GLProfile.implementationOfGL2ES2(this); - } - - public final GL2 getGL2() throws GLException { - if(!isGL2()) { - throw new GLException("Not a GL2 implementation"); - } - return (GL2)this; - } - - public final GLES1 getGLES1() throws GLException { - if(!isGLES1()) { - throw new GLException("Not a GLES1 implementation"); - } - return (GLES1)this; - } - - public final GLES2 getGLES2() throws GLException { - if(!isGLES2()) { - throw new GLException("Not a GLES2 implementation"); - } - return (GLES2)this; - } - - public final GL2ES1 getGL2ES1() throws GLException { - if(!isGL2ES1()) { - throw new GLException("Not a GL2ES1 implementation"); - } - return (GL2ES1)this; - } - - public final GL2ES2 getGL2ES2() throws GLException { - if(!isGL2ES2()) { - throw new GLException("Not a GL2ES2 implementation"); - } - return (GL2ES2)this; - } - public final boolean matchesProfile() { return matchesProfile(GLProfile.getProfile()); } diff --git a/make/gl-impl-CustomJavaCode-gl2.java b/make/gl-impl-CustomJavaCode-gl2.java index effeb93bb..a13ea7dff 100644 --- a/make/gl-impl-CustomJavaCode-gl2.java +++ b/make/gl-impl-CustomJavaCode-gl2.java @@ -20,6 +20,50 @@ public GL2Impl(GLContextImpl context) { this.bufferSizeTracker = context.getBufferSizeTracker(); } +public final boolean isGL2() { + return true; +} + +public final boolean isGLES1() { + return false; +} + +public final boolean isGLES2() { + return false; +} + +public final boolean isGLES() { + return false; +} + +public final boolean isGL2ES1() { + return true; +} + +public final boolean isGL2ES2() { + return true; +} + +public final GL2 getGL2() throws GLException { + return this; +} + +public final GLES1 getGLES1() throws GLException { + throw new GLException("Not a GLES1 implementation"); +} + +public final GLES2 getGLES2() throws GLException { + throw new GLException("Not a GLES2 implementation"); +} + +public final GL2ES1 getGL2ES1() throws GLException { + return this; +} + +public final GL2ES2 getGL2ES2() throws GLException { + return this; +} + public boolean isFunctionAvailable(String glFunctionName) { return _context.isFunctionAvailable(glFunctionName); } diff --git a/make/gl-impl-CustomJavaCode-gl2es12.java b/make/gl-impl-CustomJavaCode-gl2es12.java index 237e0f7e4..5248aa8fe 100644 --- a/make/gl-impl-CustomJavaCode-gl2es12.java +++ b/make/gl-impl-CustomJavaCode-gl2es12.java @@ -20,6 +20,50 @@ public GL2ES12Impl(GLContextImpl context) { this.bufferSizeTracker = context.getBufferSizeTracker(); } +public final boolean isGL2() { + return false; +} + +public final boolean isGLES1() { + return false; +} + +public final boolean isGLES2() { + return false; +} + +public final boolean isGLES() { + return false; +} + +public final boolean isGL2ES1() { + return true; +} + +public final boolean isGL2ES2() { + return true; +} + +public final GL2 getGL2() throws GLException { + throw new GLException("Not a GL2 implementation"); +} + +public final GLES1 getGLES1() throws GLException { + throw new GLException("Not a GLES1 implementation"); +} + +public final GLES2 getGLES2() throws GLException { + throw new GLException("Not a GLES2 implementation"); +} + +public final GL2ES1 getGL2ES1() throws GLException { + return this; +} + +public final GL2ES2 getGL2ES2() throws GLException { + return this; +} + public boolean isFunctionAvailable(String glFunctionName) { return _context.isFunctionAvailable(glFunctionName); } diff --git a/make/gl-impl-CustomJavaCode-gles1.java b/make/gl-impl-CustomJavaCode-gles1.java index b76127e24..f42ede8b3 100755 --- a/make/gl-impl-CustomJavaCode-gles1.java +++ b/make/gl-impl-CustomJavaCode-gles1.java @@ -3,6 +3,50 @@ public GLES1Impl(GLContextImpl context) { this.bufferSizeTracker = context.getBufferSizeTracker(); } +public final boolean isGL2() { + return false; +} + +public final boolean isGLES1() { + return true; +} + +public final boolean isGLES2() { + return false; +} + +public final boolean isGLES() { + return true; +} + +public final boolean isGL2ES1() { + return true; +} + +public final boolean isGL2ES2() { + return false; +} + +public final GL2 getGL2() throws GLException { + throw new GLException("Not a GL2 implementation"); +} + +public final GLES1 getGLES1() throws GLException { + return this; +} + +public final GLES2 getGLES2() throws GLException { + throw new GLException("Not a GLES2 implementation"); +} + +public final GL2ES1 getGL2ES1() throws GLException { + return this; +} + +public final GL2ES2 getGL2ES2() throws GLException { + throw new GLException("Not a GL2ES2 implementation"); +} + public boolean isFunctionAvailable(String glFunctionName) { return _context.isFunctionAvailable(glFunctionName); } diff --git a/make/gl-impl-CustomJavaCode-gles2.java b/make/gl-impl-CustomJavaCode-gles2.java index ea36745cd..358949568 100755 --- a/make/gl-impl-CustomJavaCode-gles2.java +++ b/make/gl-impl-CustomJavaCode-gles2.java @@ -8,6 +8,50 @@ public GLES2Impl(GLContextImpl context) { this.enableFixedFunctionEmulationMode(FIXED_EMULATION_MATRIX); } +public final boolean isGL2() { + return false; +} + +public final boolean isGLES1() { + return false; +} + +public final boolean isGLES2() { + return true; +} + +public final boolean isGLES() { + return true; +} + +public final boolean isGL2ES1() { + return false; +} + +public final boolean isGL2ES2() { + return true; +} + +public final GL2 getGL2() throws GLException { + throw new GLException("Not a GL2 implementation"); +} + +public final GLES1 getGLES1() throws GLException { + throw new GLException("Not a GLES1 implementation"); +} + +public final GLES2 getGLES2() throws GLException { + return this; +} + +public final GL2ES1 getGL2ES1() throws GLException { + throw new GLException("Not a GL2ES1 implementation"); +} + +public final GL2ES2 getGL2ES2() throws GLException { + return this; +} + public boolean isFunctionAvailable(String glFunctionName) { return _context.isFunctionAvailable(glFunctionName); } |