summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2013-03-20 02:50:28 +0100
committerSven Gothel <[email protected]>2013-03-20 02:50:28 +0100
commit6d85470b2cb58670fd326b66ccbb396e24139014 (patch)
treed88ced43eab04210b0370126a387154b80518a21 /src/test/com
parent1a1557cd9e31bd7975d858b7b2d49e586805bba4 (diff)
Handles indexed PNGs
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java68
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscP301-160x90.pngbin0 -> 1898 bytes
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscP401-160x90.pngbin0 -> 1911 bytes
3 files changed, 68 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java
index fe21f86a9..15a0eec50 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java
@@ -64,6 +64,10 @@ public class TestPNGTextureFromFileNEWT extends UITestCase {
InputStream testTextureStreamN;
InputStream testTextureStreamI;
InputStream testTextureStreamIG;
+ InputStream testTextureStreamPRGB;
+ InputStream testTextureStreamPRGBA;/*
+ InputStream testTextureStreamNRGBA;
+ InputStream testTextureStreamIRGBA;*/
@Before
public void initTest() throws IOException {
@@ -87,6 +91,30 @@ public class TestPNGTextureFromFileNEWT extends UITestCase {
testTextureStreamIG = testTextureUrlConn.getInputStream();
Assert.assertNotNull(testTextureStreamIG);
}
+ {
+ URLConnection testTextureUrlConn = IOUtil.getResource(this.getClass(), "test-ntscP301-160x90.png");
+ Assert.assertNotNull(testTextureUrlConn);
+ testTextureStreamPRGB = testTextureUrlConn.getInputStream();
+ Assert.assertNotNull(testTextureStreamPRGB);
+ }
+ {
+ URLConnection testTextureUrlConn = IOUtil.getResource(this.getClass(), "test-ntscP401-160x90.png");
+ Assert.assertNotNull(testTextureUrlConn);
+ testTextureStreamPRGBA = testTextureUrlConn.getInputStream();
+ Assert.assertNotNull(testTextureStreamPRGBA);
+ }
+ /*{
+ URLConnection testTextureUrlConn = IOUtil.getResource(this.getClass(), "test-ntscN401-160x90.png");
+ Assert.assertNotNull(testTextureUrlConn);
+ testTextureStreamNRGBA = testTextureUrlConn.getInputStream();
+ Assert.assertNotNull(testTextureStreamNRGBA);
+ }
+ {
+ URLConnection testTextureUrlConn = IOUtil.getResource(this.getClass(), "test-ntscI401-160x90.png");
+ Assert.assertNotNull(testTextureUrlConn);
+ testTextureStreamIRGBA = testTextureUrlConn.getInputStream();
+ Assert.assertNotNull(testTextureStreamIRGBA);
+ }*/
}
@After
@@ -95,6 +123,10 @@ public class TestPNGTextureFromFileNEWT extends UITestCase {
testTextureStreamN = null;
testTextureStreamI = null;
testTextureStreamIG = null;
+ testTextureStreamPRGB = null;
+ testTextureStreamPRGBA = null;/*
+ testTextureStreamNRGBA = null;
+ testTextureStreamIRGBA = null;*/
}
public void testImpl(boolean useFFP, final InputStream istream) throws InterruptedException, IOException {
@@ -190,6 +222,42 @@ public class TestPNGTextureFromFileNEWT extends UITestCase {
testImpl(false, testTextureStreamIG);
}
+ @Test
+ public void testTestPRGB_PNGJLoaderGL2() throws InterruptedException, IOException {
+ testImpl(true, testTextureStreamPRGB);
+ }
+ @Test
+ public void testTestPRGB_PNGJLoaderES2() throws InterruptedException, IOException {
+ testImpl(false, testTextureStreamPRGB);
+ }
+
+ @Test
+ public void testTestPRGBA_PNGJLoaderGL2() throws InterruptedException, IOException {
+ testImpl(true, testTextureStreamPRGBA);
+ }
+ @Test
+ public void testTestPRGBA_PNGJLoaderES2() throws InterruptedException, IOException {
+ testImpl(false, testTextureStreamPRGBA);
+ }
+
+ /*@Test
+ public void testTestNRGBA_PNGJLoaderGL2() throws InterruptedException, IOException {
+ testImpl(true, testTextureStreamNRGBA);
+ }
+ @Test
+ public void testTestNRGBA_PNGJLoaderES2() throws InterruptedException, IOException {
+ testImpl(false, testTextureStreamNRGBA);
+ }
+
+ @Test
+ public void testTestIRGBA_PNGJLoaderGL2() throws InterruptedException, IOException {
+ testImpl(true, testTextureStreamIRGBA);
+ }
+ @Test
+ public void testTestIRGBA_PNGJLoaderES2() throws InterruptedException, IOException {
+ testImpl(false, testTextureStreamIRGBA);
+ }*/
+
public static void main(String args[]) throws IOException {
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscP301-160x90.png b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscP301-160x90.png
new file mode 100644
index 000000000..32e7f0042
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscP301-160x90.png
Binary files differ
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscP401-160x90.png b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscP401-160x90.png
new file mode 100644
index 000000000..55405ee89
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscP401-160x90.png
Binary files differ