aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
Commit message (Collapse)AuthorAgeFilesLines
* Bug 961: Stabilize glXGetFBConfigAttrib(..) and glXChooseFBConfig(..) Usage ↵Sven Gothel2014-03-102-9/+38
| | | | | | | | | | | | | | | | Against OpenGL Bugs ; Fix glXGetFBConfigs - glXChooseFBConfig(..) - Remove NULL FBConfig pointer from result in native code, which has been observed in Mesa 8.0.5-4 libgl1-mesa-swx11 (Debian-7). - glXGetFBConfigs - Add manual implementation similar to glXChooseFBConfig - glXGetFBConfigAttrib(..) - glXGetFBConfig(..) - Returns boolean reflecting success, don't throw exception - caller handles error - Caller ignore failure if not essential (i.e. already chosen config)
* Bug 984 - Fix GLBufferObjectTracker.mapBuffer(..)'s mapBufferImpl(..) ↵Sven Gothel2014-02-261-2/+2
| | | | | | | | | 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
* 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 ) {
* | Bug 937 : Fix regression of commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 ↵Sven Gothel2014-02-252-5/+5
|/ | | | | | | | | | (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-222-7/+13
| | | | 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-224-13/+12
| | | | | | | | | | | | | | 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()
* Match Bitstream changes of gluegen commit ↵Sven Gothel2014-02-211-35/+35
| | | | 4447232af0d95a4348d09d4ed03fbef48394ca3a
* 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-185-23/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 927: Fix minor MT issues w/ libav/ffmpegSven Gothel2014-02-164-70/+76
| | | | | | | | | | | | | 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'
* 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-141-23/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-25/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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-133-16/+74
| | | | | | | | | | | | | | | | | | | | | | | | 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-132-18/+102
| | | | | | | | | | | | | | | 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 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..): GLProfile, ↵Sven Gothel2014-02-122-38/+115
| | | | | | | | | | | | 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
* GLMediaPlayer: Add user attached objects, similar to GLContext - Allowing ↵Sven Gothel2014-01-262-1/+38
| | | | GLMediaEventListener impl. to access GLMediaPlayer associated objects
* 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-244-92/+215
| | | | | | | | | | | | | | | | | | | | | | | 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-235-42/+52
| | | | EGLDrawableFactory.mapAvailableEGLESConfig(..): Clarify
* Bug 921: FPSAnimator debug output on stderr shall happen only if DEBUG is ↵Sven Gothel2014-01-221-3/+9
| | | | enabled
* 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-213-134/+399
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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!
* Bug 937 - JAWTWindow: Unsatisfying Visibility ComputationSven Gothel2014-01-122-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | Simplify JAWTComponentListener's HierarchyListener: - Don't interfere w/ Component's visibility anymore! This shall reduce sideeffects. Utilize 'isShowing' in each Component specialization, i.e. GLCanvas. - On SHOWING_CHANGED if a parent caused a change of the tracked components showing state, propagate it to the offscreen-layer! - Remove all other complicated states! GLCanvas, GLJPanel: - Instead of 'isVisible()' use 'showing state', since only the 'showing state' reflects 'true' visibility throughout the hierarchy. - Add HierarchyListener and track volatile showing state to be used instead of 'isVisible'. Using a cached showing state is more efficient than quering 'isShowing()' all the time! NewtCanvasAWT: - Use 'isShowing()' instead of 'isVisible(), see above
* Fix GLDrawableHelper.resizeOffscreenDrawable(..): Do nothing if ↵Sven Gothel2014-01-111-4/+7
| | | | | | | | !drawable.isRealized() - similar to it's recreateDrawable() and test only _after_ having the surface lock! Only after the surface lock we are thread safe. In case drawable has been pulled, do nothing ..
* Misc Cleanup: JAWTWindow: Reusing visible in HIERARCHY listener; Remove ↵Sven Gothel2014-01-112-7/+7
| | | | obsolete 'getPrivateGraphicsConfiguration()'
* Bug 935: NEWT PointerIcon: Utilize Toolkit Agnostic PixelFormat and ↵Sven Gothel2014-01-083-358/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conversion Utilities (Allowing 'arbitrary' PointerIcon data input) Commit fe28bc125429b38cdcd016746081f4a6d521c6fd added the notion of toolkit agnostic PixelFormat and conversion utilities, utilized and further tested by this patch. +++ - PointerIcon is a PixelRectangle and hence holds the decoded data. This allows on-the-fly conversion if required as well as recreation w/o PNG re-decoding. - Using array-backed PointerIcon data where possible, allowing better performance when converting PixelFormat etc. - NEWT Display adds 'createPointerIcon(final IOUtil.ClassResources pngResource...' method to support agnostic PointerIcon creation. - NEWT Display adds methods to allow users to avoid PixelFormat and Buffer NIO type forced conversion: - PixelFormat getNativePointerIconPixelFormat() - boolean getNativePointerIconForceDirectNIO() +++ PNGImage -> PNGPixelRect Deleted: com.jogamp.opengl.util.texture.spi.PNGImage Added: com.jogamp.opengl.util.PNGPixelRect (We hope nobody was using PNGImage directly since it was a service-plugin for TextureIO) PNGPixelRect is a PixelRectangle PNGPixelRect actually is implemented OpenGL agnostic, however - since our PNGJ support lives under package 'jogamp.opengl.util.pngj' it cannot be moved up (yet). PNGPixelRect now handles all PixelFormat for the target format and also added support for grayscale+alpha (2 channels). The latter is force-converted to RGB* - similar to paletted. Further more, PNGPixelRect allows simply passing an OutputStream to write the PNG data. Used by: TextureIO and NEWT +++ - OffscreenSurfaceLayer's setCursor(..) uses the agnostic PixelRectangle instead of a PNG resource. - AWTMisc uses the PixelRectangle to produce the AWT Cursor and converts it to the required format. Hence same pixels are used for NEWT and AWT pointer/cursor icon. - TestGearsES2Newt and NewtAWTReparentingKeyAdapter 'tests' iterate over 3 custom PointerIcon when pressed 'c'. - JOGLNewtAppletBase uses the new custom PointerIcon 'newt/data/crosshair-lumina-trans-32x32.png', which is included in NEWT (213 bytes only). -
* Bug 935: NEWT PointerIcon: Add Toolkit Agnostic PixelFormat and Conversion ↵Sven Gothel2014-01-081-0/+100
| | | | | | | | | | Utilities (Allowing 'arbitrary' PointerIcon data input) To allowing 'arbitrary' PointerIcon data input, i.e. via raw pixels we need to define an agnostic PixelFormat and required conversion utilities. The latter is not hw accelereated (toolkit agnostic), but this shall be expected and satisfying for small amount of 'pixels'.
* JOGL Assets: Replace test-ntsc01-160x90.png w/ test-ntsc01-57x32.png (Save ↵Sven Gothel2013-12-281-1/+1
| | | | ~2 kB)
* Bug 930 - OSX: Using 'Apple Software Renderer' GLRendererQuirks Quirk ↵Sven Gothel2013-12-232-5/+9
| | | | | | | | | | | | | | | GL4NeedsGL3Request not set GL3 core version validation failed due to missing braces around 'isES' _and_ term, where the latter consist out of 2 _or_ terms testing version mismatch. On OSX we validate a GL3 core context first and expect it to return a GL4 version if available, which in turn triggers the quirk GL4NeedsGL3Request. This behavior was disabled due to above mentioned bug, where the unqual major version caused the validation to fail. TestGLProfile01NEWT: Fixed 'GL4ES3' test, where 'GL4ES3' is only available if extension <code>GL_ARB_ES3_compatibility</code> is available as well.
* Bug 929 - Reflect ES3 Compatibility with ES2Sven Gothel2013-12-215-30/+32
| | | | | | | | | | | | | | | | | | | | | - Map ES2 -> ES3 GLProfile, if available - EGLDrawableFactory: Don't query ES2 if ES3 is available - Fix queries and get methods (GL, GLContext and GLProfile): - glES3.isGLES2()==true and glES3.getGLES2()!=null - ctxES3.isGLES2()==true, - glES3Profile.isGLES2()==true - Enhance Unit test: TestGLProfile01NEWT - Test all GLProfile availability combinations based on implementing GLProfile - Test all GLProfile's isGL*() based on highest GLProfile identity - Test all GL's isGL*() based on highest GL identity.
* Bug 925 - Refine GLContextImpl.setGLFunctionAvailability(..)'s ES version ↵Sven Gothel2013-12-211-4/+16
| | | | | | | | | | | | | | | | | validation Refine GLContextImpl.setGLFunctionAvailability(..)'s ES version validation: + // - fail if ES major-version mismatch: + // - request 1, >= 3 must be equal + // - request 2 must be [2..3] i.e. the following is accepted, otherwise fails: request has 1 1 2 2,3 3 3 4 4 ...
* Bug 925 - Accept an ES3 Context, if reported via GL-Version-String w/o ↵Sven Gothel2013-12-216-34/+128
| | | | | | | | | | | | | | | | | | | EGL_OPENGL_ES3_BIT_KHR Add Quirk 'GLES3ViaEGLES2Config': ES3 Context is used via EGL_OPENGL_ES2_BIT and 'version 2' for create context attributes. - GLContextImpl.setGLFunctionAvailability(..)'s ES version validation only fails if requested major version == 1 and doesn't match. Hence requesting major==2 and having version 3 is tolerated. - GLContextImpl.setGLFunctionAvailability(..)'s Quirks: requested-major < has-major -> Adding GLES3ViaEGLES2Config - EGLDrawableFactory.mapAvailableEGLESConfig(..): Reflects has-major version, i.e. GLES3ViaEGLES2Config situation where an ES2 request leads to an ES3 version. Note: All workarounds can be found via lookup of GLES3ViaEGLES2Config (as usual when using quirks).