summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Bug 816: Clarify JAWT_OSX_CALAYER_QUIRK_* semantics, add ↵Sven Gothel2013-09-284-15/+58
| | | | JAWT_OSX_CALAYER_QUIRK_LAYOUT
* Fix Bug 816: JAWTWindow.getLocationOnScreenNonBlocking(..) shall use ↵Sven Gothel2013-09-272-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | JRootPane for last position offset; AWTMisc.getInsets(..) add special JRootPane case. Please note that we use JAWTWindow.getLocationOnScreenNonBlocking(..) to determine the location on the screen 'only' b/c we cannot allow AWT to aquire the tree-lock! The latter would be the case if using AWT's 'getLocationOnScreen()'. If anybody has a more reliable implementation to achieve the same .. please provide your patch! The following fix has been performed to fix the last issue w/ vZome. - JAWTWindow.getLocationOnScreenNonBlocking(..) shall use JRootPane for last position offset - w/ vZome, the frame's position was 0/0 (invalid), instead JRootPane's position is good. Use JRootPane's position and stop traversing here (LW top-level). - AWTMisc.getInsets(..) add special JRootPane case. + * Exception is JRootPane. + * Return it's parent's Window component's insets if available, + * otherwise return JRootPane's insets.<br> + * This is due to <i>experience</i> that <i>some</i> JRootPane's + * do not expose valid insets value. -
* Test AWT Printing: Frame size contains border/insets, use as-is for scaling; ↵Sven Gothel2013-09-273-25/+22
| | | | Only force TEXT AA print-rendering hint.
* Bug 816: Fix JAWTWindow's getLocationOnScreenNonBlocking(); Derive CALayer ↵Sven Gothel2013-09-278-139/+534
| | | | | | | | | | | | | | | | | | | | | | | position from AWT component's location on screen. Track fixedFrame size of root CALayer; Add Split layout to unit test, add [manual] Applet tests. - Fix JAWTWindow's getLocationOnScreenNonBlocking() Skip JRootPane while traversing up to root Container. JRootPane would duplicate the top-level container's offset (Window insets). - Derive CALayer position from AWT component's location on screen. Add Split layout to unit test, add [manual] Applet tests. AWT >= 7u40: - AWT position is top-left w/ insets, where CALayer position is bottom/left from root CALayer w/o insets. - Use getLocationOnScreenNonBlocking() to get location-on-screen w/o insets. - Native code: flip origin AWT < 7u40 still uses fixed position 0/0 for root and sub layer. - Track fixedFrame size of root CALayer - MyCALayer: - Override layoutSublayers to validate root and sub-layer pos/size - Override setFrame to use fixedFrame, if set (similar to MyNSOpenGLLayer) - Add Split layout to unit test, add [manual] Applet tests. - Thx to 'jimthev' and 'Manu' for providing Applet unit tests
* TileRenderer*: TileRendererNotify -> TileRendererListener w/ clarifying ↵Sven Gothel2013-09-2714-168/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | functionality (reshapeTile(..), ..); Only process GLEventListener impl. TileRendererListener; attachToAutoDrawable -> attachAutoDrawable, etc. -TileRendererNotify -> TileRendererListener - Added methods: - void reshapeTile(TileRendererBase tr,int tileX, int tileY, int tileWidth, int tileHeight, int imageWidth, int imageHeight); - void startTileRendering(TileRendererBase tr); - void endTileRendering(TileRendererBase tr); allowing to clarify user code and API specification, i.e. TR only processes GLEventListener which impl. TileRendererListener. This also allows simplifying the API doc, while having a more descriptive reshape method focusing solely on tile rendering. Further more, the start/end TR methods allow certain GL related actions while the context is current before and after iterating through the tiles. This is even used for RandomTileRenderer (one tile only), to allow to reuse same TileRendererListener for diff TRs. - Fix language, attach and detach usage was vice versa. We do attach an GLAutoDrawable to a TR - attachToAutoDrawable -> attachAutoDrawable - detachFromAutoDrawable -> detachAutoDrawable - Adapted unit tests.
* DirectDataBufferInt: createBufferedImage(..) use BufferedImage type value ↵Sven Gothel2013-09-279-75/+174
| | | | | | | | | | | | | | | | | | | | | instead of component-count, support all int types ; Add type 'BufferedImageInt' preserving the custom image-type, add note about TYPE_CUSTOM - createBufferedImage(..) use BufferedImage type value instead of component-count, support all int types - Support all integer data image-type, hence we need to pass image-type instead of component count (collision). - Also pass 'properties' to allow configuring all BufferedImage parameters (just in case) - Return BufferedImageInt to allow user to query the used image-type, see below. - Add type 'BufferedImageInt' preserving the custom image-type, add note about TYPE_CUSTOM - Simply extends BufferedImage w/ custom image-type, since BufferedImage's type is TYPE_CUSTOM due to our custom storage type (see API doc comment). Unit tests: - Testing all integer image-type's in - TestTiledPrintingGearsSwingAWT - TestTiledPrintingNIOImageSwingAWT - Disable all AA print-hints, all AWT text visible on X11. Probably has a regression on Windows / OSX .. TBD.
* Fix MovieCube/Simple Demo in 'Applet' mode: Use default ctor to completly ↵Sven Gothel2013-09-254-16/+93
| | | | initialize GLMediaPlayer demo w/ def. stream etc; Fix list of command keys in applet html page.
* OSXMisc.c: Fix compilation error w/ java6's jint definition (probably clang ↵Sven Gothel2013-09-251-2/+2
| | | | | | as well) Regression of commit 4b5435c68c3f12d62dadb395957362eceacfb25c
* Bug 816: Fix OSX CALayer 'quirks' for AWT 1.7.0_40 - See JAWTUtil ↵Sven Gothel2013-09-249-133/+355
| | | | | | | | | JAWT_OSX_CALAYER_QUIRK_SIZE and JAWT_OSX_CALAYER_QUIRK_POSITION. - Provide quirk bits for OSX CALayer depending on used JVM/AWT and act accordingly. - TestBug816OSXCALayerPosAWT: Add resize by frame
* TileRendererBase: Remove redundant reshape propagation of atached GLEL, call ↵Sven Gothel2013-09-241-12/+3
| | | | pre/post reshape in it's display method instead.
* Bug 816: Add unit test 'TestBug816OSXCALayerPosAWT'Sven Gothel2013-09-241-0/+363
|
* Fix Bug 840: DefaultEDTUtil.restart() shall only reuse ThreadGroup (tg) is ↵Sven Gothel2013-09-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | not destroyed, otherwise use current thread's tg. With jdk7u40, when re-launching a NEWT applet (JOGLNewtApplet1Run), i.e. via browser back and forth, the following exception happens: java.lang.RuntimeException: java.lang.IllegalThreadStateException at com.jogamp.newt.awt.applet.JOGLNewtApplet1Run.init(JOGLNewtApplet1Run.java:218) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalThreadStateException at java.lang.ThreadGroup.addUnstarted(Unknown Source) at java.lang.Thread.init(Unknown Source) at java.lang.Thread.<init>(Unknown Source) at jogamp.newt.DefaultEDTUtil$NEDT.<init>(DefaultEDTUtil.java:280) at jogamp.newt.DefaultEDTUtil.restart(DefaultEDTUtil.java:91) at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:231) at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:1758) at jogamp.newt.WindowImpl.setUndecorated(WindowImpl.java:1477) at com.jogamp.newt.opengl.GLWindow.setUndecorated(GLWindow.java:278) at com.jogamp.newt.awt.applet.JOGLNewtApplet1Run.init(JOGLNewtApplet1Run.java:188) ... 3 more This is due to 7u40's changed ThreadGroup (tg) lifecycle, i.e. the tg is destroyed. In such case, DefaultEDTUtil.restart() shall use the current threads tg.
* 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