aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Reduce jar-size / cleanup: Replace 1 kB test-ntsc01-57x32.png w/ 400kB ↵Sven Gothel2014-04-101-1/+1
| | | | test-ntsc01-28x16.png asset ; Generalize TextureSequenceDemo01 -> SingleTextureSeqFrame ; Unit tests use test-data, not assets.
* FFMPEGMediaPlayer: Use 'const' qualifier in shader stubSven Gothel2014-04-091-4/+4
|
* Add TextureSequence.isTextureAvailable(), allowing triggering action only ↵Sven Gothel2014-04-091-0/+5
| | | | when source becomes ready
* Bug 801: Reduce temp. object creation, i.e. GC loadSven Gothel2014-04-022-23/+33
|
* X11/WGL GLContext Impl: setGLFunctionAvailability(..) w/ ↵Sven Gothel2014-04-013-4/+4
| | | | | | | | withinGLVersionsMapping:=true if null == sharedContext .. otherwise no quirk could be set on non ARB ctx GL implementations. null == sharedContext, always for first context creation, i.e. indeed within GL version mapping.
* GLRendererQuirks.NoMultiSamplingBuffers: Prelim detection of this quirk due ↵Sven Gothel2014-03-191-1/+14
| | | | to Gallium/Nouveau Driver (TODO: Handle it in GLCapabilities Selection)
* Add generic support for picking via raycast intersection and AABBox (or similar)Sven Gothel2014-03-161-5/+5
| | | | | | | | | - New simple type Ray, denominating a .. ray - Added PMVMatrix.gluUnProjectRay(..) similar to gluUnproject(..) however, result is a Ray. - Added AABBox.intersectsRay(Ray) ..
* FloatUtil/VectorUtil: Enhance isEqual/compare w/ and w/o epsilon, add unit ↵Sven Gothel2014-03-151-4/+4
| | | | tests - Cleanup VectorUtil (vec2/3 naming, remove dedundant functions)
* Math and PMVMatrix: Cleanup and RefineSven Gothel2014-03-143-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added final qualifier where possible - Refined API doc - FloatUtil: - Add machine EPSILON - fixed value and runtime computed (real machEps) - incl. isZero(..), isEqual(..) - Add makeRotationAxis(..) - Moved from PMVMatrix for reusage - Add makeRotationEuler(..) - New, not recommended due to Gimbal-Lock - Add copyMatrix[Column|Row](..) - Add more PI variations and trigo-func float mappings - Removed cross and normalize, use VectorUtil! VectorUtil: - Add copyVec* - Add equals and isZero w/ and w/o EPSILON - Add distance[Square] - Add length[Square] PMVMatrix: - Removed 'destroy' method in favor of making most fields 'final'. AffineTransform: - Added AABBox transform - Public multiply
* 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
* 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 ) {
* 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 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'
* 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
* GLPixelStorageModes: Safe and restore GL2ES3 modes, i.e. add missing GLES3 ↵Sven Gothel2014-02-141-8/+8
| | | | modes. GLStateTracker: Use proper GL names for enums
* Bug 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..): GLProfile, ↵Sven Gothel2014-02-121-7/+5
| | | | | | | | | | | | 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-261-0/+19
| | | | GLMediaEventListener impl. to access GLMediaPlayer associated objects
* Bug 948 - Autodetect GLRendererQuirks.SingletonEGLDisplayOnlySven Gothel2014-01-242-22/+17
| | | | | | | | | 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)
* Bug 948 - NVIDIA 331.38 (Linux X11) EGL impl. only supports _one_ EGL ↵Sven Gothel2014-01-243-89/+167
| | | | | | | | | | | | | | | | | | | | | | | 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-241-1/+1
| | | | | | | | [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
* 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-212-1/+19
| | | | | | | | | | | | | | | | | | | | 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: Tracking GLBufferStorage accurately, ↵Sven Gothel2014-01-216-273/+650
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* 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()'
* 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-231-4/+8
| | | | | | | | | | | | | | | 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-213-24/+22
| | | | | | | | | | | | | | | | | | | | | - 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-215-32/+95
| | | | | | | | | | | | | | | | | | | 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).
* Bug 925: Use proper common profile and test compatibility for ↵Sven Gothel2013-12-211-8/+11
| | | | GLContextImpl's default VAO.
* FFMPEGMediaPlayer: Add missing indentation of commit ↵v2.1.4_rc01Sven Gothel2013-12-181-7/+7
| | | | 8a032a2c1f247819bdb08382fbebcc4cd896b3f2
* ALAudioSink GLMediaPlayerImpl FFMPEGMediaPlayer: Verbosity only w/ DEBUG flag.Xerxes Rånby2013-12-183-3/+7
| | | | Signed-off-by: Xerxes Rånby <[email protected]>
* Bug 918: Fix EOS Regression: Only use pts>duration for EOS if duration > 0 ↵Sven Gothel2013-12-111-2/+2
| | | | | | (camera or other sources may not have duration) Regression of commit 8a8ed735f6631b2da7bf605c5c3dda4e0fc13905
* ALAudioSink: Fix stop and flush of OpenAL sourceSven Gothel2013-12-111-115/+125
| | | | | | | | | | - stopImpl() shall always issue alSourceStop(..) if state is not STOPPED - Remove 'flush' hint for dequeueBuffer(..), we perform proper flush in respective method, see below - flush() needs to issue: - stopImpl() - which should already dequeue all buffers - Explicitly dequeue all buffers: via 'alSourcei(alSource[0], AL.AL_BUFFER, 0)' - Then dequeue manually processed buffers: dequeueBuffer( false /* wait */ ); - And dequeue _all_ buffers: dequeueForceAll();
* Bug 918 (2/2): Determine StreamWorker usage after stream-init ; Fix seek(..) ↵Sven Gothel2013-12-111-87/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ; Fallback for EOS Detection ; MovieSimple uses full GLEventListener for 'Audio Only' as well to test seek Determine StreamWorker usage after init - To support audio only files, we need to determine to use StreamWorker after completion of stream-init. Fix seek(..) - FFMPeg: pos0 needs to use aPTS for audio-only - Clip target time [0..duration[ Fallback for EOS Detection In case the backend does not report proper EOS: - Utilize 'nullFramesCount >= MAX' -> EOS, where MAX is number of frames for 3s play duraction and where 'nullFramesCount' is increased if no valid packet is available and no decoded-video or -audio in the queue. - Utilize pts > duration -> EOS MovieSimple uses full GLEventListener for 'Audio Only' as well to test seek - Matroska seek for audio-only leads to EOS .. http://video.webmfiles.org/big-buck-bunny_trailer.webm - MP4 audio-only seek works http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4 MovieSimple/MovieCube: - Use audio-pts in audio-only to calc target time Tested: - A, V and A+V - Pause, Stop and Seek - GNU/Linux
* Bug 918: GLMediaPlayer: Fix Deadlock if EOS happens after pause/resume ↵Sven Gothel2013-12-111-10/+18
| | | | | | | | | (seek) - Tested w/ seeking 'Audio Only' and Matroska Test stream was default of MovieSimple: http://video.webmfiles.org/big-buck-bunny_trailer.webm while disabling video (-vid -2)
* Bug 918 (1/2): Use StreamWorker in 'Audio Only' mode, since no ↵Sven Gothel2013-12-111-1/+1
| | | | | | | | 'getNextTexture(..)' is issued here! Thanks to Xerxes to analyze this issue thoroughly. TODO: Implement EOS for 'Audio Only' and test seek, pause, etc .. - Apply manual tests in MovieSimple