commit 8363df5da5794faf10478789954992cef0c0d50f Author: Sven Gothel Date: Thu Oct 10 13:16:39 2013 +0200 Bug 852: Validate CPU sourced data API is allowed, throw exception if not. GLContext: isCPUSourcedAvail() -> isCPUDataSourcingAvail() commit 4e83a5df7a851cc33d85f76381f058256906ad4c Author: Sven Gothel Date: Thu Oct 10 02:15:56 2013 +0200 Bug 852: Remove CPU sourced data API entry where not allowed (ES3 and GL core >= 3.0) ; GL2 cfg: Ignore GL2ES3 symbols (super) Remove CPU sourced data API entries via new config 'BufferObjectOnly ', listed in 'gl-common-gpubufferonly.cfg' and included in ES3 and all GL core >= 3 interfaces. If BufferObjectOnly is defined for a function, only the 'long offset' variant is being emitted. Due to limitations of GlueGen's 'ExtendedInterfaceSymbolsIgnore A.java', which only identifies the function name and not the signature - all CPU sourced variants are manually added to the compatibility and ES2 GL profiles via '*-common-cpubufferJavaCode.java' files. GLContext: Added 'isCPUSourcedAvail()' to determine whether context allows CPU sourced data, i.e. for GL2ES1 and GLES2 ctx. GLContext/GLProfile/GL: isGLES2() now returns false if having a ES3 context due to 'CPU sourced' incompatibility! +++ GL2 cfg: Added ignore GL2ES3 symbols of it's superclass, removing duplicated symbols. commit e96b2d648e7d69b95325fb6b80c6eb508e1e8a14 Author: Sven Gothel Date: Wed Oct 9 17:12:33 2013 +0200 NEWT Reparent/Fullscreen: Add 'waitForPosition(..)' when reparenting or back from fullscreen; JOGLNewtAppletBase: Reparent to pos 32/32, trying to avoid browser window focus/top stealing on X11. commit 364af76f2ba3e05ba041997e97f4e342fd6f5827 Author: Sven Gothel Date: Wed Oct 9 07:17:37 2013 +0200 Bug816 OSX CALayer: Issue w/ JSplitPane within Apple (Firefox, Safari - not 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. commit 9997ce1f19accc2ef6b8568b5e3ba877710bef01 Author: Sven Gothel Date: Wed Oct 9 05:29:08 2013 +0200 NewtCanvasAWT Focus Traversal: Remove AWT's requestFocus*() overrides in 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. commit 8be1fc983e584082b9960b4da19c56af5834d08e Author: Sven Gothel Date: Wed Oct 9 05:24:45 2013 +0200 NEWT Reparent/Fullscreen: Fixes X11 unsuccessful return to parent window; 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. commit 56502090ba5c2e0c266666a4ba3ddd501e9ad95f Author: Sven Gothel Date: Wed Oct 9 02:10:19 2013 +0200 NEWT Display: Issue EDTUtil.start() at runOnEDTIfAvail(..) even if on EDT, 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 commit 88291cd5e20fc8b172f1d78a683be7d2bdec807a Author: Sven Gothel Date: Wed Oct 9 01:53:53 2013 +0200 NEWT/OSX (Bug 836): Only WindowDriver.initWindow0(..) operation on main-thread must be synchronized (wait-until-done) - Leave WindowDriver.close0(..) w/o sync commit c2a4905ec926362a08f486a68d428fb139821df1 Author: Sven Gothel Date: Mon Oct 7 07:47:12 2013 +0200 NEWT/OSX (Bug 836): Lifecycle operations performed on main-thread must be synchronized (wait-until-done) Wait-until-done (main thread): - WindowDriver.close0(..) - WindowDriver.initWindow0(..) Otherwise a re-queued operation (i.e. CALayer attachment) will mixup the order .. Experienced w/ fullscreen exit. commit 929cae9a5ba01a382d17387ff289d74ee029f090 Author: Sven Gothel Date: Mon Oct 7 07:41:30 2013 +0200 NEWT/Fullscreen (Bug 836): Exit re-parenting fullscreen w/ [invisible-exit-visible] (-> like reparent); Always force focus; X11: Always use ALWAYSONTOP. - Remove unused 'fullscreenUseSpanningMode' state - Exit re-parenting fullscreen w/ [invisible-exit-visible] (-> like reparent) solves X11 issue, where the NEWT window doesn't 'return to it's parent'. Probably also fixes Bug 836! - Always force focus when enter and exit FS - X11: Always use ALWAYSONTOP No reason to behave different (spanning and normal-fs) commit c15d33e4f63abe18bbe1ded8125b5ad90e5c6adf Author: Sven Gothel Date: Mon Oct 7 07:36:17 2013 +0200 NativeWindow/OSX: Fix RunOnThread/RunLater - Properly determine 'forkOnMain' via onMain && ( isOnMain || 0 < delay ) commit 8e7f4f42f2ed572e0f794725efec1fb2f81dabf2 Author: Sven Gothel Date: Mon Oct 7 01:08:06 2013 +0200 FFMPEGMediaPlayer: Use IOUtil.decodeFromURI(..) to unescape %20 commit e33e6374e0be0454f7e9732b5f897f84dbc3c4dc Author: Sven Gothel Date: Sun Oct 6 21:25:42 2013 +0200 Bug 729, Bug 849: Honor JAWTWindow's [parent] visibility state 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). commit 1259693f21734b0ebe1b5c95688ad91956c2629c Author: Sven Gothel Date: Sun Oct 6 15:56:44 2013 +0200 Bug 789: glDrawArraysIndirect and glDrawElementsIndirect are using GL_DRAW_INDIRECT_BUFFER, add VBO variant and range-check commit ff86d8398ce66abddff4cbada8eabd1314a11d7b Author: Sven Gothel Date: Sun Oct 6 02:28:14 2013 +0200 Bug 729: OSX CALayer invisible needs to have opacity 0 to not show hidden component. Completes commit 3b02a219b1b9e446e87df1beb7da4266f74824fa See unit test: TestBug816OSXCALayerPos03AWT commit ae103ba597464ca25071950af7afe012e2b86c13 Author: Sven Gothel Date: Sat Oct 5 16:13:56 2013 +0200 Bug816 OSX CALayer: getLocationOnScreenNonBlocking(..) stop traversing at 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. commit 703fcd2a237f26c11421bf3ca85beaca4479c9e2 Author: Sven Gothel Date: Sat Oct 5 13:45:40 2013 +0200 test scripts (test Bug 729 w/ TestAWTCardLayoutAnimatorStartStopBug532) commit 3b02a219b1b9e446e87df1beb7da4266f74824fa Author: Sven Gothel Date: Sat Oct 5 13:44:43 2013 +0200 Bug 729: OSX CALayer shall honor the Component's visibility state A once visible CALayer (GLCanvas) must be able to become invisible w/o destruction, e.g. as required by CardLayout's switching cards. See unit test for Bug 532: 'TestAWTCardLayoutAnimatorStartStopBug532' Out native 'fixCALayerLayout(..)' takes the visible state as tracked by JAWTWindow's ComponentListener and sets our CALayer (root and sub) hidden state accordingly. Now MacOSXJAWTWindow's layoutSurfaceLayerImpl(..) always calls down to 'fixCALayerLayout(..)' due to update the visibility state. commit 61e47c5683ef038d8684bce56714ae0a514dd697 Author: Sven Gothel Date: Fri Oct 4 21:08:45 2013 +0200 Bug 816/848: Cleanup test applet layout/size ; Note Bug 848: Not reproducible after restart of OSX test machine! commit 7deea4c2494f7db4ac6ac9fafafaee00db402975 Author: Sven Gothel Date: Fri Oct 4 19:01:29 2013 +0200 artifact.properties: Add jogl.build.version:=jogamp.version commit 3a8c4d65f0e6e378738dc0c543173f79d10e5821 Author: Sven Gothel Date: Fri Oct 4 19:00:28 2013 +0200 Bug 848: Add test applet ; Bug 816 Bug816AppletGLCanvas02: Remove 2nd Animator ; Fix intendation (TAB -> WS) commit abdc28ec9304b39f981c49e2f9554e05aaff9cc3 Author: Sven Gothel Date: Fri Oct 4 09:25:13 2013 +0200 Bug 818: Add missing html file for applet unit test of commit 51ea4e5d5d212dfef519cf824d6cbf69e41bebc7 commit 50bc843365f65bc6b84a57baa429e32f53fa26e5 Author: Sven Gothel Date: Thu Oct 3 23:39:43 2013 +0200 AWTTilePainter: Avoid NPE if Graphic2D's AffineTransform is null, use identity tranform in such case. commit cdf38b01fc4b632554c6400239ca5cdca1fe13d9 Author: Sven Gothel Date: Thu Oct 3 20:21:23 2013 +0200 Bug 818: Enable new quirk GLSLNonCompliant on OSX < 10.7 w/ NV GPU; GLJPanel: Don't use GLSL flip if quirk GLSLNonCompliant is present. commit b05ccd62d28bcdc320fd35094f2d278b16743eab Author: Sven Gothel Date: Thu Oct 3 19:15:25 2013 +0200 Bug 548: GLRendererQuirks.GLFlushBeforeRelease is needed on OSX < 10.7.3 w/ NV GPU [was comparing against 1.7.3 instead 10.7.3] ! commit e9ce2246c947cc357fef993003008fe4c6a0495f Author: Sven Gothel Date: Thu Oct 3 15:35:09 2013 +0200 Bug 816 (OSX CALayer pos): Add detailed description (pseudo code) to JAWTUtil.JAWT_OSX_CALAYER_QUIRK_LAYOUT commit 7f7275834922b9c30aec6520dc5c5f20939a49d8 Author: Sven Gothel Date: Thu Oct 3 15:19:29 2013 +0200 Bug 816 (OSX CALayer pos): Fix location on 'inner CALayer' calculation 'inner CALayer' is the outter AWT Window client space (content). +++ Pseudo-Code: p0 = c.locationOnScreen(); p0 -= c.getOutterComp.getPos(); p0 -= c.getOutterComp.getInsets(); Where 'locationOnScreen()' is: p0 = 0/0; while( null != c ) { p0 += c.getPos(); } +++ JAWTWindow.getLocationOnScreenNonBlocking(..) validated against AWT's Component.getLocationOnScreen() - OK for all use-cases. (Validation enabled w/ DEBUG) All unit tests manually validated on OSX 10.7 w/ jdk7u40. commit 60968cdc388b6a7464da3a6b58f25cb61e29f681 Author: Sven Gothel Date: Thu Oct 3 15:07:07 2013 +0200 Bug 816: Add 2 more unit tests (Swing JFrame w/ 2 JRootPanes, AWT Frame BorderLayout w/ Checkbox North, GLCanvas Center) Thx to Emmanuel Puybaret commit b783e3172496cb93455339101a8c2c0814f6fafd Author: Sven Gothel Date: Thu Oct 3 00:22:15 2013 +0200 Bug818GLJPanelApplet: Remove unused imports commit 8234f7a4291de911ce416dcee8c22e12f61a0c3d Author: Sven Gothel Date: Thu Oct 3 00:03:27 2013 +0200 GLJPanel: Fix 7u40 access to property 'sun.java2d.opengl'. Property was trusted before .. commit 51ea4e5d5d212dfef519cf824d6cbf69e41bebc7 Author: Sven Gothel Date: Thu Oct 3 00:02:20 2013 +0200 Bug 818 (OSX 10.6.8 NVIDIA GeForce GT 330M): Add unit test (manual applet) commit ab860381009c0716a99d33f0ce99f44617edf9ce Author: Sven Gothel Date: Wed Oct 2 16:29:37 2013 +0200 Add notice about 'GL states' regarding GLSL vertical flip (Bug 842 and Bug 826). commit 543c8649f43fdc43028075d7472ad553299271bf Author: Sven Gothel Date: Wed Oct 2 01:12:20 2013 +0200 GLJPanel/AWTGLPixelBuffer: Reused BufferedImage didn't account for row-stride (regression of b33bdf41cf53f37203643a8551bf5d94b42a8fab) SingleAWTGLPixelBufferProvider w/ allowing row-stride reuses the AWTGLPixelBuffer and it's BufferedImage even w/ different width. This leads to distortion if using the BufferedImage unhandled. GLJPanel also set GL_PACK_ROW_LENGTH to pixelBuffer.width, which leads to an 'out-of-bounds' exception if ReadPixels is used w/ panelwidth and panelHeight. ++ Introduce AWTGLPixelBuffer.getAlignedImage(width, height) which returns an aligned BufferedImage while reusing the DataBuffer. GLJPanel fetches a new alignedImage if required. This allows a more efficient single buffer usage as intended, w/o the need of copying data. commit 00062e490f0b0cc2944a2167f2f00149c8ba352e Author: Sven Gothel Date: Tue Oct 1 15:36:56 2013 +0200 test scripts/setenv-jogl.sh: Remove JogAmp *LD_LIBRARY_PATH components. commit ac1901608c62ae1c5b82bccc3b2a70193031d5f0 Author: Sven Gothel Date: Sun Sep 29 10:25:32 2013 +0200 GLJPanel/Printing: Perform backend.reshape immediatly after printing if 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 commit afe6260776fcb61a2dba5c69f819ba9a7987afab Author: Sven Gothel Date: Sat Sep 28 04:27:05 2013 +0200 GLJPanel: Remove forced DEBUG .. at handleReshape in releasePrint (added w/ commit fe284b515d984198fdbe702837809f181625a457) commit 67200852b972f244ecc19d0c54b2f8d8080b0824 Author: Sven Gothel Date: Sat Sep 28 04:08:59 2013 +0200 Fix TileRenderer regression of commit c8abb9d2c9a8c92f0c5c42aba13e3e80c69739dc: Test isSetup() _after_ running glEventListenerPre. glEventListenerPre may be utilized to setup the TileRenderer. commit fe284b515d984198fdbe702837809f181625a457 Author: Sven Gothel Date: Sat Sep 28 04:03:04 2013 +0200 AWT Printing: releasePrint() issue reshape from AWT-EDT; GLJPanel: Issue 'handleReshape' if panelSize/awtSize mismatch, otherwise 'sendReshape' and exception if offscreen size doesn't match panelSize. commit c8abb9d2c9a8c92f0c5c42aba13e3e80c69739dc Author: Sven Gothel Date: Sat Sep 28 01:52:39 2013 +0200 TileRendererBase.GLEL.display(): Skip tile-rendering if TR is not yet setup. Sync issue w/ NEWT/AWT based GLAD NEWT based GLDrawables may trigger GLAD display() via native repaint events. If using in conjunction w/ AWT, i.e. NewtCanvasAWT and setupPrinting(..) has been called and it's attched to the TR .. it could happen that display tries to issue beginTile() before the TR is being setup. This patch mitigates this issue (while not removing it) by querying whether setup is completed. commit c943c8cfc39df64ec6682722e86a54c538d3497b Author: Sven Gothel Date: Sat Sep 28 01:48:45 2013 +0200 Fix AWT Printing: Use delegated GLDrawable's size for tile-size instead of AWT-GLAD's size, since the latter uses AWT's component size. .. the AWT component size could have been modified after setupPrinting(..). The AWT-GLAD getWidth() and getHeight() is implemented by AWT's component and hence may not reflect the actual GLDrawable size while printing. commit a2a057406ff5d21499860e8fef6ba88f07d9bf95 Author: Sven Gothel Date: Sat Sep 28 00:20:50 2013 +0200 Bug 816: Clarify JAWT_OSX_CALAYER_QUIRK_* semantics, add JAWT_OSX_CALAYER_QUIRK_LAYOUT commit ebb62e74f9e0dc87d7632cf16ca1bc7554ffcadc Author: Sven Gothel Date: Fri Sep 27 20:25:40 2013 +0200 Test applets .. change font of misc test section. commit 3abff83dbc0a99c8d227788c9dddbe59cd15b9ba Author: Sven Gothel Date: Fri Sep 27 15:31:17 2013 +0200 Fix Bug 816: JAWTWindow.getLocationOnScreenNonBlocking(..) shall use 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.
+ * This is due to experience that some JRootPane's + * do not expose valid insets value. - commit 469311764a1cb3c3af8439c1638160926741c1e5 Author: Sven Gothel Date: Fri Sep 27 13:49:59 2013 +0200 Test AWT Printing: Frame size contains border/insets, use as-is for scaling; Only force TEXT AA print-rendering hint. commit 9a8f9b9f7e6148b60b6f0f4326df8d213774284c Author: Sven Gothel Date: Fri Sep 27 13:23:39 2013 +0200 Bug 816: Fix JAWTWindow's getLocationOnScreenNonBlocking(); Derive CALayer 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 commit 4ef53cf2ae509a625795bfa3a8982ce75e24e83a Author: Sven Gothel Date: Fri Sep 27 07:13:24 2013 +0200 TileRenderer*: TileRendererNotify -> TileRendererListener w/ clarifying 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. commit 7ec812589190c0fbc6916cc22d9b74f009244f5c Author: Sven Gothel Date: Fri Sep 27 01:53:18 2013 +0200 DirectDataBufferInt: createBufferedImage(..) use BufferedImage type value 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. commit 6fbf6de172f50dce7f65790460458238bf780902 Author: Sven Gothel Date: Wed Sep 25 05:57:43 2013 +0200 Fix MovieCube/Simple Demo in 'Applet' mode: Use default ctor to completly initialize GLMediaPlayer demo w/ def. stream etc; Fix list of command keys in applet html page. commit 7231fa94ce228b1ea31acba5582e95b0c9f40778 Author: Sven Gothel Date: Wed Sep 25 02:08:42 2013 +0200 OSXMisc.c: Fix compilation error w/ java6's jint definition (probably clang as well) Regression of commit 4b5435c68c3f12d62dadb395957362eceacfb25c commit 4b5435c68c3f12d62dadb395957362eceacfb25c Author: Sven Gothel Date: Tue Sep 24 23:13:16 2013 +0200 Bug 816: Fix OSX CALayer 'quirks' for AWT 1.7.0_40 - See JAWTUtil 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 commit 2f09d266f75dfb4ab0d4504dd0a7699757bc40b3 Author: Sven Gothel Date: Tue Sep 24 20:15:51 2013 +0200 TileRendererBase: Remove redundant reshape propagation of atached GLEL, call pre/post reshape in it's display method instead. commit 51ae910b9ad4f3691c2b91a912b94701d0ef98ac Author: Sven Gothel Date: Tue Sep 24 11:04:24 2013 +0200 Bug 816: Add unit test 'TestBug816OSXCALayerPosAWT' commit c5bec6b8f5c33a812338dcbe8994546bddf0508b Author: Sven Gothel Date: Sun Sep 22 02:35:11 2013 +0200 Fix Bug 840: DefaultEDTUtil.restart() shall only reuse ThreadGroup (tg) is 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.(Unknown Source) at jogamp.newt.DefaultEDTUtil$NEDT.(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. commit 4ef07dc20a3d867feb1c51b4ce22ae3d06094781 Author: Sven Gothel Date: Sat Sep 21 05:19:32 2013 +0200 Fix Bug 839: Clarify whether resetStates(..) shall clearStates() - Pass 'isInit' flag. commit 939d6304d464e69b1d1d2a104c3da5536d3bf326 Author: Sven Gothel Date: Fri Sep 20 12:29:49 2013 +0200 AWT Printing: Fix non vertical-flipped printing, i.e. cut-off top-row's tile 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. commit c427ed22244df44b71a0f1f000b0f93e56c283c2 Author: Sven Gothel Date: Fri Sep 20 12:18:48 2013 +0200 Fix Bug 826: GLJPanel: Fully restore TextureState and Viewport 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 commit 51df3f354a700454498371c0565bfcd6c0d3bf5f Author: Sven Gothel Date: Fri Sep 20 11:37:38 2013 +0200 Bug 839: Clarifying GLStateTracker.clearStates(..) remove 'enable' change - Part 1 TODO: Only disable state tracker at GLContext.destroy() commit b1db882abfe6166abb5f06df8ff2d386e5f8f842 Author: Sven Gothel Date: Thu Sep 19 09:20:03 2013 +0200 Fix Bug 835: Use target.[sourcelevel,targetlevel,rt.jar] for all javac tasks. Before we bumped java language version to 1.6, i.e. target == 1.5, we required to compile some parts w/ the host level (1.6). This is no more required. commit 5822557d00b43ee3655db4343eeefcd417094983 Author: Sven Gothel Date: Thu Sep 19 08:00:26 2013 +0200 TestTiledPrintingGearsSwingAWT: Enable 'bitmap' test only on Windows, issues w/ AMD catalyst driver and pixmap surface .. commit 99e303b6bc7f87a31efb82856bd1baae9ba3e52b Author: Sven Gothel Date: Thu Sep 19 04:17:51 2013 +0200 Bump to JDK/JRE 7u40. commit 8a4a64e1a3e9beb09580ba95fe85026abf2ff106 Author: Sven Gothel Date: Thu Sep 19 03:21:15 2013 +0200 AWTTilePainter.setupGraphics2DAndClipBounds(): Use 'Shape getClip()'; Use 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. commit 94117c091a253903d164a2934ea8ab1d70e9003e Author: Sven Gothel Date: Thu Sep 19 02:57:41 2013 +0200 AWT Print Tests: Only include 600dpi tests if requested via main arg '-600dpi' commit 5ee2fa951894ee3fdaab7b002e475c173ab5cf17 Author: Sven Gothel Date: Wed Sep 18 17:31:45 2013 +0200 AWTTilePainter: Fix case with no GLOrientation, i.e. no vertical-flip. Tile location and destination must follow same math as w/ vertical-flip. .. clipping and tile-height was not considered. commit 31deb28db53c426136805ff8ecb63f93a3bf8247 Author: Sven Gothel Date: Wed Sep 18 17:13:46 2013 +0200 RedSquareES1: Add TileRendererBase.TileRendererNotify commit 21d786fa2ed66588a8ec1a7c2cac8f716d7d23de Author: Sven Gothel Date: Wed Sep 18 02:30:02 2013 +0200 AWTTilePainter: Fix DEBUG message (used wrong value at println) commit b54e3dfb6a8490fbe7dcd3fe1927241bd5328335 Author: Sven Gothel Date: Wed Sep 18 02:29:24 2013 +0200 Fix SharedResourceRunner's potential race-conditions. Use top-level synchronization simplifying code and better robustness. commit 988da6f30322176b8301d17709f5461c35a01e19 Author: Sven Gothel Date: Tue Sep 17 16:09:10 2013 +0200 AWT Printing: Move init-test of setupPrint(..) to AWT-EDT Runnable ; GLJPanel: Attempt to initialize if not done yet (similar to GLCanvas) commit 4e1d3170667d6692c484b8366d578ab830408175 Author: Sven Gothel Date: Tue Sep 17 03:01:11 2013 +0200 Print Tests: Split 'Printable' to own class, add OffscreenPrintable using NIO BufferedImage, adding OffscreenPrintable tests to all unit tests. commit 8afc1091532b0f18f30325aa3a504e7a7e975ce9 Author: Sven Gothel Date: Mon Sep 16 03:13:16 2013 +0200 TestTiledPrintingNIOImageSwingAWT: Add layered test ; Use 300dpi instead of 600dpi commit 06b47d1f738c94ca28c0959a12b05d880bc8a78b Author: Sven Gothel Date: Mon Sep 16 02:59:30 2013 +0200 Add 'DirectDataBufferInt' supporting NIO based BufferedImages - 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 commit efa8a7927eb8c69e45787d15306e172e440c6150 Author: Sven Gothel Date: Sun Sep 15 23:46:35 2013 +0200 Updating doc AWTPrinting.txt commit c2ce31e11eefcf1b900c0e9b41264f5d5566dc46 Author: Sven Gothel Date: Sun Sep 15 23:27:16 2013 +0200 Fix AWT printing issues w/ overlapping and/or non-opaque contents ; Change 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 .. commit 5a946df8fd812570826f267d4123b59d79c97cf7 Author: Sven Gothel Date: Sun Sep 15 22:52:47 2013 +0200 TileRenderer: Add and expose clipped image size; Expose size of tiles. 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. commit 52f348c1a58e12c16bea87cf6951be344b8663ed Author: Sven Gothel Date: Fri Sep 13 19:47:12 2013 +0200 AWTTilePainter: Fix null clip-rect (consider scaling); Fix non GL-oriented drawable, skip vertical flip and use 1:1 y-coord. commit 77196201f7e9ae3ceed493fb025264c90ed9a554 Author: Sven Gothel Date: Fri Sep 13 19:44:38 2013 +0200 Complete commit 4b866d2686ab9c3fd7cf6708925b4663ad81e359: Relocate FFMPEGNatives.initIDS0() -> FFMPEGStaticNatives.initIDS0(); Cleanup up warnings and includes (clang); Forgot to commit new ffmpeg_static.h commit 5dce252bfcc49995c2bda1d91e010c4c73f71ddb Author: Sven Gothel Date: Fri Sep 13 19:21:52 2013 +0200 Add support for clang ; Use __APPLE__ predefined macro commit 4b866d2686ab9c3fd7cf6708925b4663ad81e359 Author: Sven Gothel Date: Wed Sep 11 20:23:32 2013 +0200 Relocate FFMPEGNatives.initIDS0() -> FFMPEGStaticNatives.initIDS0(); Cleanup up warnings and includes (clang). commit 5e3ee6c19a4291b309deb572d434f1c5df975024 Author: Sven Gothel Date: Wed Sep 11 16:40:42 2013 +0200 Fix TileRendererBase Bug: Avoid multiple GLEL init(..) call. commit 52820ff19070a8ae9f3966d8c8da42265f1481c2 Author: Sven Gothel Date: Wed Sep 11 16:39:54 2013 +0200 Gears, GearsES2, RedSquareES2: Proper debug output for init, reshape and dispose commit cc27031a8199cdd9d9702d936af6e5d23c12e7d8 Author: Sven Gothel Date: Wed Sep 11 10:26:30 2013 +0200 Add 2nd 'demo' canvas to the other tiled printing tests. commit 8d212bec7f6968a3d7e7af6bbbe9c394820f2a65 Author: Sven Gothel Date: Wed Sep 11 10:25:43 2013 +0200 RedSquareES2: Fix tiled aspect ratio commit 569c538b439275222ed40c249f4ecd7516c2945b Author: Sven Gothel Date: Tue Sep 10 23:37:14 2013 +0200 TestTiledPrintingGearsSwingAWT: Add a second demo GLEventListener showing it's working/scaling well; Adding TileRendererBase.TileRendererNotify to RedAquareES2 having a 3rd demo case. commit d2be196ba129ff5b690189a95ba21137523c3352 Author: Sven Gothel Date: Tue Sep 10 23:07:31 2013 +0200 Gears*: Clarify frustum calculation for tiling commit 597ca0edc8ba536e82494b56bd1bbd6f8290efa6 Author: Sven Gothel Date: Tue Sep 10 23:06:38 2013 +0200 AWT Printing: AWTTilePainter needs to handle null clip! commit badc13213bcf952830afe606ba71683540aba5a3 Author: Sven Gothel Date: Sun Sep 8 19:51:21 2013 +0200 AWTPrintLifecycle: Add DEFAULT_PRINT_TILE_SIZE (512); Remove unused imports. commit fb6440fb6e4fac31d03799d5cf804d02c78f2c38 Author: Sven Gothel Date: Sun Sep 8 19:26:20 2013 +0200 NewtCanvasAWT: Implement AWTPrintLifecycle and hence support for AWT printing. 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. commit 541701f5803c5005864efcb09a0c4aacecb470f9 Author: Sven Gothel Date: Sun Sep 8 19:22:57 2013 +0200 TiledPrintingAWTBase/doc: Add description of how-to add a 'print-to-file' printer driver on OSX commit 2a595c3d163d375a3fabc8c8b754492c0f2926d5 Author: Sven Gothel Date: Sun Sep 8 19:17:23 2013 +0200 build-*.xml: Unify 'javah' tasks where possible, i.e. per destination directory and classpath. This hopefully saves a few milliseconds in the build :) commit c9935d087350630f25046b5b757941fbef3a6044 Author: Sven Gothel Date: Sun Sep 8 19:16:09 2013 +0200 Add AWTTilePainter.dumpHintsAndScale(..), removing more duplicated code from GLCanvas/GLJPanel commit d0e0b963da223e00359cad194061f5a967b2caae Author: Sven Gothel Date: Sun Sep 8 15:43:03 2013 +0200 TileRenderer*: API doc fixes commit 8313200af6da93f83bc70a645e79bfdeb22f05d4 Author: Sven Gothel Date: Sun Sep 8 15:13:00 2013 +0200 TileRenderer*: Fix pre-swap and post-swap in regards to endTile(..), i.e. pre-swap only for FBO && MSAA. See TileRendererBase.reqPreSwapBuffers(..) API doc. commit 78b65d52385f4a15e4357d0444ea9daec54fb173 Author: Sven Gothel Date: Sun Sep 8 13:58:58 2013 +0200 doc/Implementation/AWTPrinting.txt: Adding ref to AWTPrintLifecycle commit 6c823db5c504d29a4a54c6756e4e3113848d39dd Author: Sven Gothel Date: Sun Sep 8 13:39:27 2013 +0200 Fix some JavaDoc and API doc (reference) bugs .. commit c654bf3605ff4dca6d8231c2fe8b4db8e6b22b4c Author: Sven Gothel Date: Sun Sep 8 12:32:56 2013 +0200 AWTPrintLifecycle: Add detailed API doc commit df0f31459ec65835cd9e1741dbbd2b9d10aa0cd6 Author: Sven Gothel Date: Sun Sep 8 03:23:19 2013 +0200 Aggregate and cleanup '.ps' and '.pdf' artifacts (printing tests) commit b42918e0271e66829cd630dedfe12a81e0281aec Author: Sven Gothel Date: Sun Sep 8 03:17:01 2013 +0200 doc/Implementation/AWTPrinting: Update to match latest code commit 76048cd784ea6df32f19e97bb228e4ead880ea07 Author: Sven Gothel Date: Sun Sep 8 03:02:36 2013 +0200 Test: Don't resize frame, tweek print-matrix; AWTPrintLifecycle: Add scale 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 commit 9b5cee85c299e72735bebbfea5c23d3c71bc704e Author: Sven Gothel Date: Sat Sep 7 19:59:15 2013 +0200 TiledPrintingAWTBase: Fix scaling - Fit frame to page, add MSAA 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 commit 4965923722fe44dfcf7eaff16cd5449707773123 Author: Sven Gothel Date: Sat Sep 7 19:47:28 2013 +0200 TileRenderer*: Fix FBO MSAA use-case, i.e. call swapBuffers() before 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 downsampling to the readable sampling sink. Otherwise, we will be 'one tile behind' ! commit 6fe3e99dab9721294a3bf72eaea77af33afc9481 Author: Sven Gothel Date: Sat Sep 7 16:57:47 2013 +0200 Fix TileRenderer*: Allow general usage w/ any GL profile, only image-buffer 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. commit 42500210d8a8626ee6c3c1b169eaa9e5fbf85a21 Author: Sven Gothel Date: Sat Sep 7 16:50:39 2013 +0200 Complete commit 54dcdf1f53c9fc1f7124cf77bbf5aa952d42053a, exposing GL2ES3 in GLProfile (just a query, no new profile) commit 4b5e77961d1c660f3537f4041fc1a3ce47ef105c Author: Sven Gothel Date: Sat Sep 7 12:52:19 2013 +0200 AWT/GL Printing WIP: Abstract AWT tile painting code out to AWTTilePainter, reused w/ GLCanvas and GLJPanel commit 27c4a837580c7a68582e852d5ff64f733e669509 Author: Sven Gothel Date: Fri Sep 6 23:46:13 2013 +0200 TestTiledPrintingGears*AWT: Add 4s delay before closing frame and ending unit test to wait for print-job (?) .. otherwise results are cut-off .. better solution ? callback ? commit b780eff49b626bd8429e1e87609f7a917f7b094e Author: Sven Gothel Date: Fri Sep 6 23:14:11 2013 +0200 GLCanvas Printing WIP: Add GLJPanel; GLCanvas TILE_SIZE 512; print(Graphics): Don't force on AWT-EDT -> Deadlock; releasePrint(): perform reshape/display! commit 95d49687f5b9b783f3d8008df86df58cc0f9bfab Author: Sven Gothel Date: Fri Sep 6 20:15:54 2013 +0200 Add AWTPrintLifecycle interface describing impl. w/ setupPrint()/releasePrint(), modularize unit test TestTiledPrintingGearsAWT commit 4840117d274f9042fc6528722c1af157ad36384e Author: Sven Gothel Date: Fri Sep 6 19:58:35 2013 +0200 Added AWTPrinting document .. commit c527f824d7769dac07ff3e064f216fb664742494 Author: Sven Gothel Date: Fri Sep 6 19:05:23 2013 +0200 TestTiledPrintingGearsAWT: Perform AWT mods on AWT-EDT, always perform g.scale(..), pass 'offscreen' w/ manual printing as well commit de538efc92346cada023a6045d8aec3cbdd47e08 Author: Sven Gothel Date: Fri Sep 6 16:44:27 2013 +0200 GLCanvas Printing WIP: Perform all print* operations on AWT-EDT, clip before drawing image and show same; Test: Add offscreen print and add borders. commit 44346b334ab47838f6a770a02f02036aa640f18c Author: Sven Gothel Date: Fri Sep 6 16:42:25 2013 +0200 TileRenderer*: Add more detailed 'toString()' - override for TileRenderer commit 6ef3c22ac6d633f8c0b903b34d5e3d7736f3a040 Author: Sven Gothel Date: Fri Sep 6 04:36:19 2013 +0200 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 commit 8ddfde29185cc0984ef37ca20322636b76506883 Author: Sven Gothel Date: Fri Sep 6 04:28:56 2013 +0200 TileRendering / Gears: Clarify PMV math, if tiling use white background (-> print) commit 668ed1ab3ff3aad4366e00ede918b186d6e057a4 Author: Sven Gothel Date: Fri Sep 6 04:27:46 2013 +0200 TileRenderer*: TileRenderer adds setTileOffset(..), getParam(pname) shall always return last result, no overloading of attachToAutoDrawable(..); Fix comments TileRenderer: - adds setTileOffset(..) A tile offset might be required, i.e. via a given rectangular clip bounds - getParam(pname) shall always return last result Even when finished tiling, the last value shall be returned, otherwise a post endTile() is unable to retrieve the value. - No overloading of attachToAutoDrawable(..) No reason to complicate usage by mutating semantics, call setTileSize(..) manually TileRendererBase: - Fix API doc: TR_CURRENT_TILE_X_POS, TR_CURRENT_TILE_Y_POS commit b09cd25702e6ffd5197ec02cf3d34b4c2876b67b Author: Sven Gothel Date: Fri Sep 6 04:21:36 2013 +0200 GLDrawableUtil.swapGLContextAndAllGLEventListener: Fix comment - Add remark about GLAnimatorControl's which association gets swapped as well. commit 3df81d611f2f2700f8c48d592d7ef0537a93986b Author: Sven Gothel Date: Thu Sep 5 17:29:16 2013 +0200 Add TestGLContextDrawableSwitch02AWT: Test AWT GLCanvas <-> GLOffscreenAutoDrawable switch, forth & back commit d2ed1b9d211391e8eccc9a4e6afb321d4b77dbb5 Author: Sven Gothel Date: Thu Sep 5 16:32:15 2013 +0200 TestTiledPrintingGearsAWT: Fix margin translate for high dpi, i.e. other than 72dpi commit cd34ea267adf538bb7e11267f81d2941a5987d8f Author: Sven Gothel Date: Thu Sep 5 16:19:08 2013 +0200 Test scripts .. commit 1fda7759932323eba3875b90b86ec501455efbca Author: Sven Gothel Date: Thu Sep 5 16:18:56 2013 +0200 GLVBOArrayHandler: Remove unused imports commit cd2b491d593b7dc4deecf023c359a0385d9bf242 Author: Sven Gothel Date: Thu Sep 5 16:18:37 2013 +0200 GLCanvas Printing WIP - Add TestTiledPrintingGearsAWT commit 9450900c2178db617ee786d8795146bf4c6aa63c Author: Sven Gothel Date: Thu Sep 5 15:10:07 2013 +0200 TileRendererBase: API-doc cleanup; Fix GLCanvas, WIP printing .. commit 3f2e0d3a9a6cab80936851c44f61107a2993ddfe Author: Sven Gothel Date: Thu Sep 5 12:47:15 2013 +0200 TileRendererBase: Add interface TileRendererNotify, to notify implementing GLEventListener about attached/detached TileRenderer .. since GLEventListener's reshape(..) method must query certain tile renderer attributes (tile pos and image size), they have to be aware of the TileRendererBase. To simplify such awareness and hence automate this attachement and passing over the tile renderer reference, they should implement this new interface. Gears example implements the new interface, which caches the TR reference and pauses rotation. commit 7ee9b87bdb025f98651c2685d416029a17fc3937 Author: Sven Gothel Date: Thu Sep 5 09:56:40 2013 +0200 TileRendererBase: Add toString(), Proper tile unit test names, i.e. add NEWT for UI agnostic (no-awt tests). commit 604434f8a1ea43f306e21fe81ac7471f27e3c9cf Author: Sven Gothel Date: Thu Sep 5 08:32:31 2013 +0200 TileRenderer*: Enhance API Doc; Cleanup OO; Remove PMVMatrixCallback, use GLEventListener reshape(..) or manual reshape after beginTile(..) method. GLEventListener reshape(..) method should be aware of TileRenderer usage and get the missing tile position and image size from it (-> see Gears example). TestRandomTiledRendering3GL2AWT demos AWT GLCanvas onscreen being used for random tile rendering to produce a PNG file. TestTiledRendering1GL2 is now GLAutoDrawable/GLEventListener agnostic, hence demos plain GLDrawable tile rendering usage. commit 58682d84c09462b1f2798b847ade6624b89d962f Author: Sven Gothel Date: Wed Sep 4 19:23:23 2013 +0200 TileRenderer*: Align impl. to common abstract superclass TileRendererBase (cleanup / API doc) commit b1c921edf01605e1626953c5cf76f72845b01746 Author: Sven Gothel Date: Wed Sep 4 16:56:19 2013 +0200 TileRenderer: Unify TileRenderer, add RandomTileRenderer (both utilizing GLPixelBuffer, and pre/post GLEventListener) commit b02fb06099e36b678a54f9ce26d127042f95e44f Author: Sven Gothel Date: Wed Sep 4 16:24:02 2013 +0200 PNGImage: Bounds check in getPixelRGBA8(..) and setPixelRGBA8(..) commit b33bdf41cf53f37203643a8551bf5d94b42a8fab Author: Sven Gothel Date: Wed Sep 4 16:23:32 2013 +0200 GLPixelBuffer*: Add componentCount==1 (ALPHA/RED), 'allowRowStride' utilization AWTGLPixelBuffer* -> GLPixelBuffer* GLPixelBufferProvider: - Default*.getAttributes(): Add componentCount==1 (ALPHA/RED), validate values, throw exception if n/a or not supported - Add 'allowRowStride' (as for AWTGLPixelBufferProvider) - Add default for true and false GLPixelBuffer: - Add 'allowRowStride' (as for AWTGLPixelBuffer) - Fix requiresNewBuffer(..): - aquire minByteSize if passed one is <= 0 - validate minByteSize w/ currentByteSize according to allowRowStride. AWTGLPixelBuffer: 'allowRowStride' impl. moved to GLPixelBuffer. commit 8215886492eca47c036ed35861956290d2f3e898 Author: Sven Gothel Date: Tue Sep 3 16:29:00 2013 +0200 Test scripts .. commit c8b0516472dec8b76cc7c3a3f71683ffe1410a3a Author: Sven Gothel Date: Tue Sep 3 16:28:32 2013 +0200 Cleaned up TiledRenderer capable to be used w/ GL2ES3 and TiledRenderer2 to be used w/ GLAutoDrawable. - Remove GL2 dependencies - Only requires PixelStorage ROW_LENGTH -> GL2ES3 - Position target buffer position according to skip [pixels, rows] - Use an interface PMVMatrixCallback, allowing user to reshape the custom 'PMV Matrix' according to the current rendered tile - Properly adjust tile/image buffer to written position and flip for read operation commit e3a5868b189b4979a8a85746b1ae3b880ed8f8f0 Author: Sven Gothel Date: Tue Sep 3 15:28:41 2013 +0200 Gears: Make rotation optional commit f4ba3b4c780e96bda3d082dc793ed278de2f1c00 Author: Sven Gothel Date: Tue Sep 3 15:27:54 2013 +0200 GLReadBufferUtil.readPixels(..): Use plain int values for inWidth/inHeight, instead int[] - no return value desired. commit 33345ad2e7112ea6cf87b5c69fba0587553c8e3b Author: Sven Gothel Date: Tue Sep 3 15:26:35 2013 +0200 GLPixelStorageModes: Fix API doc references, Add set[Pack|Unpack]RowLength(GL2ES3 gl, ..) commit 4455e56f4f9294fe50cafabc6d08867bb82c416f Author: Sven Gothel Date: Tue Sep 3 15:24:27 2013 +0200 GLBuffers: Align comment commit 54dcdf1f53c9fc1f7124cf77bbf5aa952d42053a Author: Sven Gothel Date: Tue Sep 3 15:24:10 2013 +0200 GL*, GLContext: Expose isGL2ES3() and getGL2ES3() for convenience. commit 14eab8af439e6e7ce7ee08a9ca13fec3f3a80d25 Author: Sven Gothel Date: Mon Sep 2 21:01:10 2013 +0200 Fix Bug 810: Adding Julien Gouesse's fix while moved the new 'addNativeJarLibsJoglCfg(..)' to GlueGen, commit c0ead6fa10280f8076704726d59f482b183fd77e commit 275540ba96155277d45b4312888e60b65c372454 Author: Sven Gothel Date: Mon Sep 2 11:40:23 2013 +0200 Revert commit 4beef4fe856690b070ba06a6caf4515aebd7171b manually for testing purposes .. (ATI fglrx driver issues) commit 4beef4fe856690b070ba06a6caf4515aebd7171b Author: Sven Gothel Date: Mon Sep 2 09:11:50 2013 +0200 X11GLXDrawableFactory.Shutdown: Disable shared context destruction since it may lead to a JVM freeze .. .. on ATI fglrx driver 32bit on 64bit w/ a frozen shared GL context involved. Hence we have to rely on the driver cleanup when JVM hits 'exit', equal to the Windows implementation. commit 32171ee45370a9c6dacb582c39d51d0ff17911f1 Author: Sven Gothel Date: Mon Sep 2 07:05:11 2013 +0200 Animator/GLWindow: Catch 'ThreadDeath/Throwable' and dump info in DEBUG mode (cosmetic change only); Typo in comment; TestSharedContextListNEWT2: Stop animator. commit 43cc2ea7529f92068ec3645e87e439f129fec99b Author: Sven Gothel Date: Mon Sep 2 04:39:15 2013 +0200 Add '@FixMethodOrder(MethodSorters.NAME_ASCENDING)' to all *Test* classes; Relying on junit 4.11 + hamcrest 1.2 (deployed in Gluegen junit.jar) See gluegen commits: - 10a28c860bd3f4ccecef156c9bbbc88087bf568d - 70c9ba258c5ba3d78f0f52faf37d88b4c62d0c96 commit 87fe4c89d1b69773d62c1917594ddf7a724c6d71 Author: Sven Gothel Date: Sun Sep 1 23:26:43 2013 +0200 FFMPEGMediaPlayer: Handle use-case of having [av|sw]resample lib, but not compiled for it -> pass Scenario ffmpeg-0.10, where we are not prepared (compiled-in) for sw-resample support. Don't use if compiled in version (CC) is < 0 (n/a), and allow to pass at load time. commit dc604ed9b4085d406a8f95d235501e427458d24e Author: Sven Gothel Date: Sun Sep 1 06:36:59 2013 +0200 ffmpeg_impl_template: Remove DEBUG line .. commit 14d2d6865ebcfd8f4c1bdb1600f29fc2b1a4366d Author: Sven Gothel Date: Sat Aug 31 16:40:44 2013 +0200 GLMediaPlayer: pause() -> pause(boolean flush): Allowing to flush buffers, next frame after play() will provide new frame. Added API doc. commit 658493d2cdceeb9a61d6c40b3d8f7354ce0d7534 Author: Sven Gothel Date: Sat Aug 31 07:38:14 2013 +0200 WWW: Remove 'Meet us @ SIGGRAPH 2013' ; Siggraph 2013 link to local doc page! commit 5b77b3c5c9c55eec45c145dd61965393f159103b Author: Sven Gothel Date: Sat Aug 31 07:35:47 2013 +0200 GLContext: Add missing 'isGLESProfile()' and fix 'isGLcore()', i.e. GL2ES2 -> GLES2 (in profile set) commit 1693604b4daae4571069b58bdc863516b95999a6 Author: Sven Gothel Date: Sat Aug 31 02:31:13 2013 +0200 FFMPEG/GLMediaPlayer: Fix compiler errors w/ new MingW 4.8.1: 'strsafe.h' -> don't use tchar.h; Fix compiler warning: Add missing (intptr_t) cast. commit f5bc467cfa7deebabfdab6335c6c3704bc610609 Author: Sven Gothel Date: Sat Aug 31 02:29:39 2013 +0200 Scripts/Windows: Test x32 and x64 builds w/ ffmpeg 2.x ! commit 93765228f467c531f11d1c9c4fe3d4f8406f8db1 Author: Sven Gothel Date: Sat Aug 31 02:28:38 2013 +0200 Doc/HowToBuild: Windows x32 and x64 require new MingW64 Versions, tested w/ >= 4.8.1 - The previous MingW64 would still work, however we should align 32bit and 64bit versions - Mingw 32bit does not support dshow/com properly! - Use MingW64 32bit builds solve the problem commit a7024efba2fb3731d0a67df187c258edf2b33f0d Author: Sven Gothel Date: Fri Aug 30 17:31:56 2013 +0200 GLWindow: Shorten API-doc references commit 4cb3763415bb5f82520fd02f56412076f80a84e6 Author: Sven Gothel Date: Fri Aug 30 17:31:34 2013 +0200 GLMediaPlayer enhancements: State, Camera options, detect and act on orientation change (flipped), API-doc, - State - Fix state transition (initGL() error) - Camera options - options uses ';' as query separator - don't use 'default' options, driver should know - Detect and act on orientation change (flipped) - ffmpeg impl detects if flipped changes and triggers a SIZE update event. This allows application to react, i.e. re-init GL and use new TextureCoord's. Test: Works well on Windows w/ rawvideo dshow camera driver/codec. - API-doc - TexSeqEventListener/GLMediaEventListener usage / constraints (GL, ..) - State transition fix commit ad4797e6875d8fc635971ed6d8dd68326c083540 Author: Sven Gothel Date: Fri Aug 30 10:10:32 2013 +0200 Texture: Add 'setMustFlipVertically(boolean)' allowing to change the flipped characteristics. commit e1883b6402231044cc6bdf67a45c1b3610e34535 Author: Sven Gothel Date: Fri Aug 30 09:38:01 2013 +0200 FFMPEGMediaPlayer: Handle v-flipped 'bottom-up' pictures ; Refine API doc 'camera ID' If linesize is < 0, it is not invalid as assumed in commit eca6a5cb1e2beda84dfbafc31ed225e272f4f3fb, but vertically flipped (bottom-up). We have to adjust the data pointers, which are moved to the upper end of memory as well and can proceed as usual. TODO: - Update texture 'mustFlipVertically' to 'false' in this case. - Later: - Allow updating texture size .. - Whole pixel-fmt/texture-lookup-shader association must scale better, i.e. extract the 'knowledge' into one class, use a static shader code using uniforms instead of hard-coded values .. etc. commit eca6a5cb1e2beda84dfbafc31ed225e272f4f3fb Author: Sven Gothel Date: Thu Aug 29 22:46:57 2013 +0200 Enhance GLMediaPlayer: Full FFMPeg support, 'dshow' camera support on windows, 2 more pixel formats, fail-safe data handling - add support for ffmpeg 2 / libav 10 -> lavc55_lavf55_lavu52_lavr01 - add support for ffmpeg libswresample (similar to libavresample) - handle BGRA (GL type) and BGR24 (texture shader) - Change Camera URI semantics, drop 'host' and use 'path' for camera ID and use 'query' for options. - add support for Window's DShow camera selection - our camera id -> index of list of video-input devices, this gives us same behavior as w/ Linux - requires windows libs: strmiids, uuid, ole32, oleaut32 - Compiles w/ MingW64, works w/ libav/ffmpeg - TODO: test compilation w/ MingW 32bit ! - don't push data to texture if (linesize <= 0) this may happen due to buggy decoder / setup .. Tested manually on GNU/Linux x64 and Windows x64: - GNU/Linux libav 0.8, libav 9, libav 10, ffmpeg 1.2, ffmpeg 2.0 - Windows libav 0.8, libav 9, ffmpeg 2.0 - videos and camera commit 9bf14f3c6bf98bd86913bec6e7feb54537f9b7d3 Author: Sven Gothel Date: Wed Aug 28 12:44:06 2013 +0200 Fix libav/ffmpeg compilation; FFMPEGMediaPlayer Enahncements (More YUV*, Use def. high camera options, cleanup symbols) - Fix libav/ffmpeg compilation - Split native GLContext code from JoglCommon - JoglCommon is required for ffmpeg_* c-compile/link - Supported versions now: - 0.8 53.53.51 - 9.0 54.54.52 - FFMPEGMediaPlayer - Update API doc, add compatibility .. etc - Pixel format conversions (via shader texture lookup func): - YUV420P, YUVJ420P - YUV422P, YUVJ422P - YUYV422 - Properly handle aid/vid - In camera mode: set high default values - TODO: Make it configurable via camera URI: - video_size - framerate - ? - FFMPEGDynamicLibraryBundleInfo - Cleanup symbols / remove unused (pre 53) - Add av_dict_* methods commit b99511d438a6c621a5afc582168cca69bd2eb9da Author: Sven Gothel Date: Wed Aug 28 02:45:27 2013 +0200 FFMPEGMediaPlayer: Fix av-audio-fmt -> AudioFormat parsing (fixedP was wrong for float values) commit 15ec34db947f89b1d20043b729a09413a425de5d Author: Sven Gothel Date: Wed Aug 28 02:44:29 2013 +0200 Fix libav/ffmpeg compilation: Use 'dot less' dir/file names; Compile ffmpeg version dependent c-files individually and inject object files. ; ffmpeg *register_all() at setStream0(..) - Use 'dot less' dir/file names - Compile ffmpeg version dependent c-files individually and inject object files. - ffmpeg *register_all() at setStream0(..) - Only register devices if available _and_ camera is requested. commit 5031a42647442b71ef32041d332ed5f22d3e6ecf Author: Sven Gothel Date: Tue Aug 27 23:41:15 2013 +0200 Fix libav/ffmpeg compilation across platforms: Remove symbolic links commit 70fb61d39f4e40de62dd44b2d8c88d43b9efaf42 Author: Sven Gothel Date: Tue Aug 27 23:38:51 2013 +0200 Fix libav/ffmpeg compilation across platforms: Move header back to 'stub_includes' commit b7e1dcb2b510c91a0e61bea12d0fc153878f894a Author: Sven Gothel Date: Tue Aug 27 19:22:23 2013 +0200 GLBuffers: Add forma GL_YCBCR_422_APPLE and types GL_UNSIGNED_SHORT_8_8_APPLE, GL_UNSIGNED_SHORT_8_8_REV_APPLE. commit 554ec0576432194f050191bdf248a1462d542a6d Author: Sven Gothel Date: Tue Aug 27 19:21:17 2013 +0200 GLMediaPlayer: Add camera input / FFMPEG: Fix 'av_packet' leak and add missing symbol 'av_realloc'. - Add camera input - Use URI w/ scheme 'camera' to determine camera input is desired, use URI host as camera id. E.g. 'camera://0' for 1st camera. - AndroidGLMediaPlayerAPI14: Via 'Camera' - FFMPEG*: Via libavdevice, device name and input format - TODO: Add controls to manipulate camera if available - FFMPEG* - Add symbols - avcodec_register_all - av_realloc (was missing) - avdevice_register_all - Load libavdevice (opt) - Camera: - Use (windows) and /dev/video other OS - simply find the input format in native code - Support YUYV422 (used in video4linux2, etc.) - Stuff 2x 16bpp (YUYV) into one RGBA pixel! - Add texture format for 16bpp - Add texture lookup shader - Fix av_packet leak in readNextImpl(..) - Restore orig pointer and size values, we may have moved along within packet. Then call av_free_packet(). - Use null AudioSink if audio-id is NONE commit 0de489019085246abb437454e9ac8fd6fc238692 Author: Sven Gothel Date: Mon Aug 26 13:53:56 2013 +0200 ALAudioSink: Remove force DEBUG info commit 1801fb8b27ad3b7b2a43c62dcf536b27c67e2f94 Author: Sven Gothel Date: Mon Aug 26 13:45:43 2013 +0200 FFMPEGNatives*: Add missing license header commit b5876b598ecf3eb32ceb183ecbd5d29b8885a304 Author: Sven Gothel Date: Mon Aug 26 13:38:40 2013 +0200 libav/ffmpeg: Compile/Link 2 versions of native FFMPEGMediaPlayer methods FFMPEGNatives -> FFMPEGv08Natives + FFMPEGv09Natives Enables FFMPEGMediaPlayer to work w/ either ffmpeg/libav version 8 or 9 w/ same JOGL binary Same C source code is compiled against 1: version 0.8 FFMPEGv08Natives lavc53.lavf53.lavu51 2: version 0.9 FFMPEGv09Natives lavc54.lavf54.lavu52.lavr01 FFMPEGv08Natives and FFMPEGv09Natives implements FFMPEGNatives, native C code uses CPP '##' macro concatenation to produce unique function names. To enable 'cpp' to find the libav* header files matching the desired version, we have placed them in the c-file's folder, issued '#include "path/file.h" and added symbolic links to allow finding same module and 'sister modules': ls -l libavformat/ .. lrwxrwxrwx 1 sven sven 13 Aug 26 12:56 libavcodec -> ../libavcodec lrwxrwxrwx 1 sven sven 14 Aug 26 12:56 libavformat -> ../libavformat lrwxrwxrwx 1 sven sven 12 Aug 26 12:57 libavutil -> ../libavutil .. At static init FFMPEGDynamicLibraryBundleInfo, determines the runtime version and instantiates the matching FFMPEGNatives, or null if non matches. FFMPEGMediaPlayer still compares the compile-time and runtime versions. FFMPEGMediaPlayer passes it's own instance to FFMPEGNatives for callbacks. commit ee64b0b3e47cc5d52fb3679c582d3ad0134adb9e Author: Sven Gothel Date: Mon Aug 26 10:17:24 2013 +0200 ffmpeg/libav: Remove 'dead' audio/video frame count relation snoop-code commit 248256fc8eee90f8d11f66d4b5dba8ad296653a1 Author: Sven Gothel Date: Mon Aug 26 10:09:33 2013 +0200 libav/ffmpeg: version9: Add libavresample support ; Proper AudioFormat negotiation w/ AudioSink; Misc - Add libavresample support - Resample if avail && (!AV_SAMPLE_FMT_S16 || !prefSampleRate || !sinkSupported) - Resample to: prefSampleRate (if set), AV_SAMPLE_FMT_S16 and min(channelCount, maxChannelCount) - Proper AudioFormat negotiation w/ AudioSink; - Utilize AudioSink's 'isSupported(AudioFormat)' - Misc - use 'av_get_bytes_per_sample(fmt)' always, don't assume 2 commit e28a3b39e1e8caf3f6cf3bfe82efdaae818a6c7b Author: Sven Gothel Date: Mon Aug 26 09:59:47 2013 +0200 AudioSink: Fixe type names ; Enhance AudioFormat negotiation ; ALAudioSink adds AL_SOFT_buffer_samples support w/ full AL caps - Fixe type names: - Remove AudioDataType, we only support PCM here anyways - AudioDataFormat -> AudioFormat / Add 'planar' attribute to distingush packed/planar data type - Validate float types - Enhance AudioFormat negotiation - Add 'isSupported(AudioFormat format)' which _shall_ be used before 'init(..)' to test/negotiate format - Add getMaxSupportedChannels(), which may be used w/ getPreferredFormat() if orig requested format fails via 'isSupported(..)' - 'init(..)' returns boolean only. - ALAudioSink adds AL_SOFT_buffer_samples support w/ full AL caps - Determine whether AL_SOFT_buffer_samples is supported - Use new JOAL ALHelper to convert AudioFormat -> AL-types, which also answers the 'isSupported(..)' query. - Now allows multiple: channles, sample-types, etc. commit 871c7cac1939e6c7fbcd33aa031b7861f63da6ae Author: Sven Gothel Date: Mon Aug 26 09:49:48 2013 +0200 ffmpeg/libav: remove unsued header files commit 07201cfd793f47729caf8667acad41ed1869bf32 Author: Sven Gothel Date: Mon Aug 26 09:48:21 2013 +0200 ffmpeg/libav: lavc54.lavf54.lavu52 -> lavc54.lavf54.lavu52.lavr01: Adding libavresample of version 9 commit 1b4edb60e8c91621d93033b8732b2cdef0e7ebe7 Author: Sven Gothel Date: Sun Aug 25 09:12:19 2013 +0200 libav/ffmpeg: Prepare for lavc54.lavf54.lavu52 - Add compile-time/runtime version check, fail if major versions do not match assuming binary incompatibility - Add: 'av_find_input_format' for future video input support - Manually map '/dev/video' to video input - not working yet. - WINDOWS: Set file to '' - Set input format string depending on OS commit 469314fff8dc53658db932bab6108107780619ee Author: Sven Gothel Date: Sun Aug 25 09:06:58 2013 +0200 NullGLMediaPlayer: Fix reported VID (fake 0), no AID, textureCount == 2 commit 640dbb2e1780a6074b932a455252bb410e4393de Author: Sven Gothel Date: Sun Aug 25 09:06:11 2013 +0200 libav/ffmpeg: Move current lavc53.lavf53.lavu51 (version 8) header files to their sub-folders; Add lavc54.lavf54.lavu52 (version 9) header files lavc54.lavf54.lavu52: - Begin testing w/ version 9 - Header files are binary incompatible (data types) Default is still lavc53.lavf53.lavu51 commit d0aee05031cd52ad4f6753a8859a21e77845bc35 Author: Sven Gothel Date: Sun Aug 25 05:13:55 2013 +0200 GLES3Impl: Add NOP 'finalizeInit()' method, to avoid GLContentImpl not finding it and dumping a DEBUG message commit 78b4d4ac014af4cc43638ecdb69daf1e17a9b7d1 Author: Sven Gothel Date: Sun Aug 25 05:13:08 2013 +0200 GLAutoDrawableBase: DEBUG code - Avoid NPE commit 8130f54fa3d7cdde59f4a88af081c44ddfb2c7f0 Author: Sven Gothel Date: Sun Aug 25 05:12:51 2013 +0200 AndroidGLMediaPlayerAPI14: Fix implementation to coop w/ threaded decoder / Add EOS detection, setAudioVolume(..) GLMediaPlayerImpl.initStreamGL(..): Only require a minimum texture count of 2, which is the bare minimum to allow our algorithm to work, i.e. having a 'lastFrame' and avail/playing ringbuffer have each one frame. Android's MediaPlayer API can only deal w/ one SurfaceTexture, hence we have to fake a second SurfaceTextureFrame w/ same content to allow our implementation to work w/ the threaded decoder (min 2 frames). commit 8cdbfb676ea31c6719e6f6e8ae7a44e060a5987f Author: Sven Gothel Date: Sun Aug 25 02:47:49 2013 +0200 GLMediaPlayer/AudioSink: Add set[Audio]Volume(float v)/get[Audio]Volume() allowing to change the audio volume. commit 517371b2c200783890e2f6a173748cf65d3c8c91 Author: Sven Gothel Date: Sat Aug 24 23:38:42 2013 +0200 AudioSink.init(..) abstract 'frame count' -> duration [ms] allowing non-frame based AudioSink's to deal w/ desired queue sizes. - Rename AudioSink.initSink(..) -> AudioSink.init(..) - Move: "int initialFrameCount, int frameGrowAmount, int frameLimit" to "int initialQueueSize, int queueGrowAmount, int queueLimit" based on milliseconds instead of frame count. - Passing hint 'float frameDuration' to calculate frame count for fame based audio sink, i.e. ALAudioSink. - Adding sensible static final default values - AudioDataFormat: Add convenient conversion routines (samples/bytes/frame-count) - FFMPEGMediaPlayer: Retrieve audio frame size in samples per channel, pass it to AudioSink.init(..) to properly calculate frame count/limits based on duration. commit d0e01cb5c0ec3e48b8a9b9b79a7795b214c6e3ea Author: Sven Gothel Date: Sat Aug 24 17:56:49 2013 +0200 GLMediaPlayer Multithreaded Decoding: GLMediaPlayer* (Part-6) - DONE Multithreaded decoding and API should be considered stable by now, minor changes may apply if Android/OMX impl. requires it. We still need to solve TODO's as listed below, copied from 474ce65081ecd452215bc07ab866666cb11ca8b1. +++ - *TextureFrame OO changes: - TextureFrame extends TimeFrameI - GLMediaPlayerImpl* - Adapt to Ringbuffer changes of GlueGen commit f9f881e59c78e3036cb3f956bc97cfc3197f620d - Fix impl. method's API doc - getNextTextureImpl(..) returns video PTS - Fix audio-only playback - frame dropping shall only happen if: - previous frame has not been dropped - frame is too later - one decoded frame is already available - Don't block for decoder anymore: - nextFrame = "videoFramesDecoded.getBlocking() -> videoFramesDecoded.get()"; No 'next decoded frame avail' only could mean: - slow decoding/hardware - slow transport hence we shall not block rendering. - Add DEBUG output if using last frame - Add integer property 'jogl.debug.GLMediaPlayer.StreamWorker.delay' in milliseconds to simulate slow decoding, i.e. delay is added in StreamWorker after decoding before pushing new frame to Ringbuffer. - FFMPEGMediaPlayer: - audioFrameLimitWithVideo 128 -> 64 - audioFrameLimitAudioOnly 128 -> 32 - uses AudioSink's 'enqueueData(int pts, ByteBuffer bytes, int byteCount)' - fixes for audio-only playback +++ Working Tests: MovieSimple and MovieCube TODO-1: Fix - Android - OMXGLMediaPlayer TODO-2: - Fix issue where async audio frames arrive much later than 1st video frame, i.e. around 300ms. - Default TextureCount .. maybe 3 ? - Adding Audio synchronization ? - Find 'truth' about correlation of audio and video PTS values, currently, we assume both to be unrelated ? commit deae6def7a818d3189bec403f8cde2ad9936d416 Author: Sven Gothel Date: Sat Aug 24 17:38:32 2013 +0200 *AudioSink: Add byte/time calc to AudioDataFormat, *AudioFrame OO changes, Reuses ALAudioFrames to ease GC, Ringbuffer changes - Adapt to Ringbuffer changes of GlueGen commit f9f881e59c78e3036cb3f956bc97cfc3197f620d - Favor AudioSink 'AudioFrame enqueueData(int pts, ByteBuffer bytes, int byteCount)', - Impl. shall reuse AudioFrame's instead of creating them on the fly - User shall simply pass the net data required, while receiving an internal AudioFrame - Add byte/time calc to AudioDataFormat: - Add getDuration(byteCount) and getByteCount(ms). - *AudioFrame OO changes: - abstract AudioFrame extends TimeFrameI - allow setting of all components to reuse instanced (GC clean) - ALAudioSink reuses ALAudioFrames to ease GC: - Remove creating temporary objects to ease GC - ALAudioFrame holds ALBuffer name, remove ActiveBuffer type. - Use ALAudioFrame similar to TextureFrame in GLMediaPlayerImpl, i.e. fill them in 'full' Ringbuffer and move them in-between 'full'/'playing' Ringbuffer. - commit 413762735dc54a82fbc98e6b7909543cbbd8622a Author: Sven Gothel Date: Sat Aug 24 17:22:55 2013 +0200 JOGL/Util: Add generic 'TimeFrameI' for key frame animation of 'things' basen on integer milliseconds. commit d9e4b27179102a8f082532abc8beaa603395e113 Author: Sven Gothel Date: Fri Aug 23 01:24:27 2013 +0200 FFMPEGMediaPlayer: Transform URI spaces '%20' to ' ' manually, libav doesn't work well w/ URI encoded names. commit 474ce65081ecd452215bc07ab866666cb11ca8b1 Author: Sven Gothel Date: Fri Aug 23 01:02:33 2013 +0200 GLMediaPlayer Multithreaded Decoding: GLMediaPlayer* (Part-5) - WIP - Update/fix GLMediaPlayer API doc - GLMediaEventListener: Add event bits for all state changes to be delivered via attributesChanged(..) - StreamWorker / Decoder Thread: - Use StreamWorker only ! - Handle exceptions on StreamWorker via StreamException - Handles stream initialization and decoding (-> initStream(..)) - Split initGLStream(..) -> initStream(..) + initGL(GL) - allow initStream(..)'s implementation being executed on StreamWorker - allow GL initialization to be 'postponed' when stream is read, i.e. non blocking stream initialization (UI .. etc) - Handle EOS via END_OF_STREAM_PTS -> pause/event - Video: Use lock-free LFRingbuffer, similar to ALAudioSink (commit f18a94b3defef16e98badd6d99f2422609aa56c5) +++ - FFMPEGDynamicLibraryBundleInfo - Add avcodec's: - avcodec_get_frame_defaults, avcodec_free_frame (54.28.0), avcodec_flush_buffers, - Add avutil's: - av_frame_unref (55.0.0) - Add avformat's: - avformat_seek_file (??) +++ - FFMPEGMediaPlayer Native: - add 'snoop' video frames for a/v frame count relation. disabled per default, since no more needed due to ALAudioSink's grow-buffer usage of LFRingbuffer. - use sp_avcodec_free_frame if available - 'useRefCountedFrames=1' for libav 55.0 to cache more than one audio frame, not used since ALAudioSink's OpenAL usage does not require it (copies data once). Note: the above snooped-video frame count is used here. - use only one cached audio-frame (-> see above, OpenAL copies data once), while reusing the NIO buffer! - Perform OpenGL sync (glFinish) in native code! - find proper PTS value, i.e. either frame's PTS or DTS, see 'PTSStats'. - FFMPEGMediaPlayer Java: - use private fields - simplified code due to above changes. +++ Working Tests: MovieSimple and MovieCube TODO-1: Fix - Android - OMXGLMediaPlayer TODO-2: - Fix issue where async audio frames arrive much later than 1st video frame, i.e. around 300ms. - Default TextureCount .. maybe 3 ? - Adding Audio synchronization ? - Find 'truth' about correlation of audio and video PTS values, currently, we assume both to be unrelated ? commit 4dc4a32720e7b176e6811c0eaa8ddc060e1468da Author: Sven Gothel Date: Fri Aug 23 00:39:30 2013 +0200 TextureSequence: Add END_OF_STREAM_PTS, remove 'blocking' from getNextTexture(..), may blocks .. or not, depending on implementation and state. commit c6555b09c455d0db238e4cf57ee3efd4e426f215 Author: Sven Gothel Date: Fri Aug 23 00:33:38 2013 +0200 Texture: Add 'toString()' and 'getTextureObject()' w/o GL instance to read existing object name. commit f18a94b3defef16e98badd6d99f2422609aa56c5 Author: Sven Gothel Date: Thu Aug 22 23:46:35 2013 +0200 AudioSink: Add END_OF_STREAM_PTS, initSink(..) args: frameGrowAmount and frameLimit allowing an optional used Ringbuffer to grow in implementation. commit c1b44f3f26a8e44d34dc79850716174a8b36ad91 Author: Sven Gothel Date: Thu Aug 22 23:42:13 2013 +0200 SyncedRingbuffer moved to GlueGen, commit 30475c6bbeb9a5d48899b281ead8bb305679028d commit 2cb284545a2a0fd35762a104fee8107234808389 Author: Sven Gothel Date: Sat Aug 17 01:30:25 2013 +0200 GLMediaPlayer: Use URI instead of URL / Misc refinements - GLMediaPlayer: Use URI instead of URL, allowing passing a non resolved location - Java's URL doesn't allow 'other' protocols, i.e. RTSP - GLMediaPlayer: Add Table of test streams and their location .. - FFMPEGMediaPlayer - Handle av_read_play/pause response on java side, ignore error - simply dump in DEBUG_NATIVE mode commit 3f262a9f4653a09b28a84442378428c18b64775f Author: Sven Gothel Date: Fri Aug 16 21:09:21 2013 +0200 GLMediaPlayerImpl: Refine getNextTexture(..) DEBUG output, put 'last SCR delay' in regular println. commit c200045aa661cf82474c2b3c1db0ac69db40452a Author: Sven Gothel Date: Fri Aug 16 20:18:36 2013 +0200 GLMediaPlayer Multithreaded Decoding: GLMediaPlayer* (Part-4) - WIP - Use Platform.currentTimeMillis() for accurate timing! - GLMediaPlayer / GLMediaPlayerImpl - Add DEBUG_NATIVE property jogl.debug.GLMediaPlayer.Native for verbose impl. messages, i.e. ffmpeg/libav - Add 'synchronization' section in GLMediaPlayer API doc (WIP) - Use passive non-blocking video synchronization, i.e. repeat frames instead of 'sleep'. Thx to Xerxes's suggestion. - Add flushing of cached decoded frames, allowing to remove complicated 'videoSCR_reset_latch' - FramePusher (threaded decoding): - Always create a shared context! - Release context while pausing - Pre/post 'getNextTextureImpl()' actions only at makeCurrent/release. - newFrameAvailable(..) signal after decoded frame is enqueued - FFMPEGDynamicLibraryBundleInfo - Bind add. functions of libavcodec: + "av_init_packet", + "av_new_packet", + "av_destruct_packet", - Bind add. functions of libavformat: + "avformat_seek_file", + "av_read_play", + "av_read_pause", - DEBUG property := FFMPEGMediaPlayer.DEBUG || DynamicLibraryBundleInfo.DEBUG; - FFMPEGMediaPlayer - Use libavformat's 'av_read_play()' and 'av_read_pause()', which may get utilized for network streams, e.g. RTSP - getNextTextureImpl(..): - Fix retry loop - Use postNextTextureImpl/preNextTextureImpl if desired (PSM) - Native: - Use fixed my_av_q2i32(..) macro (again) - Use INVALID_PTS marker (synced w/ Java code) - DEBUG: Dump more detailed frame information - TODO: Consider passing frame_delay, especially for repeated frames! - Tests (MovieSimple, MovieCube): - Refine KeyEvents control for seek and speed. - TODO: - Proper audio clock calculation - difficult w/ OpenAL ! - Video / Audio sync: - seek ! - streams w/ very async A/V frames - Test Streams: - Five-minute-sync-test.mp4 - Audio-Video-Sync-Test-Calibration-23.98fps-24fps.mp4 - sound_in_sync_test.mp4 - big_buck_bunny_1080p_surround.avi commit cd0e0465d753255ba0f98a21e3c72f22d8a4b598 Author: Sven Gothel Date: Fri Aug 16 19:43:50 2013 +0200 SyncedRingbuffer Cleanup: private fields, clarify reset(boolean) commit be0204ffe66bb9cb2918bfb01d0235fcaf0b3920 Author: Sven Gothel Date: Fri Aug 16 03:39:25 2013 +0200 Fix Bug 817 (2/2): GLContextImpl's getDefaultPixelDataType()/getDefaultPixelDataFormat() use defaults (fix) GLContextImpl's getDefaultPixelDataType()/getDefaultPixelDataFormat() uses default values if GL query fails. commit 65833bbcec423f9741116dc9b785e6954f2fcec7 Author: Sven Gothel Date: Fri Aug 16 03:35:06 2013 +0200 Fix Bug 817 (1/2): GLPixelAttributes checks arguments and queried bytesPerPixel GLPixelAttributes checks arguments (componentCount, format / type) and the queried bytesPerPixel. commit bab13046729d8283876e4d2f8855a38ff311d375 Author: Sven Gothel Date: Fri Aug 16 03:23:15 2013 +0200 Refine unit test Bug 817 c19f9916bc59765e5aaf307b8ecd5d25dfcad6b6 / Add pbuffer and fbo testing commit c19f9916bc59765e5aaf307b8ecd5d25dfcad6b6 Author: Sven Gothel Date: Fri Aug 16 02:51:12 2013 +0200 Provide unit test for Bug 817 commit 16324775161ad34672a1506fd707107ac04b4437 Author: Sven Gothel Date: Thu Aug 15 14:33:41 2013 +0200 SyncedRingbuffer: Add 'reset(boolean full)', simplify 'clear(..)'. 'reset(boolean full)' enables user to reset ringbuffer pointer and assume it's empty or full, while 'clear()' shall only remove all references .. etc. commit 6c72b1fc68e65bc0d4a0ee1e0442cc1637a67d01 Author: Sven Gothel Date: Wed Aug 14 23:32:22 2013 +0200 Fix Bug 815: GL*: Change glIsEnabled() -> glIsBound() to reflect semanics - Also fix the exception message (enabled/disabled -> bound/unbound) Reason of change: Avoid confusion and point to the cause! API change: glIsVBOArrayEnabled() -> glIsVBOArrayBound() glIsVBOElementArrayEnabled() -> glIsVBOElementArrayBound() glIsPBOPackEnabled() -> glIsPBOPackBound() glIsPBOUnpackEnabled() -> glIsPBOUnpackBound() Exception message change: "must be enabled to call this method" -> "must be bound to call this method" "must be disabled to call this method" -> "must be unbound to call this method" commit c37629ea8fdcb11f7f8a18e37a4cde57d4ba6a01 Author: Sven Gothel Date: Wed Aug 14 07:02:59 2013 +0200 GLMediaPlayer Multithreaded Decoding: GLMediaPlayer* (Part-3) - WIP - GLMediaPlayer - Remove State.Stopped and method stop() - redundant, use pause() / destroy() - Add notion of stream IDs - Add API doc: State / Stream-ID incl. html-anchor - Expose video/audio PTS, .. - Expose optional AudioSink - Min multithreaded textureCount is 4 (EGL* and FFMPEG*) - GLMediaPlayerImpl - Move AudioSink rel. impl. to this class, allowing a tight video implementation reusing logic. - Remove 'synchronized' methods, synchronize on State where applicable - implement new methods (see above) - playSpeed is handled partially in AudioSink. If it exeeds AudioSink's capabilities, drop audio and rely solely on video sync. - video sync (WIP) - video pts delay based on geometric weight - reset video SCR if 'out of range', resync w/ PTS - - FramePusher - allow interruption when pausing/stopping, while waiting for next avail free frame to decode. - FFMPEGMediaPlayer - Add proper AudioDataFormat negotiation AudioSink <-> libav - Parse libav's SampleFormat - Remove AudioSink interaction (moved to GLMediaPlayerImpl) - Tests (MovieSimple, MovieCube): - Add aid/vid selection - Add KeyListener for actions: seek(..), play()/pause(), setPlaySpeed(..) - Dump perf-string each 2s - TODO: - Add audio sync in AudioSink, similar to GLMediaPlayer's weighted video delay, here: drop audio frames. commit bc3776633ccad81199a96ff8116195133d862395 Author: Sven Gothel Date: Wed Aug 14 06:43:42 2013 +0200 GLMediaPlayer Multithreaded Decoding: AudioSink (Part-2) - WIP - AudioSink.AudioDataFormat - add fixedP (fixed-point or floating-point) - AudioSink - rename 'buffer count' to 'frame count' - add setPlaySpeed(..) - add isPlaying() - add play() - add pause() - add flush() - add: getFrameCount(), getQueuedFrameCount(), getFreeFrameCount(), getEnqueuedFrameCount(), - rename: writeData() -> enqueueData(..) - ALAudioSink - multithreaded usage - make ALCcontext current per thread, now required for multithreaded use Use RecursiveLock encapsulating the ALCcontext's makeCurrent/release/destroy, since the native operations seem to be buggy. NOTE: Think about adding these general methods to ALCcontext - implement new methods - commit f53b7713e5eb58a86faf0db06db8be35cfa413d9 Author: Sven Gothel Date: Wed Aug 14 06:33:59 2013 +0200 SyncedRingbuffer: peek() don't throw an exception commit e05e3a4ec36708b35eea9a2db67f6007b68564cf Author: Sven Gothel Date: Wed Aug 14 06:33:08 2013 +0200 Fix regression of commit 6332e13b2f0aa9818d37802302f04c90a4fa4239 causing optional OMX to fail to compile commit 6332e13b2f0aa9818d37802302f04c90a4fa4239 Author: Sven Gothel Date: Sat Aug 10 09:14:19 2013 +0200 GLMediaPlayer: Add multithreaded decoding w/ textureCount > 2 where available EGL/FFMPeg. WIP! Off-thread decoding: If validated (impl) textureCount > 2, decoding happens on extra thread. If decoding requires GL context, a shared context is created for decoding thread. API Changes: - initGLStream(..): Adds 'textureCount' as argument. - TextureSequence.TexSeqEventListener.newFrameAvailable(..) exposes the new frame available - TextureSequence.TextureFrame exposes the PTS (video) Implementation: - 'int validateTextureCount(int)': implementation decides whether textureCount can be > 2, i.e. off-thread decoding allowed, default is NO w/ textureCount==2! - 'boolean requiresOffthreadGLCtx()': implementation decides whether shared context is required for off-thread decoding - 'syncFrame2Audio(TextureFrame frame)': implementation shall handle a/v sync, due to audio stream details (pts, buffered frames) - FFMPEGMediaPlayer extends GLMediaPlayerImpl, no more EGLMediaPlayerImpl (redundant) +++ - SyncedRingbuffer: Expose T[] array +++ TODO: - syncAV! - test Android commit 590d78dc2ff24ce80976a30e35a99c06ef6750b0 Author: Sven Gothel Date: Sat Aug 10 08:44:51 2013 +0200 ES2 NEWT Tests: GearsES2/RedSquareES2 - Don'w use AWTRobot if AWT is n/a (Ji Gong manual testing) commit b6be013a0e9dd570b4da42dbe8d88cc509a6aa99 Author: Sven Gothel Date: Sat Aug 10 08:44:00 2013 +0200 MouseEvent API doc: Add W3C PointerEvent Reference commit 8ef7760168c7051163c2a265c8662f1647a116c6 Author: Sven Gothel Date: Sat Aug 10 08:43:08 2013 +0200 GLFBODrawableImpl.initialize(): Unrealize when already unrealized shall not throw an exception - only dump DEBUG info! commit 64b3c9d95736c77bf63b76c70c2c848c466d9942 Author: Sven Gothel Date: Sat Aug 10 08:41:08 2013 +0200 GLDrawableFactory: Expose createDummyDrawable(..) / GLDrawableFactoryImpl: Make impl. methods final. createDummyDrawable(..) is useful for efficient shared context w/o actually rendering to this dummy drawable's framebuffer commit 3bbe227b0cec201e2bc26addfe0ab781dcb4d16f Author: Sven Gothel Date: Sat Aug 10 08:37:13 2013 +0200 GLContext: Refine API doc (CONTEXT_NOT_CURRENT.. values) / Exception message commit 5e8cba163ae898832277300b781627529d1cf1d3 Author: qun Date: Tue Jul 23 20:53:27 2013 +0200 Use uml's png files (svg font is broken) commit 6e54fba3bb9dcadf66774fd9b64df191d985aa22 Author: qun Date: Tue Jul 23 20:50:39 2013 +0200 Fix GLES3/GLES2 relation / Use bouml 4.21.1 (Note: SVG fonts .. are too tiny, using png)