aboutsummaryrefslogtreecommitdiffstats
path: root/src/demo/GPUTextNewtDemo01.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/demo/GPUTextNewtDemo01.java')
-rw-r--r--src/demo/GPUTextNewtDemo01.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/demo/GPUTextNewtDemo01.java b/src/demo/GPUTextNewtDemo01.java
index ad1020122..76593278f 100644
--- a/src/demo/GPUTextNewtDemo01.java
+++ b/src/demo/GPUTextNewtDemo01.java
@@ -27,9 +27,12 @@
*/
package demo;
+import java.io.IOException;
+
import javax.media.opengl.GL2ES2;
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;
@@ -47,7 +50,7 @@ public class GPUTextNewtDemo01 {
}
TextGLListener textGLListener = null;
-
+ GLWindow window;
public void testMe() {
GLProfile.initSingleton(true);
GLProfile glp = GLProfile.getGL2ES2();
@@ -57,7 +60,7 @@ public class GPUTextNewtDemo01 {
caps.setNumSamples(4); // 2 samples is not enough ..
System.out.println("Requested: "+caps);
- final GLWindow window = GLWindow.create(caps);
+ window = GLWindow.create(caps);
window.setPosition(10, 10);
window.setSize(500, 500);
@@ -95,5 +98,20 @@ public class GPUTextNewtDemo01 {
//gl.glEnable(GL2GL3.GL_SAMPLE_ALPHA_TO_ONE);
MSAATool.dump(drawable);
}
+
+ public void display(GLAutoDrawable drawable) {
+ super.display(drawable);
+
+ if(printScreen){
+ try {
+ super.printScreen(window, "./","r2t0-msaa1", false);
+ printScreen=false;
+ } catch (GLException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
}
}