summaryrefslogtreecommitdiffstats
path: root/src/demo/GPUTextNewtDemo02.java
diff options
context:
space:
mode:
authorRami Santina <[email protected]>2011-03-28 11:49:57 +0300
committerRami Santina <[email protected]>2011-03-28 11:49:57 +0300
commit3bf42d92a3baf5e506f553fc20c71c082c39790e (patch)
tree6bc1f76b2fd1461a29530c090e498fac25c85f20 /src/demo/GPUTextNewtDemo02.java
parent23646bedac2fe9ff27e35ac167e6872afb84fc50 (diff)
Added print screen to TGA file to be used in junit
Diffstat (limited to 'src/demo/GPUTextNewtDemo02.java')
-rw-r--r--src/demo/GPUTextNewtDemo02.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/demo/GPUTextNewtDemo02.java b/src/demo/GPUTextNewtDemo02.java
index 1fbd253c9..4174da30b 100644
--- a/src/demo/GPUTextNewtDemo02.java
+++ b/src/demo/GPUTextNewtDemo02.java
@@ -27,10 +27,13 @@
*/
package demo;
+import java.io.IOException;
+
import javax.media.opengl.GL;
import javax.media.opengl.GL3;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLException;
import javax.media.opengl.GLProfile;
import com.jogamp.graph.curve.Region;
@@ -53,6 +56,7 @@ public class GPUTextNewtDemo02 {
public static void main(String[] args) {
GPUTextNewtDemo02 test = new GPUTextNewtDemo02();
test.testMe();
+
}
GLWindow window;
@@ -85,7 +89,7 @@ public class GPUTextNewtDemo02 {
private class TextGLListener extends GPUTextGLListenerBase01 {
public TextGLListener() {
super(SVertex.factory(), Region.TWO_PASS, DEBUG, TRACE);
- setMatrix(-10, 10, 0f, -1000, 190);
+ setMatrix(-10, 10, 0f, -1000, 400);
}
public void init(GLAutoDrawable drawable) {
@@ -102,5 +106,19 @@ public class GPUTextNewtDemo02 {
//gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL3.GL_NICEST);
MSAATool.dump(drawable);
}
+ public void display(GLAutoDrawable drawable) {
+ super.display(drawable);
+
+ if(printScreen){
+ try {
+ super.printScreen(window, "./","r2t1-msaa0", false);
+ printScreen=false;
+ } catch (GLException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
}
}