diff options
author | Sven Gothel <[email protected]> | 2023-04-14 18:17:59 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-04-14 18:17:59 +0200 |
commit | a798d6bcbdccebe58d3a46ce07aedb574a15ef51 (patch) | |
tree | 7fea1e31f314d24eea06a87956a4f284d309f9a8 /src/demos/com/jogamp/opengl | |
parent | 92764721a1705e68c0dbf2fe77b22ded26e2f9b4 (diff) |
GraphUI Demo FontView01: Add screenshot per selected Glyph
Diffstat (limited to 'src/demos/com/jogamp/opengl')
-rw-r--r-- | src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java | 15 |
1 files changed, 9 insertions, 6 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 18a6c77d4..daf125e87 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java @@ -136,6 +136,13 @@ public class FontView01 { }); animator.add(window); + final Scene scene = new Scene(); + scene.setClearParams(new float[] { 1f, 1f, 1f, 1f}, GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); + scene.setFrustumCullingEnabled(true); + + scene.attachInputListenerTo(window); + window.addGLEventListener(scene); + final float[] ppmm = window.getPixelsPerMM(new float[2]); { final float[] dpi = FontScale.ppmmToPPI( new float[] { ppmm[0], ppmm[1] } ); @@ -223,17 +230,12 @@ public class FontView01 { // glyphCont.markShapeDirty(); // grid.markShapeDirty(); System.err.println(); + scene.screenshot(true, scene.nextScreenshotFile(null, FontView01.class.getSimpleName(), options.renderModes, window.getChosenGLCapabilities(), null)); } }); mainGrid.addShape(c); } - final Scene scene = new Scene(); - scene.setClearParams(new float[] { 1f, 1f, 1f, 1f}, GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); - scene.setFrustumCullingEnabled(true); - - scene.attachInputListenerTo(window); - window.addGLEventListener(scene); animator.start(); scene.waitUntilDisplayed(); @@ -263,6 +265,7 @@ public class FontView01 { infoGrid.setScale(icScale, icScale, 1f); } scene.addShape(infoGrid); + scene.screenshot(true, scene.nextScreenshotFile(null, FontView01.class.getSimpleName(), options.renderModes, window.getChosenGLCapabilities(), null)); // stay open .. } |