aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Minor cleanup of imports, etc: FBObject, GLContext*, Texture, ..Sven Gothel2023-08-132-13/+6
| | | | TODO: Full cleanup perhaps
* Texture ctor w/ external textureID: Pass `ownsTextureID` where true hands ↵Sven Gothel2023-08-131-1/+10
| | | | | | | | | over ownership and allows destroy() to delete it, otherwise not. Fixes GraphUI's GLButton. GraphUI's GLButton uses the offscreen's FBO texture and hence can't pass over ownership of the texture. Hence the Texture instance is created w/o handing over ownership! GLMediaPlayerImpl does hand over ownership of the generated and passed texture to the Texture ctor.
* GLMediaPlayer: Show more reasonable DEBUG output in factory; Impl initGL(GL) ↵Sven Gothel2023-08-111-4/+6
| | | | shall handle null streamWorker, i.e. when using NullGLMediaPlayer
* GLStateTracker: Add tracking of blending states (part-1)Sven Gothel2023-08-011-2/+129
|
* GLStateTracker: Encapsulate PixelStateMap for PixelStorei states (prepare ↵Sven Gothel2023-08-011-44/+69
| | | | for tracking of blending states)
* Add {GL, GLContext}.getDefaultDrawBuffer() to complement getDefaultReadBuffer()Sven Gothel2023-07-153-0/+18
|
* GLMediaPlayer: Add setAudioChannelLimit(..), correlating with ↵Sven Gothel2023-05-232-1/+14
| | | | | | | AudioSink.setChannelLimit() .. May be utilized to enforce 1 channel (mono) downsampling in combination with JOAL/OpenAL to experience spatial 3D position effects.
* *MediaPlayer: Adop to JOAL 39a32fd56de313c31bd197ee6022288e97f9729aSven Gothel2023-05-212-2/+6
|
* FFMPEGMediaPlayer: Adjust to AudioFormat changesSven Gothel2023-05-201-2/+2
|
* FFMPEGMediaPlayer: AudioFormat is now a stand-alone class (gluegen ↵Sven Gothel2023-05-181-2/+2
| | | | 2b339721a4d6dd4f3af129a4654375b15c7ea340)
* Common av classes (*AudioSink, ..) are promoted to gluegen (commit ↵Sven Gothel2023-05-178-1430/+9
| | | | 270172bcbd91f96d4a38a3d73e23d744f57a25b8) and joal (commit 03f4bb63ce8a358b1c2ef303480e1887d72ecb2e)
* Fix GLMediaPlayerImpl.initGL(GL): Allow null==gl and audio-only mode ↵Sven Gothel2023-05-091-16/+33
| | | | (regression to initial implementation)
* GLMediaPlayer: Replace GLMediaEventListener.EVENT_CHANGE_* 'int event_mask' ↵Sven Gothel2023-05-091-41/+44
| | | | with EventMask.Bit/EventMask
* MacOSXCGLDrawableFactory.canCreateGLPbuffer(): Disabled for MacOS >= 10.13 ↵Sven Gothel2023-05-062-2/+6
| | | | | | (High Sierra) This expands blocking Pbuffer on MacOS, see commit 1562a6d4c71b27378612306f825c2530c938f859
* Matrix4f.mapWin*(): Drop unused temp matrices, map*() returns false on ↵Sven Gothel2023-04-092-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | invPMv null; PMVMatrix: Make Mvi, Mvit optional at ctor, add user PMv and PMvi - used at gluUnProject() .. Matrix4f.mapWin*() variants w/ invPMv don't need temp matrices, they also shall handle null invPMv -> return false to streamline usage w/ PMVMatrix if inversion failed. PMVMatrix adds user space common premultiplies Pmv and Pmvi on demand like Frustum. These are commonly required for e.g. gluUnProject(..)/mapWinToObj(..) and might benefit from caching if stack is maintained and no modification occured. PMVMatrix now has the shader related Mvi and Mvit optional at construction(!), so its backing buffers. This reduces footprint for other use cases. The 2nd temp matrix is also on-demand, to reduce footprint for certain use cases. Removed public access to temporary storage. +++ While these additional matrices are on demand and/or at request @ ctor, general memory footprint is reduced per default and hence deemed acceptable while still having PMVMatrix acting as a core flexible matrix provider.
* PMVMatrix rewrite using Matrix4f, providing SyncMatrix4f* for GLUniformData; ↵Sven Gothel2023-04-074-10/+12
| | | | | | | | | | | | | | | | | Utilize Vec3f, Recti, .. throughout API (Matrix4f, AABBox, .. Graph*) Big Easter Cleanup - Net -214 lines of code, despite new classes. - GLUniformData buffer can be synced w/ underlying data via SyncAction/SyncBuffer, e.g. SyncMatrix4f + SyncMatrices4f - PMVMatrix rewrite using Matrix4f and providing SyncMatrix4f/Matrices4f to sync w/ GLUniformData - Additional SyncMatrix4f16 + SyncMatrices4f16 covering Matrix4f sync w/ GLUniformData w/o PMVMatrix - Utilize Vec3f, Recti, .. throughout API (Matrix4f, AABBox, .. Graph*) - Moved FloatUtil -> Matrix4f, kept a few basic matrix ops for ProjectFloat - Most, if not all, float[] and int[] should have been moved to proper classes - int[] -> Recti for viewport rectangle - Matrix4f and PMVMatrix is covered by math unit tests (as was FloatUtil before) -> save Passed all unit tests on AMD64 GNU/Linux
* Math: Complete Matrix4f w/ Vec[234]f and adopt it throughout Quaternion, ↵Sven Gothel2023-04-053-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ray, AABBox, Frustum, Stereo*, ... adding hook to PMVMatrix Motivation was to simplify matrix + vector math usage, ease review and avoid usage bugs. Matrix4f implementation uses dedicated float fields instead of an array. Performance didn't increase much, as JVM >= 11(?) has some optimizations to drop the array bounds check. AMD64 + OpenJDK17 - Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~3% slower than FloatUtil.multMatrix(a, b, dest) - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.invert(..) roughly ~3% slower than FloatUtil.invertMatrix(..) RaspberryPi 4b aarch64 + OpenJDK17 - Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~20% slower than FloatUtil.multMatrix(a, b) - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.invert(..) roughly ~4% slower than FloatUtil.invertMatrix(..) Conclusion - Matrix4f.mul(b) needs to be revised (esp for aarch64) - Matrix4f.invert(..) should also not be slower ..
* API doc cleanup, add + refine math testsSven Gothel2023-03-191-1/+1
| | | | API doc
* GLMediaPlayerImpl: Only kick-off StreamWorker at initGL(..)Sven Gothel2023-03-141-5/+0
|
* GLMediaPlayerImpl: Zero textureFragmentShaderHashCode and default ↵Sven Gothel2023-03-141-6/+3
| | | | lookupFunction on Uninitialized state
* FFMPEGMediaPlayer: More detailed DEBUG messages on audioSinkSven Gothel2023-03-141-3/+3
|
* TextureSequence (API Change): Use setTextureLookupFunctionName(..) ↵Sven Gothel2023-03-142-15/+31
| | | | explicitly to set the name upfront, clarifying workflow. Impl: ImageSequence + GLMediaPlayerImpl
* GLMediaPlayerImpl: isTextureAvailable() is always true after lastFrame init; ↵Sven Gothel2023-03-131-2/+6
| | | | Use private isPausedOrPlaying() to determine shaderCodeHash
* GLMediaPlayer: Overhaul and simplify states, allow usage before stream ready ↵Sven Gothel2023-03-136-79/+191
| | | | | | | | | | | | | | | showing test-texture. Adding stop(); (API Change) - allow multiple initGL(..) @ uninitialized and initialized - allows usage before stream is ready - using a test-texture @ uninitialized - adding stop() API change - initStream() -> playStream() - play() -> resume() FFMPEG: Added 'ready' check for robustness
* Move png assets (NEWT icons + GLMediaPlayer dummy/test) to simple classpath, ↵Sven Gothel2023-03-132-1/+1
| | | | allowing access w/o jars. TODO: Test Android.
* [GL]Capabilities*: Enhance identity-check in root Capabilities.equals(..), ↵Sven Gothel2023-03-081-0/+14
| | | | | | | | | | comparing the VisualID first; Added VisualIDHolder.isVisualIDSupported(VIDType) We cannot accept 2 capabilities with different VisualID but same attributes otherwise accepted as equal, since the underlying windowing system uniquely identifies them via their VisualID. Such comparison is used in certail GLAutoDrawable implementations like AWT GLCanvas to determine a configuration change etc.
* GLArrayData: Promote sealed() from GLArrayDataEditable, to correctly being ↵Sven Gothel2023-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | used for getElemCount() instead of 0==position, ... (API change) API Change - sealed() moved up from GLArrayDataEditable -> GLArrayData - GLArrayDataWrapper is sealed by default - getSizeInBytes() -> getByteCount() - Semantics of getElemCount() and getByteCount() - Correctly use sealed() to switch from position to limit - instead of 0==position Aligned method names: - getElemCount() - elemPosition() - remainingElems() - getElemCapacity() to corresponding byte counts: - getByteCount() - bytePosition() - remainingBytes() - getByteCapacity()
* Clock: Use Clock.currentNanos() instead of System.nanoTime(); Enhancing ↵Sven Gothel2023-03-072-23/+33
| | | | | | FPSCounterImpl accuracy by maintaining timestamps in [ns] Idea: Perhaps we want to use [ns] for FPSCounter's method types by now?
* FFMPEGMediaPlayer: Cleanup API doc FFmpeg versionsSven Gothel2023-03-051-4/+4
|
* GLDrawableFactoryImpl:createDummyDrawable(): Similar to ↵Sven Gothel2023-03-041-5/+15
| | | | | | createOffscreenDrawable() prefer createSurfacelessImpl() over createDummySurfaceImpl() to reduce resources (no actual window) This enhances the 'dummy drawable' use-case implementation, i.e. for shared context.
* GLDrawableFactoryImpl:createMutableSurfaceImpl(..): Pass orig ↵Sven Gothel2023-03-046-40/+42
| | | | AbstractGraphicsDevice to allow EGLDrawableFactory to use the original device's native-dislay-ID for sharing resources.
* GLDrawableFactoryImpl:createDummySurfaceImpl() and createSurfacelessImpl(): ↵Sven Gothel2023-03-047-69/+91
| | | | | | | Pass orig AbstractGraphicsDevice to allow EGLDrawableFactory to use the original device's native-dislay-ID for sharing resources. EGLDrawableFactory to use the original device's native-dislay-ID for sharing resources, e.g. GLContext. EGL 1.4 requires same native-display-ID of share-list context and newly created context!
* EGLGraphicsDevice: Cleanup and enhance API doc for clarity ...Sven Gothel2023-03-041-8/+8
|
* GLMediaPlayerImpl: destroyImpl(..) @ initGL(..) exception: Don't wait for ↵Sven Gothel2023-03-041-5/+8
| | | | streamWorker stop result (-> deadlock)
* Drop redundant NativeWindowFactory.getDefaultToolkitLock(type, deviceHandle) ↵Sven Gothel2023-03-021-3/+3
| | | | variant
* GLArrayData*: Shorten methods (*API Change*), use proper constructor and ↵Sven Gothel2023-02-242-2/+2
| | | | | | | | | | | | | finalize immutables, add growthFactor (default golden ratio 1.618), add getCapacity*() and printStats(..) The growthFactor becomes essential for better growth behavior and can be set via setGrowthFactor(). The other changes were merely to clean up the GLArrayData interface and its 4 implementations. Not great to change its API, but one name was misleading ['getComponentCount' -> 'getCompsPerEleme'], so overall .. readability is enhanced. Motivation for this change was the performance analysis and improvement of our Graph Curve Renderer.
* FFMPEGMediaPlayer: Add implementation update for FFmpeg version 4.* (Debian ↵Sven Gothel2023-02-238-341/+197
| | | | | | | | | | | | | | | | | | | | | | | 11), 5.* (Debian 12) and 6.* (Current Development trunk) From here on, libav support has been dropped. Required FFmpeg libraries to be fully matched by their major runtime- and compiletime-versions are: - avcodec - avformat - avutil - swresample Library avdevice is optional and only used for video input devices (camera). Library avresample has been removed, since FFmpeg dropped it as well in version 6.* and swresample is preferred for lower versions. The matching major-versions of each library to the FFmpeg version is documented within FFMPEGMediaPlayer class API-doc. Each implementation version uses the non-deprecated FFmpeg code-path and compilation using matching header files is warning-free.
* MacOSXCGLContext: Fix typo in DEBUG outputSven Gothel2023-01-221-10/+10
|
* MacOSXCGLContext: Enable DEBUG1398 explicitly w/o debugAll()Sven Gothel2023-01-221-1/+1
|
* jogl's Debug.class: Add explicit debugNotAll(..) variant to skip debugAll()Sven Gothel2023-01-221-1/+5
|
* MacOSXCGLContext.AttachGLLayerCmd: Allow DetachGLLayerCmd to revoke the ↵Sven Gothel2023-01-211-5/+11
| | | | | | | | attach command, essential if attach hasn't been done yet @ detach Otherwise a pending attach would still pass through after DetachGLLayerCmd releases the sync-lock from AttachGLCmd. DetachGLCmd also tests 0 != nsOpenGLLayer
* Don't import conditional platform specific 'static' code but fully qualify ↵Sven Gothel2023-01-201-11/+5
| | | | names when in use, make Android d8 (Dex'ing) happy
* MacOSXCGLDrawableFactory.canCreateGLPbuffer(): Disabled for MacOS >= 12, ↵Sven Gothel2023-01-181-2/+5
| | | | here > 10.14.0 (Mojave)
* MacOSXCGLContext: Avoid data race on lastSetNSViewCmd, use local copy like ↵Sven Gothel2023-01-181-3/+4
| | | | in madeCurrent
* X11GLXContext.getPlatformExtensionsStringImpl(): Add comment from pull ↵Sven Gothel2023-01-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | request regarding GLX extensions https://github.com/sgothel/jogl/pull/107 Return either glXQueryClientString or glXQueryExtensionsString when getting the GLX extensions ndjojo: glXQueryExtensionsString will make a request for glXQueryServerString if needed and will append the necessary client-side extensions. This doc, under the section "Using GLS Extensions", also suggests checking the glXQueryExtensionsString before using GLX extensions. +++ aschleck: For some more context this came up with the release of Mesa 20.3.0, which has client support for GLX_EXT_swap_control but no server support. The current JOGL behavior of appending the client extensions to the server extensions is incorrect. They should instead be intersected (with client-only extensions then appended) as the doc Nicole linked above says, which is precisely what glXQueryExtensionsString does. With the current extension querying behavior JOGL thinks glXSwapIntervalEXT is available under Mesa/llvmpipe even though it is not, causing a segfault at JOGL initialization time. I originally filed this as a Mesa bug (https://gitlab.freedesktop.org/mesa/mesa/-/issues/4128) along with some code that repro'd JOGL's checking behavior but it became apparent that Mesa is fine and the checking behavior is incorrect.
* Merge pull request #107 from ndjojo/platform-extensionsSven Gothel2023-01-161-10/+2
|\ | | | | Return either glXQueryClientString or glXQueryExtensionsString when getting the GLX extensions
| * Update X11GLXContext.javandjojo2021-01-201-10/+2
| |
* | Moved GlueGen's PlatformPropsImpl's static OSXVersion to ↵Sven Gothel2023-01-152-6/+29
| | | | | | | | GLContextImpl.MacOSVersion
* | Replace AccessController.doPrivileged() w/ SecurityUtil.doPrivileged()Sven Gothel2023-01-149-21/+22
| |
* | MacOS: MacOSXCGLContext.drawableUpdatedNotify(): Issue updateContext() on ↵Sven Gothel2023-01-141-21/+2
| | | | | | | | | | | | main thread, deferred w/o wait (MacOS >= 13) updateContextRegister() stays in current thread.