aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* GLMediaPlayer: Add user attached objects, similar to GLContext - Allowing ↵Sven Gothel2014-01-262-1/+38
| | | | GLMediaEventListener impl. to access GLMediaPlayer associated objects
* Script: Correct joal.jar path; Remove redundant NewtDebugActivity (Debug is ↵Sven Gothel2014-01-265-182/+87
| | | | on for NewtVersionActivity)
* TestPerf001*Init0*: Add INIT_TIMEOUT for perf. loop (10s)Sven Gothel2014-01-253-15/+30
|
* Bug 948 - Autodetect GLRendererQuirks.SingletonEGLDisplayOnlySven Gothel2014-01-243-24/+23
| | | | | | | | | Refines commit fbe00e6f5dca8043b40dd96f096fecc9424e0cc3 Instead of querying driver artifacts (vendor, platform, version ..) we simply can autodetect this quirk by trying to get a second egl-display handle when initializing the EGLDrawablFactory's default device: EGL.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY)
* GLRendererQuirks.addQuirks(..): Fix array bounds checkSven Gothel2014-01-241-1/+1
|
* Bug 948 - NVIDIA 331.38 (Linux X11) EGL impl. only supports _one_ EGL ↵Sven Gothel2014-01-245-93/+216
| | | | | | | | | | | | | | | | | | | | | | | Display via eglGetDisplay(..) NVIDIA 331.38 (Linux X11) EGL impl. only supports _one_ EGL Display via eglGetDisplay. - Subsequent eglGetDisplay(..) calls fail. - Using the same 'global' egl-display does work though Remedy: Add 'GLRendererQuirks.SingletonEGLDisplayOnly' Detection of quirk is done as usual in GLContextImpl.setRendererQuirks(..), and EGLDrawableFactory passes the quirk, if detected, down to EGLDisplayUtil. The latter implements the singleton eglDisplay handle. EGLDisplayUtil: Cleaned up .. - EGLDisplayRef employs the reference handling incl. eglInitialize(..) and eglTerminate(), as well as the new singleton quirk. - Mark all internal methods 'private', to remove possible [untested] sideffects.
* Bug 950 - Recognize full FBO capabilities for ES 3.0 - ↵Sven Gothel2014-01-244-31/+32
| | | | | | | | [GLContext|GL].hasFullFBOSupport() == true OpenGL ES 3.0 supports full framebuffer operations, incl. multiple color-attachments and multisample. Hence [GLContext|GL].hasFullFBOSupport() shall returns true w/ a ES 3.0 context.
* EGLDisplayUtil.eglCreateEGLGraphicsDevice(..): Don't open() device implicit; ↵Sven Gothel2014-01-2311-155/+182
| | | | EGLDrawableFactory.mapAvailableEGLESConfig(..): Clarify
* NEWT X11 DisplayDriver.dispatchMessagesNative(): Avoid aDevice NPE while ↵Sven Gothel2014-01-231-5/+4
| | | | being pulled
* Bug 921: FPSAnimator debug output on stderr shall happen only if DEBUG is ↵Sven Gothel2014-01-221-3/+9
| | | | enabled
* TestSharedContextVBOES2NEWT3: Re-enable temp disabled tests (oops)Sven Gothel2014-01-211-5/+3
|
* GLBufferObjectTracker: Fix copyright notice (drop Sun Microsystems since ↵Sven Gothel2014-01-211-33/+21
| | | | this is a rewrite of previous GLBufferSizeTracker)
* Better shared GLAutoDrawable synchronization: Block slave instances to also ↵Sven Gothel2014-01-216-3/+46
| | | | | | | | | | | | | | | | | | | | block until all master's GLEventListener.init(..) methods have been called Better shared GLAutoDrawable synchronization. Block slave instances to also block until all master's GLEventListener.init(..) methods have been called - GLSharedContextSetter: Add areAllGLEventListenerInitialized() - GLCanvas (SWT, AWT) - GLJPanel - GLAutoDrawableBase (GLWindow, ..) - GLDrawableHelper's isSharedGLContextPending(..) takes 'areAllGLEventListenerInitialized()' into consideration allowing to block the slave creation until master is completed. This solves teh use case, where the master creates resources in it's GLEventListener initialization (buffers), which are shared with it's slaves.
* Bug 942: GLBufferObjectTracker Enhancement [2/2]: Add mapped buffer ↵Sven Gothel2014-01-2116-289/+993
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | capabilities to GLArrayDataServer and add unit tests GLArrayDataServer: - Add create*Mapped(..) variants for GPU mapped buffer usage w/o client buffers. - Fix API documentation (arguments) - Fix 'addGLSLSubArray(..)' - properly compute and pass 'subStrideB' in bytes to GLArrayDataWrapper ctor. - Add 'mapStorage(..)' and 'unmapStorage(..)' allowing to map the GPU buffer. GLArrayDataWrapper: - Fix getElementCount(): Consider stride in bytes and consider 'mappedElementCount' - getSizeInBytes(): Consider 'mappedElementCount' Tests: - Use new GLBase methods, e.g. getBoundBuffer(..) instead of glGetBoundBuffer(..) - TestMapBufferRead01NEWT: Validate GLBufferStorage (i.e. GLBufferObjectTracker) - Add RedSquareMappedES2 using GPU mapped buffer - Test w/ TestRedSquareES2NEWT, cmd-line 'mappedBuffers' - GearsES1 and GearsES2: Add GPU buffer mapping mode for all test cases - Add buffer validation mode, i.e. test whether GLBufferObjectTracker works properly. - Test w/ TestGearsES2NEWT, cmd-line 'mappedBuffers' - TestSharedContextVBOES2NEWT0, TestSharedContextVBOES2NEWT3: - Add GPU mapped buffers tests to validate GLBufferObjectTracker code path with shared GLContext across multiple threads.
* Bug 942: GLBufferObjectTracker: Tracking GLBufferStorage accurately, ↵Sven Gothel2014-01-2110-286/+899
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | synchronized and secure [1/2] GLBufferSizeTracker becomes GLBufferObjectTracker and tracks the buffer's data store, GLBufferStorage, accurately, synchronized and secure. Synchronization is required, since the GLBufferStorage can be shared across many GLContext on multiple threads. This requires all GLBufferStorage lifecycle affecting GL functions to utilize synchronized GLBufferObjectTracker methods while passing a native GL-func callback. These GL functions are: - glBufferData, glBufferStorage (GL 4.4), glNamedBufferDataEXT Creating the GLBufferStorage object - glMapBuffer, glMapBufferRange, and their *Named*EXT variants - glUnmapBuffer, glUnmapNamedBufferEXT 'glDeleteBuffers' can simply notify the GLBufferObjectTracker No more HashMap is required to associate the mapped buffer address to the mapped ByteBuffer. GLBufferObjectTracker simply utilizes a buffer-name (int) -> GLBufferStorage map. +++ The security aspect shall be implemented by validating all arguments whether they match the required GL constraints, as well as validating tracked states like 'size'. The following functions will throw an GLException accordingly: - glBufferData, glNamedBufferDataEXT * @throws GLException if size is less-than zero * @throws GLException if a native GL-Error occurs - glBufferStorage (GL 4.4) * @throws GLException if size is less-or-eqaul zero * @throws GLException if a native GL-Error occurs - glMapBuffer, and it's *Named*EXT variant * @throws GLException if buffer is not bound to target * @throws GLException if buffer is not tracked * @throws GLException if buffer is already mapped * @throws GLException if buffer has invalid store size, i.e. less-than zero - glMapBufferRange, and it's *Named*EXT variant * @throws GLException if buffer is not bound to target * @throws GLException if buffer is not tracked * @throws GLException if buffer is already mapped * @throws GLException if buffer has invalid store size, i.e. less-than zero * @throws GLException if buffer mapping range does not fit, incl. offset - glMapBufferRange, and it's *Named*EXT variant Only clear mapped buffer reference of GLBufferStorage if native unmap was successful. Further more special error handling shall be applied to: - glMapBuffer, and it's *Named*EXT variant, glMapBuffer, and it's *Named*EXT variant - A zero GLBufferStorage size will avoid a native call and returns null - A null native mapping result indicating an error will not cause a GLException but returns null This allows the user to handle this case.
* Bug 943 - GLBufferStateTracker shall support tracking all possible buffer ↵Sven Gothel2014-01-151-12/+27
| | | | targets
* Bug 942: Bug 942 - Review GLBuffer[State|Size]Tracker and NIO mapped buffersSven Gothel2014-01-144-92/+73
| | | | | | | | | | | | | | | | | | | | | | | | | Commit f8a74c9831c65725a699320c27e62161a0378241 reverted commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1 due to the fact that the buffer binding itself is _not_ shared across shared GLContext! Apply uncritical changes of 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1: +++ Simplify GLBufferSizeTracker creation @ GLContextImpl ctor, make it final. +++ Clear the GLBufferSizeTracker (@destruction) only if no more created shares are left! +++ Refine API doc. +++
* Revert "Bug 942 - Share GLBufferStateTracker ; Unify GLBufferStateTracker ↵Sven Gothel2014-01-144-187/+260
| | | | | | and GLBufferSizeTracker (simplification)" This reverts commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1.
* JAWTWindow DEBUG: Dump all JAVA_VERSION* informationSven Gothel2014-01-142-25/+19
|
* Bug 942 - Share GLBufferStateTracker ; Unify GLBufferStateTracker and ↵Sven Gothel2014-01-144-260/+187
| | | | | | | | | | | | | | | | | GLBufferSizeTracker (simplification) Due to future mapped buffer tracking, the GLBufferStateTracker instance shall be shared across shared GLContextImpl instances similar to GLSizeStateTracker! This allows us to merge GLSizeStateTracker code into GLBufferStateTracker to simplify the implementation. +++ Clear the GLBufferStateTracker (@destruction) only if no more created shares are left! +++
* Bug 938 - MemoryObject.java has no more equals() methodSven Gothel2014-01-141-6/+22
| | | | | | Re-adding 'equals(..)' method erroneously removed with commit 8457bf35fee253d9af29ff1150a9671f6896fc17. 'equals(..)' is important to allow the HashMap<> for glMapBuffer(..) work properly!
* TestParenting01dAWT: Add waitForVisible after toggling NEWT child window ↵Sven Gothel2014-01-131-1/+4
| | | | visibility helping robostness of test case.
* OSXMisc CALayer::FixCALayerLayout: Fix visible:=false case, i.e. don'r ↵Sven Gothel2014-01-131-5/+12
| | | | override cached visibleOpacity w/ forced zero when called twice
* JAWTWindow.JAWTComponentListener: Minor CleanupSven Gothel2014-01-131-5/+5
|
* JOGLNewtAppletBase: Typo of new PNG icons .. used AE's 'gray' instead of ↵Sven Gothel2014-01-121-1/+1
| | | | | | BE's 'grey', which is used for the filename Same as 42d3b31d1becd8eb8e2847c87e14e47e15e730cd