summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-04-14 06:28:52 +0200
committerSven Gothel <[email protected]>2023-04-14 06:28:52 +0200
commit2209e1bdd5741913ea11fffd0a9bca9b2d18e83f (patch)
treeafa9a7f669441a8f3e20d0a9c243d509c0f63bc2
parent94e58738b8f7aa4db46081ab6f96d5f16e2b681e (diff)
GraphUI Demos: Use new Scene.screenshot(.. screen.nextScreenShotFile(..))
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java4
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03b.java7
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java2
4 files changed, 6 insertions, 9 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
index 173de4db2..c995d1012 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
@@ -186,7 +186,7 @@ public class FontView01 {
System.err.println("Grid "+grid);
System.err.println("Grid "+grid.getLayout());
System.err.println("Grid[0] "+grid.getShapes().get(0));
- scene.screenshot(true, options.renderModes, FontView01.class.getSimpleName());
+ scene.screenshot(true, scene.nextScreenshotFile(null, FontView01.class.getSimpleName(), options.renderModes, window.getChosenGLCapabilities(), null));
// stay open ..
}
}
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java
index 4bfe718d7..6a99fea71 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java
@@ -243,7 +243,7 @@ public class UISceneDemo03 {
window.invoke(true, (drawable) -> {
final GL2ES2 gl = drawable.getGL().getGL2ES2();
- scene.screenshot(gl, options.renderModes, UISceneDemo03.class.getSimpleName());
+ scene.screenshot(drawable.getGL(), scene.nextScreenshotFile(null, UISceneDemo03.class.getSimpleName(), options.renderModes, drawable.getChosenGLCapabilities(), null));
scene.removeShape(gl, l);
return true;
});
@@ -393,7 +393,7 @@ public class UISceneDemo03 {
final float has_dur_s = ((Clock.currentNanos() / 1000) - t0_us) / 1e6f; // [us]
System.err.printf("Text travel-duration %.3f s, %d chars%n", has_dur_s, originalTexts[txt_idx].length());
if( scene.getScreenshotCount() < 1 + originalTexts.length ) {
- scene.screenshot(true, options.renderModes, UISceneDemo03.class.getSimpleName());
+ scene.screenshot(true, scene.nextScreenshotFile(null, UISceneDemo03.class.getSimpleName(), options.renderModes, window.getChosenGLCapabilities(), null));
}
try { Thread.sleep(2000); } catch (final InterruptedException e1) { }
if( autoSpeed > 0 ) {
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03b.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03b.java
index a3fcbb1af..572592b48 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03b.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03b.java
@@ -248,7 +248,7 @@ public class UISceneDemo03b {
window.invoke(true, (drawable) -> {
final GL2ES2 gl = drawable.getGL().getGL2ES2();
- scene.screenshot(gl, options.renderModes, UISceneDemo03b.class.getSimpleName());
+ scene.screenshot(gl, scene.nextScreenshotFile(null, UISceneDemo03b.class.getSimpleName(), options.renderModes, drawable.getChosenGLCapabilities(), null));
scene.removeShape(gl, l);
return true;
});
@@ -267,9 +267,6 @@ public class UISceneDemo03b {
final float[] sDPI = MonitorDevice.perMMToPerInch( tmp );
dpiV = sDPI[1];
}
- final float s_w = sceneBox.getWidth();
- final float s_h = sceneBox.getHeight();
-
boolean z_only = true;
int txt_idx = 0;
@@ -483,7 +480,7 @@ public class UISceneDemo03b {
final float has_dur_s = ((Clock.currentNanos() / 1000) - t0_us) / 1e6f; // [us]
System.err.printf("Text travel-duration %.3f s, %d chars%n", has_dur_s, originalTexts[txt_idx].length());
if( scene.getScreenshotCount() < 1 + originalTexts.length ) {
- scene.screenshot(true, options.renderModes, UISceneDemo03b.class.getSimpleName());
+ scene.screenshot(true, scene.nextScreenshotFile(null, UISceneDemo03b.class.getSimpleName(), options.renderModes, window.getChosenGLCapabilities(), null));
}
try { Thread.sleep(2000); } catch (final InterruptedException e1) { }
if( autoSpeed > 0 ) {
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
index 0be93f06c..aa851482f 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
@@ -604,7 +604,7 @@ public class UISceneDemo20 implements GLEventListener {
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override
public void mouseClicked(final MouseEvent e) {
- scene.screenshot(true, renderModes, UISceneDemo20.class.getSimpleName());
+ scene.screenshot(true, scene.nextScreenshotFile(null, UISceneDemo20.class.getSimpleName(), options.renderModes, gl.getContext().getGLDrawable().getChosenGLCapabilities(), null));
} } );
button.addMouseListener(dragZoomRotateListener);
buttonsLeft.addShape(button);