summaryrefslogtreecommitdiffstats
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* PinchToZoomGesture: Add ctor arg 'allowMorePointer', should be false to be ↵v2.1.1Sven Gothel2013-10-191-61/+63
| | | | more stable (i.e. only 2 pointer pressed)
* MouseEvent: Clarify 'Multiple-Pointer' w/ button[mask] semantics, ; ↵Sven Gothel2013-10-173-4/+4
| | | | | | | | | | | | | | InputEvent: getButtonDownCount() and isAnyButtonDown(); - Clarify 'Multiple-Pointer' w/ button[mask] semantics - Pointer IDs start w/ 0 and are consecutive numbers. - 'button' == triggering pointer-ID - buttonMask in modifiers show pressed button _and_ pointer-IDs - deprecated BUTTON_NUMBER -> use BUTTON_COUNT (name semantics)
* AWTPrintLifecycle.setupPrint(..): Add optional tileWidth and tileHeight, ↵Sven Gothel2013-10-159-58/+98
| | | | allowing user to set custom tile size for performance evaluation/tweak
* Bug 861 - NEWT: Unify MouseEvent Processing incl. gesture processingSven Gothel2013-10-152-89/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We processed MouseEvents within NEWT as follows: sendMouseEvent/enqueueMouseEvent -> doMouseEvent, - called by native code to be delivered via consumeMouseEvent (now or later) - events are validated (move/drag, boundaries) - missing events are synthesized (click, enter, ..) as well as in several factories, i.e.: - AWTNewtEventFactory (1:1) - AndroidNewtEventFactory - synthesized events .. (click, ..) - android typed gesture detection (drag -> 1 finger scroll..) The latter enqueues events do Window/Display directly to be consumed by WindowImpl. Then users may have their own gesture detection etc. +++ This change unifies mouse/pointer event processing within NEWT within consumeEvent(..) which represents a common entry point. Gesture processing is now realized w/ a public API - GestureHandler - GestureHandler.GestureListener - GestureHandler.GesureEvent which supplies: - default impl. of optional gesture handlers (scroll, .. - default: enabled) - public API to add/remove gesture-handler and -listener +++ This allows our impl. to scale better in support of more multiple pointer devices (-> Win7/Win8, X11, ..).
* GLMediaPlayer: Fix CameraInputScheme URI doc and Android test streams (Use ↵Sven Gothel2013-10-154-6/+6
| | | | mp4 instead of webm, fix Camera URI)
* Bug 365: Add unit test, which run's through most of the ScaleInternal ↵Michael Esemplare2013-10-131-0/+272
| | | | functions for a single column image.
* Bug 859: Let TileRenderer detect zero columns and rows in eot() where ↵Sven Gothel2013-10-123-26/+94
| | | | beginTile() throws an EOT IllegalStateException to avoid division by zero
* Bug 852: Validate CPU sourced data API is allowed, throw exception if not. ↵v2.1.0Sven Gothel2013-10-101-1/+0
| | | | GLContext: isCPUSourcedAvail() -> isCPUDataSourcingAvail()
* NEWT Reparent/Fullscreen: Add 'waitForPosition(..)' when reparenting or back ↵Sven Gothel2013-10-091-1/+0
| | | | from fullscreen; JOGLNewtAppletBase: Reparent to pos 32/32, trying to avoid browser window focus/top stealing on X11.
* Bug816 OSX CALayer: Issue w/ JSplitPane within Apple (Firefox, Safari - not ↵Sven Gothel2013-10-093-1/+208
| | | | | | | appletviewer) when move horizontal slider (vertical: ok) Moving horizontal slider if run as applet (Firefox, Safari - not appletviewer) doesn't move the GLCanvas even though it is resized.
* NewtCanvasAWT Focus Traversal: Remove AWT's requestFocus*() overrides in ↵Sven Gothel2013-10-091-3/+3
| | | | | | | | | | favor of FocusPropertyChangeListener requestFocusNEWTChild() The AWT's requestFocus*() overrides were intended to receive the AWT focus (default) and clear it afterwards to forward the focus to the NEWT component -> requestFocusNEWTChild(). This can be achieved simply by using our FocusPropertyChangeListener and invoking requestFocusNEWTChild() when receiving the focus on the NewtCanvasAWT component.
* NEWT Reparent/Fullscreen: Fixes X11 unsuccessful return to parent window; ↵Sven Gothel2013-10-097-146/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add reparentWindow(..) top-level position arguments; Misc - Fixes X11 unsuccessful return to parent window On X11 when returning to parent window (-> CHILD), we have to set the window invisible and wait for the result. Otherwise it sometimes happens that the WM's reparent operation fails, i.e. the window won't become a child of desired parent and is positioned randomly. - Add reparentWindow(..) top-level position arguments .. allows bringing the child-window to top-level w/ a desired position. Otherwise the window would be positioned elsewhere as a top-level as the plain reparenting operation. X11 needs to set position and size _after_ making the window visible, otherwise WM may ignore the XConfigureWindow request. - Reparent recreate shall always store the desired position and size On OSX/CALayer when recreation is being used, we need to store the pos/size for later creation. - Tests: Use 'NewtAWTReparentingKeyAdapter' where possible (reparent/fullscreen) instead of duplicating such code. NewtAWTReparentingKeyAdapter: Performs reparenting and fullscreen operations off-thread (i.e. not on AWT/NEW EDT) while decorating the action w/ revoking/restoring the ExclusiveContextThread (ECT). Manually tested 'TestGearsES2NewtCanvasAWT' reparenting and fullscreen on X11, Windows and OSX/CALayer w/ JDK 7u40 successful.
* NEWT Display: Issue EDTUtil.start() at runOnEDTIfAvail(..) even if on EDT, ↵Sven Gothel2013-10-091-1/+1
| | | | | | | | | | | | | | | | | which is to be stopped. This case appears on e.g. OSX/CALayer (offscreen) reparenting using recreation (onscreen <-> offscreen), i.e. display destroy/create is performed on EDT. Misc Cleanup: - Rename EDTUtil: restart() -> start() - Rename Display: validateEDT() -> validateEDTStopped() - Simplify Display.setEDTUtil(..): Remove need for redundant 'newEDTUtil' local var. - Simplify Display.runOnEDTIfAvail(..): edtUtil is never null
* Bug 729, Bug 849: Honor JAWTWindow's [parent] visibility stateSven Gothel2013-10-063-4/+358
| | | | | | | | | | | | JAWTWindow snoops HierarchyEvents for SHOWING_CHANGED to track local component's visibility state as well as it's global visibility state. The later is determined by it's parent's visibility change. If 'removeNotify()' is called, component's visibility is reset to it's local visibility state. Fixes OSX CALayer component's visibility if parent's visibility changes (Bug 729). Fixes continuous GL rendering if parent is invisible (Bug 849).
* Bug 729: OSX CALayer invisible needs to have opacity 0 to not show hidden ↵Sven Gothel2013-10-061-1/+4
| | | | | | | | component. Completes commit 3b02a219b1b9e446e87df1beb7da4266f74824fa See unit test: TestBug816OSXCALayerPos03AWT
* Bug816 OSX CALayer: getLocationOnScreenNonBlocking(..) stop traversing at ↵Sven Gothel2013-10-055-3/+307
| | | | | | | | | | top-level heavyweight Window, fixes [J]Dialog use case. Top-level heavyweight Window's position is it's position on screen, hence stop traversing. Thx to Emmanuel Puybaret for pointing this out. Adding Dialog and JDialog unit tests as inspired by Emmanuel Puybaret.
* Bug 816/848: Cleanup test applet layout/size ; Note Bug 848: Not ↵Sven Gothel2013-10-043-7/+113
| | | | reproducible after restart of OSX test machine!
* Bug 848: Add test applet ; Bug 816 Bug816AppletGLCanvas02: Remove 2nd ↵Sven Gothel2013-10-043-106/+187
| | | | Animator ; Fix intendation (TAB -> WS)
* Bug 816: Add 2 more unit tests (Swing JFrame w/ 2 JRootPanes, AWT Frame ↵Sven Gothel2013-10-033-25/+304
| | | | | | BorderLayout w/ Checkbox North, GLCanvas Center) Thx to Emmanuel Puybaret
* Bug818GLJPanelApplet: Remove unused importsSven Gothel2013-10-031-2/+0
|
* Bug 818 (OSX 10.6.8 NVIDIA GeForce GT 330M): Add unit test (manual applet)Sven Gothel2013-10-031-0/+308
|
* GLJPanel/Printing: Perform backend.reshape immediatly after printing if ↵Sven Gothel2013-09-295-46/+112
| | | | | | | resized; Add unit test for resize while printing. Perform immediatly reshape at releasePrint on AWT-EDT: - sendReshape = handleReshape(); // reshapeSize -> panelSize, backend reshape w/ GL reshape
* AWT Printing: releasePrint() issue reshape from AWT-EDT; GLJPanel: Issue ↵Sven Gothel2013-09-281-0/+13
| | | | 'handleReshape' if panelSize/awtSize mismatch, otherwise 'sendReshape' and exception if offscreen size doesn't match panelSize.
* 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-273-13/+304
| | | | | | | | | | | | | | | | | | | | | | | 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-277-100/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-278-51/+91
| | | | | | | | | | | | | | | | | | | | | 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.
* Bug 816: Fix OSX CALayer 'quirks' for AWT 1.7.0_40 - See JAWTUtil ↵Sven Gothel2013-09-241-23/+97
| | | | | | | | | 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
* Bug 816: Add unit test 'TestBug816OSXCALayerPosAWT'Sven Gothel2013-09-241-0/+363
|
* AWT Printing: Fix non vertical-flipped printing, i.e. cut-off top-row's tile ↵Sven Gothel2013-09-203-3/+407
| | | | | | | | | | | | | | | 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-2013-50/+684
| | | | | | | | | | | | 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
* TestTiledPrintingGearsSwingAWT: Enable 'bitmap' test only on Windows, issues ↵Sven Gothel2013-09-191-7/+12
| | | | w/ AMD catalyst driver and pixmap surface ..
* 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-181-2/+17
| | | | | | 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
|
* Print Tests: Split 'Printable' to own class, add OffscreenPrintable using ↵Sven Gothel2013-09-177-207/+536
| | | | 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-162-2/+298
| | | | | | | | | | - 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
* Fix AWT printing issues w/ overlapping and/or non-opaque contents ; Change ↵Sven Gothel2013-09-154-86/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ..
* 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
|
* NewtCanvasAWT: Implement AWTPrintLifecycle and hence support for AWT printing.Sven Gothel2013-09-081-0/+241
| | | | | | | | | 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
* TileRenderer*: Fix pre-swap and post-swap in regards to endTile(..), i.e. ↵Sven Gothel2013-09-081-16/+56
| | | | pre-swap only for FBO && MSAA. See TileRendererBase.reqPreSwapBuffers(..) API doc.
* Test: Don't resize frame, tweek print-matrix; AWTPrintLifecycle: Add scale ↵Sven Gothel2013-09-083-143/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-074-205/+293
| | | | | | | | | | | | | | 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