aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-07-02 22:24:08 +0200
committerSven Gothel <[email protected]>2013-07-02 22:24:08 +0200
commit35fcf49d1cb49e3844e7cee44f34d827d8a102ce (patch)
tree1d58dedd28a0d3819431c7142387a5fa220a6718 /src/test
parent4c34f5980bddcdc84b10cb3bcbb96b365b9d471e (diff)
Bug 724: Add manual unit test, incr. PNGImage verbosity.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java13
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGImage00NEWT.java (renamed from src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGImage01NEWT.java)4
2 files changed, 10 insertions, 7 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java
index 622df8695..f6b6d2873 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java
@@ -56,14 +56,18 @@ public class TextureDraw01ES2Listener implements GLEventListener, TextureDraw01A
PMVMatrix pmvMatrix;
GLUniformData pmvMatrixUniform;
GLArrayDataServer interleavedVBO;
-
+ float[] clearColor = new float[] { 1.0f, 1.0f, 1.0f, 0.4f };
public TextureDraw01ES2Listener(TextureData td) {
this.textureData = td;
}
+
+ public void setClearColor(float[] clearColor) {
+ this.clearColor = clearColor;
+ }
static final String shaderBasename = "texture01_xxx";
-
+
private void initShader(GL2ES2 gl, boolean use_program) {
// Create & Compile the shader objects
ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, this.getClass(),
@@ -134,7 +138,7 @@ public class TextureDraw01ES2Listener implements GLEventListener, TextureDraw01A
st.ownAttribute(interleavedVBO, true);
// OpenGL Render Settings
- gl.glClearColor(0, 0, 0, 1);
+ gl.glClearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
gl.glEnable(GL2ES2.GL_DEPTH_TEST);
st.useProgram(gl, false);
}
@@ -164,8 +168,7 @@ public class TextureDraw01ES2Listener implements GLEventListener, TextureDraw01A
gl.glViewport(0, 0, width, height);
// Clear background to white
- gl.glClearColor(1.0f, 1.0f, 1.0f, 0.4f);
-
+ gl.glClearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
if(null != st) {
pmvMatrix.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
pmvMatrix.glLoadIdentity();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGImage01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGImage00NEWT.java
index 81f64f0ae..210d03afa 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGImage01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGImage00NEWT.java
@@ -12,7 +12,7 @@ import com.jogamp.common.util.IOUtil;
import com.jogamp.opengl.test.junit.util.UITestCase;
import com.jogamp.opengl.util.texture.spi.PNGImage;
-public class TestPNGImage01NEWT extends UITestCase {
+public class TestPNGImage00NEWT extends UITestCase {
@Test
public void testPNGReadWriteAndCompare() throws InterruptedException, IOException, MalformedURLException {
final File out1_f=new File(getSimpleTestName(".")+"-PNGImageTest1.png");
@@ -57,6 +57,6 @@ public class TestPNGImage01NEWT extends UITestCase {
}
public static void main(String args[]) {
- org.junit.runner.JUnitCore.main(TestPNGImage01NEWT.class.getName());
+ org.junit.runner.JUnitCore.main(TestPNGImage00NEWT.class.getName());
}
}