From 6ef3c22ac6d633f8c0b903b34d5e3d7736f3a040 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 Sep 2013 04:36:19 +0200 Subject: GLCanvas Printing WIP: Swap to offscreen at setupPrint(); Use TileRenderer @ print(..); Test: Add auto-print w/o UI 72dpi and 300dpi NOTE: Tile raster is added at print plus lots of debug output - WIP! - Swap to offscreen at setupPrint() - Swap GLEventListener (GLEL) and GLContext to fixed size offscreen GLAutoDrawable (GLAD) - Destroy onscreen drawable/context - Setup TileRenderer w/ offscreen GLAD - @ releasePrint() restore onscreen .. This shall ensure we don't hog the GPU resources when resizing the AWT component (upscaling). - Use TileRenderer @ print(..) The clip-rect will be used as the TileRenderer's image-size and we perform a whole tile-rendering loop. This helps to limit resources, see above. - Test: Add auto-print w/o UI 72dpi and 300dpi --- make/scripts/tests.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'make') diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 12eddbf9b..2921bd409 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -216,7 +216,7 @@ function jrun() { #D_ARGS="-Djogl.debug.GLContext -Dnewt.debug=all -Djogamp.debug.Lock -Djogamp.common.utils.locks.Lock.timeout=10000" #D_ARGS="-Djogl.debug.GLContext -Dnewt.debug=all" #D_ARGS="-Dnewt.debug=all" - D_ARGS="-Djogl.debug.GLCanvas -Djogl.debug.GLJPanel" + #D_ARGS="-Djogl.debug.GLCanvas -Djogl.debug.GLJPanel" #D_ARGS="-Djogl.debug.PNGImage" #D_ARGS="-Djogl.debug.JPEGImage" #D_ARGS="-Djogl.debug.GLDrawable -Dnativewindow.debug.GraphicsConfiguration -Djogl.debug.CapabilitiesChooser" @@ -329,8 +329,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledRendering2GL2NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.tile.TestRandomTiledRendering2GL2NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.tile.TestRandomTiledRendering3GL2AWT $* -#testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsAWT $* -testawt com.jogamp.opengl.test.junit.jogl.acore.glels.TestGLContextDrawableSwitch02AWT $* +testawt com.jogamp.opengl.test.junit.jogl.tile.TestTiledPrintingGearsAWT $* # # core/newt (testnoawt and testawt) -- cgit v1.2.3