aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor cleanup of imports, etc: FBObject, GLContext*, Texture, ..Sven Gothel2023-08-135-45/+30
| | | | TODO: Full cleanup perhaps
* Texture ctor w/ external textureID: Pass `ownsTextureID` where true hands ↵Sven Gothel2023-08-131-10/+28
| | | | | | | | | 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.
* Animator*: Add ctor variants passing modeBits directly, i.e. enable/disable ↵Sven Gothel2023-08-133-37/+177
| | | | AWT rendering thread support. Adopt it in tests and demos
* GLMediaPlayer: Show more reasonable DEBUG output in factory; Impl initGL(GL) ↵Sven Gothel2023-08-111-2/+20
| | | | shall handle null streamWorker, i.e. when using NullGLMediaPlayer
* Add {GL, GLContext}.getDefaultDrawBuffer() to complement getDefaultReadBuffer()Sven Gothel2023-07-153-28/+80
|
* Use DPI scaling to scale drawn fonts.Glenn Burkhardt2023-06-041-1/+14
|
* GLMediaPlayer: Add setAudioChannelLimit(..), correlating with ↵Sven Gothel2023-05-231-0/+15
| | | | | | | AudioSink.setChannelLimit() .. May be utilized to enforce 1 channel (mono) downsampling in combination with JOAL/OpenAL to experience spatial 3D position effects.
* Common av classes (*AudioSink, ..) are promoted to gluegen (commit ↵Sven Gothel2023-05-175-590/+3
| | | | 270172bcbd91f96d4a38a3d73e23d744f57a25b8) and joal (commit 03f4bb63ce8a358b1c2ef303480e1887d72ecb2e)
* HiDPI: Revise AWT GLCanvas/GLJPanel ScalableSurface: No setSurfaceScale(), ↵Sven Gothel2023-05-152-116/+118
| | | | | | | | | | | have AWT toolkit define pixelScale only (simplification) This aligns with Glenn's initial AWT patch commit e5e7514d649cd7dd28bbb8e04b72338dc09c2c83, i.e. removing redundancies... Tested on Linux, Windows and MacOS w/ GLCanvas, GLJPanel and GLWindow using pixelScale values: - Linux: 1, 2 - Windows: 1, 1.25, 2 - MacOS: 1, 2
* GLMediaPlayer: Replace GLMediaEventListener.EVENT_CHANGE_* 'int event_mask' ↵Sven Gothel2023-05-091-39/+112
| | | | with EventMask.Bit/EventMask
* AudioSinkFactory: Add debug output in case of failed initializationSven Gothel2023-05-041-0/+2
|
* AABBox: Add 'translate' w/ dedicated componentsSven Gothel2023-04-281-0/+15
|
* [PMV]Matrix[4f]: Clarify 'mulVec[34]f' in-place arg properties, add pure ↵Sven Gothel2023-04-282-16/+113
| | | | in-place variant and use it in PMVMatrix dropping temporary
* Vec[234]f: Add 'max' and 'min' functionSven Gothel2023-04-283-0/+45
|
* GLArrayDataClient: Refine API doc for grow*() and reserve()Sven Gothel2023-04-201-2/+2
|
* GLArrayDataServer.addGLSLSubArray(): Return (actual) GLArrayDataWrapper ↵Sven Gothel2023-04-201-1/+1
| | | | instead of just GLArrayData interface, exposing and allowing mutable access to attribute location for interleaved sub-arrays
* VectorUtil: Fix isVec3InTriangle3(..) testing p1, p2 and p3Sven Gothel2023-04-181-12/+8
|
* Graph + GraphUI: Consolidate Vertex: Drop SVertex and factory, use Vec[234]f ↵Sven Gothel2023-04-186-592/+199
| | | | | | | | | | | instead of float[] and remove unused VectorUtil methods After Matrix4f consolidation and proving same or better performance on non array types, this enhances code readability, simplifies API, reduces bugs and may improve performance. GraphUI: - Have RoundButton as a functional class to make a round or rectangular backdrop, i.e. impl. addShapeToRegion() via reused addRoundShapeToRegion()
* Graph/Math: Cleanup toString(), spacing and use System.lineSeparator()Sven Gothel2023-04-124-27/+21
|
* Matrix4f.mapWin*(): Drop unused temp matrices, map*() returns false on ↵Sven Gothel2023-04-092-335/+603
| | | | | | | | | | | | | | | | | | | | | | | | 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: Expose temporary storage (w/o side-effects) for efficiency; ↵Sven Gothel2023-04-081-1/+42
| | | | | | | GraphUI.Shape: Efficiently reuse matPMv and temporary PMVMatrix storage Reuse PMv in Shape.getSurfaceSize() and Shape.winToShapeCoord(), for the latter we invert the reused PMv for mapWinToObj (i.e. UnProject).
* PMVMatrix API doc: Use `` to quote code since {@code } causes block-quoting ↵Sven Gothel2023-04-081-5/+5
| | | | w/ Doxygen. Doxygen uses markdown
* PMVMatrix rewrite using Matrix4f, providing SyncMatrix4f* for GLUniformData; ↵Sven Gothel2023-04-0718-1403/+1513
| | | | | | | | | | | | | | | | | 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
* Matrix4f Perf: Enhance invert(), Drop (test) load on Matrix4f.mul(Matrix4f) ↵Sven Gothel2023-04-052-89/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for fair and realistic numbers - Both mul() ops faster than FloatUtil Enhanced invert() of Matrix4f* and FloatUtil: Use 1f/det factor for burst scale. Enhanced Matrix4f.invert(..): Use factored-out mulScale() to deliver the scale, giving a good 10% advantage on aarch64 and amd64. Brings Matrix4f.invert(..) on par w/ FloatUtil, on aarch64 even a 14% advantage. +++ TestMatrix4f02MulNOUI added an additional Matrix4f.load() to the mul(Matrix4f) loop test, which surely is an extra burden and not realistic as the mul(Matrix4f, Matrix4f) and FloatUtil pendants also don't count loading a value. Matrix4f.mul(Matrix4f) shall be used to utilize an already stored value anyways. Matrix4f.mul(Matrix4f) didn't really exist in FloatUtil. Same is true for Matrix4f.invert(), re-grouped order, i.e. pushing the non-arg variant last. +++ Revised performance numbers from commit 15e60161787224e85172685f74dc0ac195969b51 AMD64 + OpenJDK17 - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.mul(a, b) roughly ~10% faster than FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~18% faster than FloatUtil.multMatrix(a, b, dest) (*) - Matrix4f.invert(a) roughly ~ 2% faster than FloatUtil.invertMatrix(..) - Matrix4f.invert() roughly ~ 4% slower than FloatUtil.invertMatrix(..) (*) - Launched: nice -19 scripts/tests-x64.sh RaspberryPi 4b aarch64 + OpenJDK17 - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.mul(a, b) roughly ~ 9% faster than FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~14% faster than FloatUtil.multMatrix(a, b, dest) (*) - Matrix4f.invert(a) roughly ~14% faster than FloatUtil.invertMatrix(..) - Matrix4f.invert() roughly ~12% faster than FloatUtil.invertMatrix(..) (*) - Launched: nice -19 scripts/tests-linux-aarch64.sh (*) not a true comparison in feature, as operating on 'this' matrix values for one argument, unavailable to FloatUtil. Conclusion - Matrix4f.mul(..) is considerable faster! - Matrix4f.invert(..) faster, esp on aarch64 And additional Matrix4fb tests using float[16] similar to FloatUtil also demonstrates less performance compared to Matrix4f using dedicated float fields.
* AABBOX: Revert API doc copy/type errors from commit ↵Sven Gothel2023-04-051-7/+7
| | | | 15e60161787224e85172685f74dc0ac195969b51
* Math: Complete Matrix4f w/ Vec[234]f and adopt it throughout Quaternion, ↵Sven Gothel2023-04-0518-857/+3194
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ..
* Vec2f, Vec3f: Return this @ set(..), add set(float[]) and add(float, ..)Sven Gothel2023-03-302-22/+60
|
* Quaternion: Shorten toString() type nameSven Gothel2023-03-271-1/+2
|
* Add Vec2f and Vec3f, to support a more simple OO vector-math usage, e.g. for ↵Sven Gothel2023-03-222-0/+528
| | | | | | | | animation etc Implementation borrowed my 'gfxbox2' C++ project <https://jausoft.com/cgit/cs_class/gfxbox2.git/tree/include/pixel/pixel3f.hpp#n29> and its layout from OpenAL's Vec3f.
* Graph Font Processing: Use Font.GlyphVisitor instead of ↵Sven Gothel2023-03-221-0/+10
| | | | OutlineShape.Visitor, allowing to use the Glyph (information).
* GraphUI UISceneDemo*: Use lambdas for GLAutoDrawable.invoke(..) to reduce LOCSven Gothel2023-03-211-0/+7
| | | | GLAutoDrawable.invoke(..) API doc: Add semantics about GLRunnable return value.
* GLArrayDataClient: Allow null buffer @ growIfNeeded(), removed from commit ↵Sven Gothel2023-03-201-20/+1
| | | | | | 90a95e6f689b479f3c3ae3caf4e30447030c7682 A null buffer is possible in case initialElementCount at ctor is <= 0
* GLOffscreenAutoDrawable: Remove unused importSven Gothel2023-03-201-2/+0
|
* Add FloatUtil.isZero(float) using FloatUtil.EPSILONSven Gothel2023-03-201-0/+8
|
* API doc cleanup, add + refine math testsSven Gothel2023-03-197-17/+35
| | | | API doc
* ShaderProgram field programLinked: Set to false @ release()/destroy(), On ↵Sven Gothel2023-03-151-1/+5
| | | | useProgram() only throw exception if 'on==true' is requested (disabling after delettion is OK)
* opengl/util/glsl/Shader*: Mark classes and fields final, rename ↵Sven Gothel2023-03-154-22/+41
| | | | dump{Shader->}Source(), refine string output.
* AABBox: Add API doc comment on reset() and hence default ctor regarding ↵Sven Gothel2023-03-141-3/+10
| | | | infinite dimension
* TextureSequence (API Change): Use setTextureLookupFunctionName(..) ↵Sven Gothel2023-03-142-16/+46
| | | | explicitly to set the name upfront, clarifying workflow. Impl: ImageSequence + GLMediaPlayerImpl
* GLMediaPlayer: Overhaul and simplify states, allow usage before stream ready ↵Sven Gothel2023-03-131-17/+28
| | | | | | | | | | | | | | | 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
* Merge pull request #110 from gbburkhardt/masterGöthel Software2023-03-081-1/+7
|\ | | | | Fix for AWT GLCcanvas DPI scaling. Forum thread https://forum.jogamp…
| * Fix for AWT GLCcanvas DPI scaling. Forum thread ↵Glenn Burkhardt2023-03-061-1/+7
| | | | | | | | https://forum.jogamp.org/DPI-scaling-not-working-td4042206.html
* | Rename NonFSAAGLCapabilitiesChooser -> NonFSAAGLCapsChooser (too long)Sven Gothel2023-03-081-3/+3
| |
* | Apply NonFSAAGLCapabilitiesChooser in NEWTGLContext (tests only). TODO: ↵Sven Gothel2023-03-081-3/+14
| | | | | | | | Consider applying it in default chooser?
* | Graph GPUUISceneNewtDemo: Filter out all FSAA (multisample) caps if ↵Sven Gothel2023-03-081-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | undesired (Graph VBAA + MSAA); Add NonFSAAGLCapabilitiesChooser Notable: On RaspiPi4b w/ Mesa3D's Broadcom/VC driver, the chosen capabilities is a multisamnple one even though not requested. This causes - extra performance overhead - doubled AA: 1st our VBAA, then the FSAA (multisample) -> loss of sharpness Simply dropping the undersired FSAA helps and ups performance on the Raspi board (22 -> 35 fps).
* | GLArrayData: Fix API doc typo in sealed()Sven Gothel2023-03-071-1/+1
| |
* | GLArrayData: Promote sealed() from GLArrayDataEditable, to correctly being ↵Sven Gothel2023-03-075-119/+286
|/ | | | | | | | | | | | | | | | | | | | | | | 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()
* GLArrayData: year-rangeSven Gothel2023-03-061-1/+1
|
* GLArrayData*: Minor edits: API doc, space and year-rangeSven Gothel2023-03-063-5/+5
|
* GLArrayDataEditable: Clarify API doc on clear*(..) and rewind()Sven Gothel2023-03-061-2/+54
|