aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix Bug 839: Clarify whether resetStates(..) shall clearStates() - Pass ↵Sven Gothel2013-09-217-31/+34
| | | | 'isInit' flag.
* AWT Printing: Fix non vertical-flipped printing, i.e. cut-off top-row's tile ↵Sven Gothel2013-09-204-22/+427
| | | | | | | | | | | | | | | upper area, cleanup. TestTiledPrintingGearsSwingAWT2: Provoked !flipped bug where top-row was positioned too low due to using full size tile-height. Cutting of the unused top-row's upper area corrects this issue. vertical-flip mode does not expose this situation, since flipping shifts the payload to the upper tile area. TestTiledPrintingGearsSwingAWT2: Also tests an alternative transparent overlapping mode without layout.
* Fix Bug 826: GLJPanel: Fully restore TextureState and ViewportSven Gothel2013-09-2015-57/+897
| | | | | | | | | | | | In FBO mode save TextureState of current texture-unit, as well as for the fbo texture-unit if the latter is a different. In glslTextureRaster mode for verical flip (using FBO), set the viewport to drawable size if before flipping and restore afterward - if equired. TestGLJPanelTextureStateAWT fully tests use cases: - Keep texture bound w/ same or other texture-unit - Use 2 viewports within one drawable and keep it
* Bug 839: Clarifying GLStateTracker.clearStates(..) remove 'enable' change - ↵Sven Gothel2013-09-202-9/+12
| | | | | | Part 1 TODO: Only disable state tracker at GLContext.destroy()
* TestTiledPrintingGearsSwingAWT: Enable 'bitmap' test only on Windows, issues ↵Sven Gothel2013-09-191-7/+12
| | | | w/ AMD catalyst driver and pixmap surface ..
* AWTTilePainter.setupGraphics2DAndClipBounds(): Use 'Shape getClip()'; Use ↵Sven Gothel2013-09-194-64/+93
| | | | | | | | | | | | | | | | double precicion clip bounds 'all the way'; Explicitly scale image and clip w/ current scaled transform. - Use 'Shape getClip()' Don't assume Rectangle2D, but use Shape's getBounds2D() - Use double precicion clip bounds 'all the way' Remove rounding error on clip bounds w/ start value, which was _not_ using doubles. - Explicitly scale image and clip w/ current scaled transform. Instead of abusing Graphics2D's clip shape to scale image size and clip-area, explicitly use transform both bounding boxes into transformed space, scale space and transform out (inversion). A possible NoninvertibleTransformException will be thrown while Graphics2D has not been modified.
* AWT Print Tests: Only include 600dpi tests if requested via main arg '-600dpi'Sven Gothel2013-09-194-4/+8
|
* AWTTilePainter: Fix case with no GLOrientation, i.e. no vertical-flip. Tile ↵Sven Gothel2013-09-182-13/+19
| | | | | | location and destination must follow same math as w/ vertical-flip. .. clipping and tile-height was not considered.
* RedSquareES1: Add TileRendererBase.TileRendererNotifySven Gothel2013-09-181-17/+69
|
* AWTTilePainter: Fix DEBUG message (used wrong value at println)Sven Gothel2013-09-181-1/+1
|
* Fix SharedResourceRunner's potential race-conditions. Use top-level ↵Sven Gothel2013-09-183-104/+109
| | | | synchronization simplifying code and better robustness.
* AWT Printing: Move init-test of setupPrint(..) to AWT-EDT Runnable ; ↵Sven Gothel2013-09-173-58/+70
| | | | GLJPanel: Attempt to initialize if not done yet (similar to GLCanvas)
* Print Tests: Split 'Printable' to own class, add OffscreenPrintable using ↵Sven Gothel2013-09-178-208/+537
| | | | NIO BufferedImage, adding OffscreenPrintable tests to all unit tests.
* TestTiledPrintingNIOImageSwingAWT: Add layered test ; Use 300dpi instead of ↵Sven Gothel2013-09-161-3/+9
| | | | 600dpi
* Add 'DirectDataBufferInt' supporting NIO based BufferedImagesSven Gothel2013-09-163-2/+536
| | | | | | | | | | - Contains convenient method to create an NIO backed BufferedImage 'BufferedImage createBufferedImage(int width, int height, int numComponents, Point location)' Standalone test TestTiledPrintingNIOImageSwingAWT 'prints', i.e. renders offscreen, the Frame into - a traditional array-backed BufferedImage - an NIO-backed backed BufferedImage
* Updating doc AWTPrinting.txtSven Gothel2013-09-151-1/+0
|
* Fix AWT printing issues w/ overlapping and/or non-opaque contents ; Change ↵Sven Gothel2013-09-159-247/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AWTPrintLifecycle's lifecycle - AWTPrintLifecycle: - Should decorate: PrinterJob.print(..), instead of within Printable.print(..) { .. container.printAll(..); .. } This is due to AWT print implementation, i.e. AWT will issue Printable.print(..) multiple times for 'overlapping' or non-opaque elements! - Move from javax.media.opengl.awt -> com.jogamp.nativewindow.awt - Make _interface_ AWT agnostic, i.e. remove Graphics2D from 'setup(..)' - Add 'int numSamples' to 'setup(..)' to determine the number of samples - AWTTilePrinter: - Use double precision when scaling image-size and clip-rect, then round them to integer values. Otherwise AWT will use the bounding box for the clipping-rectangular. - Clip negative portion of clip-rect, this removes redundant overpaints, as well as increasing the tile count due to the increased clipping-size. - Clip the image-size in the tile-renderer according to the clip-rect. - DEBUG_TILES: Dump tiles to file - Use sub-image of final BuffereImage instead of adding another clipping region. This might increase performance if no clip-rect has been set. TODO: TestTiledPrintingGearsSwingAWT overlapping tests exposes a 'off by one' bug of the first layer's background! Note: The GL content seems to be correct though - maybe it's simply an AWT rounding error ..
* TileRenderer: Add and expose clipped image size; Expose size of tiles.Sven Gothel2013-09-151-32/+119
| | | | | | | | Add clipping of the image-size and hence differentiate the image-size and the size the tile-renderer iterates through. The original image-size is required for the opengl reshape and rendering, where the clipping size may restrict the range of rendering.
* AWTTilePainter: Fix null clip-rect (consider scaling); Fix non GL-oriented ↵Sven Gothel2013-09-134-33/+58
| | | | drawable, skip vertical flip and use 1:1 y-coord.
* Complete commit 4b866d2686ab9c3fd7cf6708925b4663ad81e359: Relocate ↵Sven Gothel2013-09-131-0/+50
| | | | FFMPEGNatives.initIDS0() -> FFMPEGStaticNatives.initIDS0(); Cleanup up warnings and includes (clang); Forgot to commit new ffmpeg_static.h
* Add support for clang ; Use __APPLE__ predefined macroSven Gothel2013-09-131-1/+1
|
* Relocate FFMPEGNatives.initIDS0() -> FFMPEGStaticNatives.initIDS0(); Cleanup ↵Sven Gothel2013-09-1110-111/+91
| | | | up warnings and includes (clang).
* Fix TileRendererBase Bug: Avoid multiple GLEL init(..) call.Sven Gothel2013-09-111-2/+11
|
* Gears, GearsES2, RedSquareES2: Proper debug output for init, reshape and disposeSven Gothel2013-09-113-7/+7
|
* Add 2nd 'demo' canvas to the other tiled printing tests.Sven Gothel2013-09-112-31/+63
|
* RedSquareES2: Fix tiled aspect ratioSven Gothel2013-09-111-1/+1
|
* TestTiledPrintingGearsSwingAWT: Add a second demo GLEventListener showing ↵Sven Gothel2013-09-104-25/+104
| | | | it's working/scaling well; Adding TileRendererBase.TileRendererNotify to RedAquareES2 having a 3rd demo case.
* Gears*: Clarify frustum calculation for tilingSven Gothel2013-09-102-4/+4
|
* AWT Printing: AWTTilePainter needs to handle null clip!Sven Gothel2013-09-104-9/+13
|
* AWTPrintLifecycle: Add DEFAULT_PRINT_TILE_SIZE (512); Remove unused imports.Sven Gothel2013-09-084-14/+6
|
* NewtCanvasAWT: Implement AWTPrintLifecycle and hence support for AWT printing.Sven Gothel2013-09-082-2/+405
| | | | | | | | | Note: Same bug existing as w/ GLCanvas, i.e. 'GLDrawableUtil.swapGLContextAndAllGLEventListener(gladPre, gladNew)': If 'gladPre' is onscreen and using MSAA (on NV/GLX), the ctx cannot be made current in it's new 'gladNew' location. Same workaround applied, i.e. use onscreen drawable while printing.
* TiledPrintingAWTBase/doc: Add description of how-to add a 'print-to-file' ↵Sven Gothel2013-09-081-13/+33
| | | | printer driver on OSX
* Add AWTTilePainter.dumpHintsAndScale(..), removing more duplicated code from ↵Sven Gothel2013-09-083-22/+19
| | | | GLCanvas/GLJPanel
* TileRenderer*: API doc fixesSven Gothel2013-09-082-3/+3
|
* TileRenderer*: Fix pre-swap and post-swap in regards to endTile(..), i.e. ↵Sven Gothel2013-09-084-36/+122
| | | | pre-swap only for FBO && MSAA. See TileRendererBase.reqPreSwapBuffers(..) API doc.
* Fix some JavaDoc and API doc (reference) bugs ..Sven Gothel2013-09-0811-54/+72
|
* AWTPrintLifecycle: Add detailed API docSven Gothel2013-09-081-1/+62
|
* Test: Don't resize frame, tweek print-matrix; AWTPrintLifecycle: Add scale ↵Sven Gothel2013-09-088-233/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and convenient AWT container traversal context; GLCanvas/GLJPanel properly handle existing MSAA and req. AA; - Test: Don't resize frame, tweek print-matrix - Use scaleComp72 to scale the frame to fit on page, i.e. global print matrix - Use scaleGLMatXY = 72.0 / glDPI to locally scale on the GL drawable as being passed to AWTPrintLifecycle.setup(..) - Hence frame stays untouched/stable, no need for 'offscreen' print test, which is removed. - AWTPrintLifecycle: Add scale and convenient AWT container traversal context Use a simple decoration for all AWTPrintLifecycle impl. components within a container: final AWTPrintLifecycle.Context ctx = AWTPrintLifecycle.Context.setupPrint(frame, g2d, scaleGLMatXY, scaleGLMatXY); try { } finally { ctx.releasePrint(); } - GLCanvas/GLJPanel properly handle existing MSAA and req. AA; - GLCanvas: Workaround bug where onscreen MSAA cannot switch to offscreen FBO, i.e. stay 'onscreen' - GLJPanel: Use new offscreen FBO if MSAA is requested and not yet used. - GLJPanel.Offscreen.postGL(): always swapBufer(), was missing for !GLSL swapping Results GLCanvas / GLJPanel: - Good scaling - Stable behavior / visibility - High DPI mode works
* TiledPrintingAWTBase: Fix scaling - Fit frame to page, add MSAA ↵Sven Gothel2013-09-078-235/+345
| | | | | | | | | | | | | | RenderingHints test; setupPrint(Graphics2D): Query RenderingHints to use MSAA rendering - AWTPrintLifecycle.setupPrint(Graphics2D): Query RenderingHints to use MSAA rendering - Impl. in GLCanvas - TODO GLJPanel (would need a new offscreen buffer) - TiledPrintingAWTBase: - Fix scaling - Fit frame to page - add MSAA RenderingHints test - GLCanvas: Remove dumpStack() DEBUG output
* TileRenderer*: Fix FBO MSAA use-case, i.e. call swapBuffers() before ↵Sven Gothel2013-09-079-55/+234
| | | | | | | | | | | endTile(); Enhance unit tests for MSAA, also add TileRendererBase.TileRendererNotify to GearsES2 GL[Auto]Drawable.swapBuffers() must be called before endTile(). This is especially important if using multisampling offscreen FBO drawables, where swapBuffers() triggers the <i>downsampling</i> to the readable sampling sink. Otherwise, we will be 'one tile behind' !
* Fix TileRenderer*: Allow general usage w/ any GL profile, only image-buffer ↵Sven Gothel2013-09-073-25/+77
| | | | | | | | | | | | | requires >= GL2ES3; Always set pack-alignment, Set glReadBuffer(..) >= GL2ES3 - Allow general usage w/ any GL profile, only image-buffer requires >= GL2ES3 Due to GL2ES3.GL_PACK_ROW_LENGTH and image-width != tile-width - Always set pack-alignment Forgot for tile-buffer - Set glReadBuffer(..) >= GL2ES3 Required if using FBO offscreen, i.e. MSAA mode.
* Complete commit 54dcdf1f53c9fc1f7124cf77bbf5aa952d42053a, exposing GL2ES3 in ↵Sven Gothel2013-09-079-29/+31
| | | | GLProfile (just a query, no new profile)
* AWT/GL Printing WIP: Abstract AWT tile painting code out to AWTTilePainter, ↵Sven Gothel2013-09-073-301/+300
| | | | reused w/ GLCanvas and GLJPanel
* TestTiledPrintingGears*AWT: Add 4s delay before closing frame and ending ↵Sven Gothel2013-09-063-9/+5
| | | | | | unit test to wait for print-job (?) .. otherwise results are cut-off .. better solution ? callback ?
* GLCanvas Printing WIP: Add GLJPanel; GLCanvas TILE_SIZE 512; ↵Sven Gothel2013-09-066-88/+588
| | | | print(Graphics): Don't force on AWT-EDT -> Deadlock; releasePrint(): perform reshape/display!
* Add AWTPrintLifecycle interface describing impl. w/ ↵Sven Gothel2013-09-064-258/+367
| | | | setupPrint()/releasePrint(), modularize unit test TestTiledPrintingGearsAWT
* TestTiledPrintingGearsAWT: Perform AWT mods on AWT-EDT, always perform ↵Sven Gothel2013-09-061-13/+23
| | | | g.scale(..), pass 'offscreen' w/ manual printing as well
* GLCanvas Printing WIP: Perform all print* operations on AWT-EDT, clip before ↵Sven Gothel2013-09-062-173/+260
| | | | drawing image and show same; Test: Add offscreen print and add borders.
* TileRenderer*: Add more detailed 'toString()' - override for TileRendererSven Gothel2013-09-062-4/+24
|
* GLCanvas Printing WIP: Swap to offscreen at setupPrint(); Use TileRenderer @ ↵Sven Gothel2013-09-062-164/+276
| | | | | | | | | | | | | | | | | | | | | | | | 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