diff options
author | Sven Gothel <[email protected]> | 2014-09-24 01:25:49 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-24 01:25:49 +0200 |
commit | 546f9b1a03c46b63f8bb18c1b8e2c80a8b66cf7c (patch) | |
tree | 9d4b5f909b1b58addf748bccfb9e1facc770caa6 /src/test/com | |
parent | 8e9407ab74f672c2a0d1e196a3ba2e7d8743debf (diff) |
Fix all backward compatibility issues w/ 2.2.0 and 2.2.1
- Preserve fields, but make them deprecated and don't use them anymore.
Using a new version with less visibility.
- Revert incompatible method prototype changes
- GLFBODrawable:
- Completly remove FBOMODE_DEFAULT and FBOMODE_USE_DEPTH usage
and deprecate them
- GLRendererQuirks:
- Completly remove COUNT usage and deprecate it.
- Add getCount() method for future compatibility.
Diffstat (limited to 'src/test/com')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOAutoDrawableFactoryNEWT.java | 14 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/acore/TestVersionSemanticsNOUI.java | 26 |
2 files changed, 25 insertions, 15 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOAutoDrawableFactoryNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOAutoDrawableFactoryNEWT.java index a46c5a750..327fecd25 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOAutoDrawableFactoryNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOAutoDrawableFactoryNEWT.java @@ -76,7 +76,7 @@ public class TestFBOAutoDrawableFactoryNEWT extends UITestCase { final GLProfile glp = GLProfile.getGL2ES2(); final GLCapabilities caps = new GLCapabilities(glp); caps.setDoubleBuffered(false); - testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_DEFAULT, new GearsES2(0)); + testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_USE_TEXTURE, new GearsES2(0)); } @Test public void test01b_GL2ES2_Demo1_SingleBuffer_NoTex() throws InterruptedException { @@ -99,7 +99,7 @@ public class TestFBOAutoDrawableFactoryNEWT extends UITestCase { final GLProfile glp = GLProfile.getGL2ES2(); final GLCapabilities caps = new GLCapabilities(glp); caps.setDoubleBuffered(true); // default - testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_DEFAULT, new GearsES2(0)); + testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_USE_TEXTURE, new GearsES2(0)); } @Test @@ -108,7 +108,7 @@ public class TestFBOAutoDrawableFactoryNEWT extends UITestCase { final GLCapabilities caps = new GLCapabilities(glp); caps.setSampleBuffers(true); caps.setNumSamples(4); - testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_DEFAULT, new MultisampleDemoES2(true)); + testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_USE_TEXTURE, new MultisampleDemoES2(true)); } @Test public void test03b_GL2ES2_Demo2MSAA4_NoTex() throws InterruptedException { @@ -136,7 +136,7 @@ public class TestFBOAutoDrawableFactoryNEWT extends UITestCase { final GLCapabilities caps = new GLCapabilities(glp); caps.setSampleBuffers(true); caps.setNumSamples(4); - testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_DEFAULT, demo); + testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_USE_TEXTURE, demo); } @Test @@ -144,7 +144,7 @@ public class TestFBOAutoDrawableFactoryNEWT extends UITestCase { if( GLProfile.isAvailable(GLProfile.GLES2) ) { final GLProfile glp = GLProfile.get(GLProfile.GLES2); final GLCapabilities caps = new GLCapabilities(glp); - testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_DEFAULT, new GearsES2(0)); + testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_USE_TEXTURE, new GearsES2(0)); } else { System.err.println("EGL ES2 n/a"); } @@ -157,7 +157,7 @@ public class TestFBOAutoDrawableFactoryNEWT extends UITestCase { final GLCapabilities caps = new GLCapabilities(glp); caps.setSampleBuffers(true); caps.setNumSamples(4); - testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_DEFAULT, new GearsES2(0)); + testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_USE_TEXTURE, new GearsES2(0)); } else { System.err.println("EGL ES2 n/a"); } @@ -168,7 +168,7 @@ public class TestFBOAutoDrawableFactoryNEWT extends UITestCase { if( GLProfile.isAvailable(GLProfile.GL3) ) { final GLProfile glp = GLProfile.get(GLProfile.GL3); final GLCapabilities caps = new GLCapabilities(glp); - testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_DEFAULT, new GearsES2(0)); + testGLFBODrawableImpl(caps, GLFBODrawable.FBOMODE_USE_TEXTURE, new GearsES2(0)); } else { System.err.println("GL3 n/a"); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestVersionSemanticsNOUI.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestVersionSemanticsNOUI.java index 403a93687..865758485 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestVersionSemanticsNOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestVersionSemanticsNOUI.java @@ -55,16 +55,10 @@ public class TestVersionSemanticsNOUI extends JunitTracer { static final JogampVersion curVersion = JoglVersion.getInstance(); static final VersionNumberString curVersionNumber = new VersionNumberString(curVersion.getImplementationVersion()); - static final Set<String> excludesDefault, excludeV221toV222; + static final Set<String> excludesDefault; static { excludesDefault = new HashSet<String>(); excludesDefault.add("^\\Qjogamp/\\E.*$"); - - excludeV221toV222 = new HashSet<String>(); - excludeV221toV222.add("^\\Qjogamp/\\E.*$"); - excludeV221toV222.add("^\\Qcom/jogamp/opengl/GLRendererQuirks\\E$"); // COUNT increased by one - excludeV221toV222.add("^\\Qcom/jogamp/opengl/util/Animator\\E$"); // pauseIssued -> volatile - excludeV221toV222.add("^\\Qjavax/media/opengl/GLFBODrawable\\E$"); // FBOMODE_DEFAULT (removed USE_DEPTH) } @@ -109,6 +103,22 @@ public class TestVersionSemanticsNOUI extends JunitTracer { } @Test + public void testVersionV220V222() throws IllegalArgumentException, IOException, URISyntaxException { + // static final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE; + final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER; + + final VersionNumberString preVersionNumber = new VersionNumberString("2.2.0"); + final File previousJar = new File("lib/v"+preVersionNumber.getVersionString()+"/"+jarFile); + + final ClassLoader currentCL = TestVersionSemanticsNOUI.class.getClassLoader(); + + VersionSemanticsUtil.testVersion(diffCriteria, expectedCompatibilityType, + previousJar, preVersionNumber, + curVersion.getClass(), currentCL, curVersionNumber, + excludesDefault); + } + + @Test public void testVersionV221V222() throws IllegalArgumentException, IOException, URISyntaxException { // static final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE; final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.BACKWARD_COMPATIBLE_USER; @@ -121,7 +131,7 @@ public class TestVersionSemanticsNOUI extends JunitTracer { VersionSemanticsUtil.testVersion(diffCriteria, expectedCompatibilityType, previousJar, preVersionNumber, curVersion.getClass(), currentCL, curVersionNumber, - excludeV221toV222); + excludesDefault); } public static void main(final String args[]) throws IOException { |