aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Refine commit 9fb1e46e43900ec9b2f9c9af1fc8984e101c8811: Avoid loading [j]awt ↵Sven Gothel2014-02-282-50/+63
| | | | | | | | | | | | | | | | | native libs and null-cursor creation in headless mode Commit 9fb1e46e43900ec9b2f9c9af1fc8984e101c8811 exposed sideffects, i.e. libjawt.so could not be loaded in JAWTUtil's static-init while in headless mode. JAWTUtil's static init block was triggered from AWTMisc debug flag changes. Fix drops operations in headless mode: - JAWTUtil - awt native lib loading - querying headfull features (locking, java2d ..) - AWTMisc - creating null cursor
* Bug 984 - Fix GLBufferObjectTracker.mapBuffer(..)'s mapBufferImpl(..) ↵Sven Gothel2014-02-262-25/+61
| | | | | | | | | parameters for mapBufferRange(..) and mapNamedBufferRange(..) GLBufferObjectTracker.mapBuffer(..) variant for mapBufferRange(..) and mapNamedBufferRange(..) used wrong parameters in it's mapBufferImpl(..) call. Fixed and added mapBufferRange(..) test in TestMapBufferRead01NEWT
* AWTMisc.static: Allow static creation of 'null' AWT cursor to fail (i.e. AWT ↵Sven Gothel2014-02-262-4/+18
| | | | headless)
* Fix whitespaces of commit 78fcb8228d4a391054501aef16eb0462322ba39d and ↵Sven Gothel2014-02-252-7/+7
| | | | WindowImpl comment
* Merge remote-tracking branch 'xranby/master'Sven Gothel2014-02-251-2/+2
|\
| * Bug 927: Try fix deadlock.Xerxes Rånby2014-02-251-2/+2
| | | | | | | | | | | | (14:15:13) sgothel: @Xerxes: In doResume .. do a 'while( !isActive && !shallPause && isRunning ) {' (14:15:52) sgothel: doPause: while( isActive && !shallPause && isRunning ) (14:31:55) sgothel: doPause only: while( isActive && isRunning ) {
* | Merge remote-tracking branch 'petros-koutsolampros/master'Sven Gothel2014-02-252-12/+25
|\ \
| * | A more wholesome solution to the windowing problems in OSX. As describedPetros Koutsolampros2014-02-252-12/+25
| |/ | | | | in bug https://jogamp.org/bugzilla/show_bug.cgi?id=969
* / Bug 937 : Fix regression of commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 ↵Sven Gothel2014-02-253-7/+7
|/ | | | | | | | | | (which disables print if !isShowing()) Commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 uses 'isShowing' state to determine whether to display or not. It also uses 'isShowing' instead of 'isVisible' for printing, which is a regression, since not showing elements offscreen shall be able to be printed.
* Bug 927 - Multithreading (MT) - GLMediaPlayer.GLMediaEventListener: Remind ↵Sven Gothel2014-02-225-66/+91
| | | | that commands shall be off-loaded on another thread!
* ALAudioSink: Add thread-name to exceptions; stopImpl shall not throw an ↵Sven Gothel2014-02-221-22/+38
| | | | exception at destroy
* Bug 927 - Multithreading (MT) issues ALAudioSinkSven Gothel2014-02-221-53/+54
| | | | | | | Add global synchronization around ALAudioSink constructor code, which 'magically' solves the openal-soft multithreading issues .. This is a workaround.
* Bug 927 - Multithreading (MT) issues libav/ffmpegSven Gothel2014-02-226-78/+83
| | | | | | | | | | | | | | FFMPEG Natives: - Move 'mutex_avcodec_openclose' to local static and initialize at initSymbols0 - setStream0: - Add another locked mutex block around: - [ sp_avformat_open_input .. sp_avformat_find_stream_info ] This solves the issue of: [NULL @ 0x89d20c60] insufficient thread locking around avcodec_open/close()
* Merge remote-tracking branch 'xranby/master'Sven Gothel2014-02-211-0/+208
|\
| * Bug 927: demos/es2/av/CrossFadePlayerXerxes Rånby2014-02-211-0/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Parallel media player that demonstrate CrossFade of audio volume during playback. This player also demonstrate audio only playback of the GLMediaPlayer. The CrossFadePlayer is a reproducer for FFMPEGMediaPlayer libav multithreading initialization errors. [NULL @ 0x7ff904065280] insufficient thread locking around avcodec_open/close() reproducer: java -cp gluegen/build/gluegen-rt.jar:jogl/build/jar/jogl-all-mobile.jar:jogl/build/jar/jogl-test.jar:joal/build/jar/joal.jar com.jogamp.opengl.test.junit.jogl.demos.es2.av.CrossFadePlayer *.mp3 Signed-off-by: Xerxes Rånby <[email protected]>
* | Match Bitstream changes of gluegen commit ↵Sven Gothel2014-02-211-35/+35
| | | | | | | | 4447232af0d95a4348d09d4ed03fbef48394ca3a
* | Cleanup imports TestGLReadBuffer01GL*Sven Gothel2014-02-202-2/+0
| |
* | Bug 980: Use Bitsream class for JPEGDecoderSven Gothel2014-02-201-69/+32
|/
* GLContextImpl/GLDrawableImpl.getDefaultReadBuffer(..): Pass hint whether ↵Sven Gothel2014-02-183-4/+6
| | | | dedicated read-drawable is being used (double buffering)
* Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Fix auto-swap ↵Sven Gothel2014-02-188-54/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mechanism ; Refined API doc getDefaultReadBuffer() ; Add GLDrawableUtil.swapBuffersBeforeRead(..) Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 which introduces the default swap-buffers mechanism is erroneous: The OffscreenBack backend requires the following operation order: Order-1: [1] - GL display [2] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable) [3] - readPixels +++ Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 however introduced: Order-2: [a] - GL display [b] - readPixels [c] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable) since [a] and [b] happened in Updater's display method, and [c] followed the same triggered by GLAutoDrawableHelper. +++ The proof, commit d46d9ad8f998a7128d9f023294d5f489673d6d8a, is faulty, since it always included the 'snapshot' GL event listener which turned-off auto-swap and swapped before read-pixels. TL;DR it enforced proper Order-1. +++ This fix allows the Backend to intercept disable GLDrawableHelper's setAutoSwapBufferMode(..) and perform the auto-swap mode itself in the proper Order-1. The unit test has been refined to optionally disable the snapshot to validate auto-swap mode. +++ Refined GLBase and GLContext's API doc for 'getDefaultReadBuffer()' +++ Add GLDrawableUtil.swapBuffersBeforeRead(..) and reuse it for TileRendererBase (original impl.).
* Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Refine unit ↵Sven Gothel2014-02-183-11/+43
| | | | | | | | | | | | | test for visual validation of 'no frame lag' To validate whether a 'display' command w/o animator results to the desired frame we introduce a 'userCounter' in TextRendererGLEL. The latter gets increased and maybe visually validated by a key-press -> display. Results: In all modes, MSAA or !MSAA, or flip - the result is valid. Tested on windows and linux.
* Bug 927: Fix minor MT issues w/ libav/ffmpegSven Gothel2014-02-166-90/+150
| | | | | | | | | | | | | Issue: [NULL @ 0x35bde60] insufficient thread locking around avcodec_open/close() Decorating said libav functions w/ mutex lock/release. Abstract impl. to either use pthread or JNI Monitor, but using the latter to reduce dependencies (ming64 windows). FFMPEGNatives is now an abstract class containing the 'static final Object mutex_avcodec_openclose'
* Movie* Demo: Utilize TextRendererGLELBase (fps, vsync, ..)Sven Gothel2014-02-153-44/+214
|
* Extract TextRendererGLELBase (demo) - Utilize general text rendering for demos.Sven Gothel2014-02-153-111/+210
|
* Graph: RendereState: Create own PMVMatrix if passed value is null; Renderer: ↵Sven Gothel2014-02-153-7/+11
| | | | Add reshapeNotify(..) for NOP PMV reshape notification
* Bug 927 - Multithreading (MT) issues with ALAudioSink (openal-soft)Sven Gothel2014-02-151-31/+102
| | | | | | | | | | | | | | - Using update openal-soft (commit 7297c3214a4c648aaee81a9877da15b88f798197) - Analyzed openal-soft threading issues: - a global-lock would have removed the issue - turns out that using ALC_EXT_thread_local_context's alcSetThreadContext(..) instead of alcMakeContextCurrent(..) solves the issue - Cleaned up al*GetError() queries and handling - Simplified flush/dequeue buffers
* Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Use default ↵Sven Gothel2014-02-145-113/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | auto-swap mechanims Refines commit 908ebd99d1eb57ce773a1fdd67c76886da86b9e6 Note that the test case decide whether to auto-swap (after read-pixels) or not auto-swap (manual swap before read-pixels). See UITestCase.swapBuffersBeforeRead(GLCapabilitiesImmutable chosenCaps): Determines whether the chosen GLCapabilitiesImmutable requires a swap-buffers before reading pixels. Usually one uses the default-read-buffer, i.e. GL.GL_FRONT for single-buffer and GL.GL_BACK for double-buffer GLDrawables and GL.GL_COLOR_ATTACHMENT0 for offscreen framebuffer objects. Here swap-buffers shall happen after calling reading pixels, the default. However, multisampling offscreen GLFBODrawables utilize swap-buffers to downsample the multisamples into the readable sampling sink. In this case, we require a swap-buffers before reading pixels. Returns: chosenCaps.isFBO() && chosenCaps.getSampleBuffers() +++ - GLJPanel: - Remove SurfaceUpdatedListener mechanism in favor of default auto-swap-buffer via GLDrawableHelper. This removes complexity. - postGL does not need to perform explicit swapBuffer operation, but rely on GLDrawableHelper and the default mechanism. This is also compatible w/ J2D backend. - Use GLDrawableHelper for setAutoSwapBufferMode(..) and getAutoSwapBufferMode() +++ UnitTests: - UITestCase: - Add 'boolean swapBuffersBeforeRead(GLCapabilitiesImmutable chosenCaps)' to determine whether swapBuffers() must occure before read-pixels. See above. - GLReadBuffer00Base* - remove explicit addSnapshotGLEL/removeSnapshotGLEL - add TextRendererGLEL, to display frame-count and -dimension - SnapshotGLEL* - simply toggle auto-swap in their init(..) and dispose(..) method! - clear back-buffer if 'swapBuffersBeforeRead' to test whether the right buffer is being used for read-pixels.
* GLReadBufferUtil: Set PACK_ROW_LENGTH for ES3 as well - also set ReadBuffer ↵Sven Gothel2014-02-141-2/+5
| | | | to default.
* GLPixelStorageModes: Safe and restore GL2ES3 modes, i.e. add missing GLES3 ↵Sven Gothel2014-02-142-40/+46
| | | | modes. GLStateTracker: Use proper GL names for enums
* Bug 975 - GLJPanel's OffscreenDrawable shall not double swap (custom swap by ↵Sven Gothel2014-02-134-61/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | GLEventListener using [AWT]GLReadBufferUtil) When utilizing [AWT]GLReadBufferUtil it is usually desired to read from the front-buffer instead the back-buffer. The latter may not be defined, e.g. when using MSAA. A GLEventListener utilizing [AWT]GLReadBufferUtil, must perform the drawable.swapBuffers() to be able to read from the front-buffer. Usually GLAutoDrawable.setAutoSwapBuffer(false) should be called here, to avoid a double swap - however GLJPanel does not support toggling auto-swap since it requires to control swap for it's own read-pixels. Remedy for GLJPanel: - GLJPanel issues helper.setAutoSwapBufferMode(false) - immutable - Enable GLJPanel.swapBuffer() if initializes This was previously disabled. - GLJPanel's OffscreenBackend listens to surfaceUpdated, to be notified whether postGL needs to swap buffer or the drawable.swapBuffer() was already called between preGL and postGL. See unit tests adding/removing a snapshot GLEventListener performing swapBuffers() and setting auto-swap accordingly.
* SurfaceUpdatedListener: Order methods in impl. Class; ↵Sven Gothel2014-02-134-76/+76
| | | | SurfaceUpdatedListener: Mark methods final, use volatile 'isEmpty' to bail out early @ surfaceUpdated.
* TextureIO: Fix PNGTextureWriter Vertical-Flip, i.e. pass TextureData's ↵Sven Gothel2014-02-131-2/+2
| | | | getMustFlipVertically() to PNGPixelRect
* Bug 962 - AWTGLReadBufferUtil should use aligned BufferedImage [for resized ↵Sven Gothel2014-02-134-16/+278
| | | | | | | | | | | | | | | | | | | | | | | | images]; Fix GLReadBufferUtil GL_PACK_ROW_LENGTH AWTGLPixelBuffer is being reused when used via AWTGLPixelBufferProvider even when resized. AWTGLPixelBufferProvider uses GLPixelBufferProvider's requiresNewBuffer(..) which returns true if - allowRowStride==true and pixel-buffer size < required-size, or - allowRowStride==false and pixel-buffer size < required _or_ width doesn't match otherwise it returns true, i.e. the AWTGLPixelBuffer is reused. Hence the used BufferedImage might need to be aligned, i.e. using AWTGLPixelBuffer's getAlignedImage(..). +++ GLReadBufferUtil shall use current texture-data width for GL_PACK_ROW_LENGTH, not the static GLPixelBuffer's width, which may not reflect image dimension (resize) +++
* TextureIO: Support PNGTextureWriter w/ TextureData IntBuffer (via ↵Sven Gothel2014-02-133-20/+103
| | | | | | | | | | | | | | | PNGPixelRect and PixelFormatUtil) TextureData IntBuffer could be caused by AWT read-pixels but is not seamlessly supported via PNGPixelRect since the latter uses a hardcoded ByteBuffer. Add static PNGPixelRect.write(..) supporting IntBuffer to support this case for now. PNGPixelRect instances do not support any Buffer type to avoid a bloated implementation. PixelFormatUtil adds support for int32 pixel format conversion.
* Bug 973: NativeWindowFactory: Needs service provider interface (SPI) for TK ↵Sven Gothel2014-02-121-2/+2
| | | | specific implementations (Scaling)
* Bug 973: NativeWindowFactory: Needs service provider interface (SPI) for TK ↵Sven Gothel2014-02-121-4/+19
| | | | | | specific implementations (Scaling) Add FIXME note ..
* Bug 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..): GLProfile, ↵Sven Gothel2014-02-123-40/+116
| | | | | | | | | | | | GLContextImpl, DisplayImpl GLProfile, GLContextImpl: - ReflectionUtil.DEBUG_STATS_FORNAME: Dump forName stats if set - Cache GL*Impl and GL*ProcAddressTable Constructor<?> for GLContextImpl's createInstance(..) - Remove off-thread early classloading thread which only adds complications DisplayImpl: - Remove one redundant availability test
* Bug 970: NEWT OSX ChildWindow setVisible(..) does not hide child window ↵Sven Gothel2014-02-102-12/+91
| | | | | | | appropriately Instead of using [mWin orderBack: mWin] for child windows, utilize [mWin orderWindow: NSWindowOut relativeTo: [pWin windowNumber]]
* JOGLNewtApplet3Run: Don't set position if normal child window.v2.1.4Sven Gothel2014-01-311-1/+0
|
* NEWT WindowImpl: Don't waitForPosition(..) if child window - issues w/ ↵Sven Gothel2014-01-311-8/+13
| | | | | | | | | | | | | | | | different toolkits! With Applet3 plugin (firefox - using GTK), our child window seems to receives the absolute position, or 'arbitrary' values (?). Will need to figure out how to properly determine these cases. In the meantime, simply turn off waitForPosition(..) for child windows, which shall not harm NEWT. Impacts following actions as child window: - createNativeWindow - reparent - fullscreen
* Adapt to new plugin3 / Use browser window's location on screen for top-level ↵Sven Gothel2014-01-312-24/+56
| | | | window.
* NewtFactory: Cleanup / createWindow(..) w/ parentWindow variant shall fall ↵Sven Gothel2014-01-311-11/+6
| | | | back to top-level ctor if parentWindow is null
* NativeWindowFactory.createWrappedWindow [WrappedWindow]: Using ↵Sven Gothel2014-01-313-11/+57
| | | | UpstreamSurfaceHookMutableSizePos to take position into account; WrappedWindow: invalidate and destroy - display device could be opened.
* Add NativeWindowFactory.getLocationOnScreen(NativeWindow nw) to retrieve the ↵Sven Gothel2014-01-311-0/+19
| | | | NativeWindow location on screen
* NEWT: Add Support for AWT-Less Applet3Sven Gothel2014-01-304-8/+563
| | | | | | - Adding 'plugin3-public' jar and sources for Applet3 support, copied from icedtea-web3 - Added com.jogamp.newt.util.applet.JOGLNewtApplet3Run capable to run Applet3
* NewtFactory: Fix createWindow(..) ctor w/ given native window handle (use ↵Sven Gothel2014-01-301-8/+10
| | | | displayConnection string and screen-idx)
* NativeWindowFactory: Add Support for creating a platform agnostic wrapped ↵Sven Gothel2014-01-303-0/+149
| | | | AbstractGraphicsDevice/NativeWindow
* NEWT Window: Add API Doc for Custom Window IconsSven Gothel2014-01-302-0/+16
|
* Bug 952 - JAWTWindow.JAWTComponentListener's ctor() and detach() may ↵Sven Gothel2014-01-271-10/+21
| | | | | | | | | | | | | deadlock due to AWTTreeLock acquisition while add/remove AWT listener The AWTTreeLock is acquired by Component.removeHierarchyListener and as for _every_ AWT component, modifications shall happen on the AWT-EDT. IMHO the user shall offload AWT modifications to the AWT-EDT similar to what JOGL's GLCanvas and NEWTCanvasAWT does. However, since JAWTWindow also represents a NativeWindow instance we shall offload AWTTreeLock methods ourselves!
* Bug 927 - Enhance GLMediaPlayer/FFMPEGMediaPlayer MovieSimple to run ↵Sven Gothel2014-01-261-121/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multiple instances in parallel Tested on GNU/Linux x86_64, Result: Plays well here audio and video, i.e. audio is actually mixed from both movies. Even if one movie (below) stops and restarts (AL buffer reset), it didn't crash. +++ LIB_AV Codec : 54.92.100 [cc 54] LIB_AV Format : 54.63.104 [cc 54] LIB_AV Util : 52.18.100 [cc 52] LIB_AV Resample: 1.0.1 [cc 1, loaded true] LIB_SW Resample: 0.17.102 [cc 0, loaded true] LIB_AV Device : [loaded true] LIB_AV Class : FFMPEGv09Natives +++ (enable MovieSimple in scripts/tests.sh) bash scripts/tests-x64.sh -loop -windows 2 \ -urlN 0 http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_surround.avi \ -urlN 1 http://video.webmfiles.org/elephants-dream.webm +++ 2 Streaming threads, i.e. decoder threads: "Thread-5-StreamWorker_1" daemon prio=10 tid=0x00007f994c102000 nid=0x5826 in Object.wait() [0x00007f996fa37000] at jogamp.opengl.util.av.GLMediaPlayerImpl$StreamWorker.run(GLMediaPlayerImpl.java:1231) "Thread-4-StreamWorker_0" daemon prio=10 tid=0x00007f99600ed000 nid=0x5825 in Object.wait() [0x00007f996cd09000] at jogamp.opengl.util.av.GLMediaPlayerImpl$StreamWorker.run(GLMediaPlayerImpl.java:1231)