aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1496 - GraphUI Shape: Allow markShapeDirty() and markStateDirty() to be ↵Sven Göthel2024-01-311-11/+8
| | | | lock free
* Bug 1495: GraphUI Shape: Only updateMat() if marked dirty once in ↵Sven Göthel2024-01-311-34/+64
| | | | | | | | applyMatToMv() and getMat(*) It is sufficient to mark the internal iMat dirty when mutating the source values (pos, ..) and calling updateMat() only once when used in applyMatToMv() and getMat(*). iMatIdent can also be set to true within updateMat() IF neither mutations occured, i.e. no translocation, scale or rotation.
* Utilize PTS.getCurrent() where applicableSven Göthel2024-01-312-6/+6
|
* GLMediaPlayer: Split GLMediaFrameListener (rarely used) from ↵Sven Göthel2024-01-312-9/+0
| | | | | | | | | | GLMediaEventListener, easing listener callbacks; Prepare SubtitleEventListener generalization (Bug 1494) Moves pushSound(), pushSubtitle*() from FFMPEGMediaPlayer to GLMediaPlayerImpl, as it is handled in a generic way - even though currently only called by native FFMPEGMediaPlayer implementation. Note: This patch is incomplete, i.e. not even compile clean. But choses as-is to semantically split the work to ease review.
* GraphUI MediaButton: Add blending below subtitle, allow setting ↵Sven Göthel2024-01-292-18/+69
| | | | color/blending and subLineDY; MediaPlayer: Add full infoLine toggle with click on infoBox
* FFMPEGMediaPlayer/GraphUI MediaButton: AVSubtitles's start/end are relative ↵Sven Göthel2024-01-281-20/+32
| | | | to pts [ms] (fixed); Use ASSEventLine packets within proper pts only.
* Cleanup GLMediaPlayer.EventMask.Bit handling in GLMediaEventListener ↵Sven Göthel2024-01-281-2/+1
| | | | implementations: Either Uninit, Init, Pause or Play (exclusive)
* GraphUI MediaButton: Clear cached subtitle data on uninit and init from ↵Sven Göthel2024-01-281-2/+12
| | | | GLMediaPlayer
* GraphUI MediaPlayer: Remove debug message (Behavior to disable border if ↵Sven Göthel2024-01-281-1/+0
| | | | zoomSize == 1, full-screen)
* GraphUI MediaButton/MediaPlayer-Widget: Add working subtitle (text + ↵Sven Göthel2024-01-282-6/+174
| | | | ass/saa) support via GLMediaPlayer/FFMPEGMediaPlayer
* GraphUI Misc Cleanup: Move get*Font() helper to Scene; Allow ↵Sven Göthel2024-01-283-19/+24
| | | | GraphShape.drawImpl0(..) override;
* GraphUI Group: Don't draw border is set invisibleSven Göthel2024-01-281-2/+2
|
* GraphUI MediaPlayer: Disable always DEBUG hackSven Göthel2024-01-271-1/+1
|
* GraphUI MediaPlayer: Bump Chapter tooltip scaleSven Göthel2024-01-271-1/+1
|
* GLMediaPlayer: Support tile metadataSven Göthel2024-01-271-17/+3
|
* GraphUI MediaPlayer Widget: Support switching audio and subtitle streams, ↵Sven Göthel2024-01-271-7/+54
| | | | show their language as a button - press to switch to next
* GraphUI MediaPlayer: seek from display-thread, don't act on ↵Sven Göthel2024-01-271-13/+8
| | | | SliderAdapter.clicked() as dragged is always called
* GraphUI MediaPlayer: Cleanup infoLabel layout; Add sticky HUD (always-on) ↵Sven Göthel2024-01-261-40/+77
| | | | button; Fix tooltip help; Make slower-speed reduce by half if <= 1
* GraphUI RangeSlider: Use a modulating color for rect page frame for visible ↵Sven Göthel2024-01-261-4/+41
| | | | response when active
* GraphUI Shape: API doc for colors; add makeShapeDirty() on setColor(); add ↵Sven Göthel2024-01-261-9/+68
| | | | activeRGBAModulateOn.
* GraphUI Layout: Emphasize whether a value/parameter is scaled or unscaled in ↵Sven Göthel2024-01-266-72/+76
| | | | API doc to ease usage
* Math Vec*: Rename {scale->mul}(..) for non-scalar types (n-dim); Add div(..)Sven Göthel2024-01-263-8/+8
|
* GraphUI MediaPlayer: Fix Zoom behavior; Disable DEBUG outputSven Göthel2024-01-191-33/+67
|
* GraphUI RangeSlider/RangedGroup: Fix overall integration, adding more API ↵Sven Göthel2024-01-192-101/+272
| | | | | | | | | | | | | | | | | | | comments; UIMediaGrid01 now uses RangedGroup RangeSlider - Fix pageSize, i.e. allow valid content.getBounds() be pending @ validateImpl() - Clip value [0, maximum - pageSize] - Has to use Float.isFinite() to capture both, NaN and Infinity -- used for pageSize, determining whether slider uses pageSize rect-knob or position round-knob -- used for minMax, val, val_pct and temp range + pageSize_pct -- don't overwrite valid pageSize if leading to !isFinite() - Reuse setKnobSize() for ctor as well, where padding is be done once (FIXME?) - Tested via RangedGroup w/ UIMediaGrid01 and FontView0 -- vertical slider, inverse and !inverse
* GraphUI Tooltip: Use delayMS for no time-based alarm (only used for now()); ↵Sven Göthel2024-01-191-13/+14
| | | | FontView01: Use TooltipShape for GlyphShape only with mouse click -> Tooltip.now()
* Scene.dispatchMouseEventPickShape(): Reuse PMVMatrix4f, Ray and Vec3f within ↵Sven Göthel2024-01-191-6/+8
| | | | EDT, reducing temp objects on mouse moves
* TooltipShape.destroyTip(): Only show warning instead of throwing a ↵Sven Göthel2024-01-191-1/+5
| | | | RuntimeException if tip couldn't be found within wrapper Group
* Simplify TooltipShape: Create own wrapper Group to not mutate user given ↵Sven Göthel2024-01-222-27/+80
| | | | Shape (if reused in DAG); Fix FontView01 TooltipShape instance, use NoOp DestroyCallback
* Bug 1490: Add missing rename Shape.transformMvTo() -> applyMatToMv(), an ↵Sven Göthel2024-01-221-31/+31
| | | | transformMvTo() was an intermediate rename (oops)
* Bug 1489 - GraphUI Group: Resolve Performance Regression in ↵Sven Göthel2024-01-226-76/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scene.pickShape(): Drop invisible and clipped shapes After implementing Bug 1487 (Frustum Clipping/Culling) and using thousands of shapes within one Group mostly culled (outside of frustum), overall mouse Scene.pickShape() caused tremendous lagging. This is caused by Scene.pickShape() traversing through _all_ shapes, rendered ones, invisible ones and culled ones. +++ Solution is to have Scene and Group provide a pre-sorted list of actually rendered shapes, i.e. isVisible() and not culled. Scene.pickShape() can now use this reduced and pre-sorted list reducing the load considerably. +++ Further - cleanup TreeTool - rename Container methods: -- setFrustumCullingEnabled() -> setPMvCullingEnabled() -- isFrustumCullingEnabled() -> isPMvCullingEnabled() - supply Container with -- isCullingEnabled() -- List<Shape> getRenderedShapes() -- isOutside() -- isOutside2() -- forAllRendered()
* Bug 1490 - GraphUI Performance: Group/Scene: Use temp sorted arraysSven Göthel2024-01-222-16/+25
| | | | | Group/Scene's uses temp arrays for Z oder sorting, which should be maintained locally to avoid too many temp object creations.
* Bug 1490 - GraphUI Group: Resolve Performance Issues with Shape Mv Transform ↵Sven Göthel2024-01-226-90/+188
| | | | | | | | | | | | | | | | | | | | -> PMVMatrix4f Shape.setTransformMv() is called for each renderer frame and for each shape, involving 6 Matrix4f.mul() and set*() operations. Since mutation of shape's position, rotation or scale is less frequent than rendering one frame (for all shapes), it is more efficient to maintain a local Matrix4f and update it on such single mutations. Rendering then only needs to perform one Matrix4f.mul() operation using this internal matrix. +++ Also changes name from setTransformMv(PMVMatrix4f) to applyMatToMv(PMVMatrix4f), as its name might be misleading.
* GraphUI RangeSlider: Keep Region.AA_RENDERING_MASK in renderModesSven Göthel2024-01-201-1/+1
|
* GraphUI Tooltip*: Allow user to trigger display via now(); Ensure ↵Sven Göthel2024-01-204-45/+108
| | | | TooltipShape.DestroyCallback gets passed the user provided Shape only
* GraphUI Group: Add ctor with most usable values, allowing injecting a Group ↵Sven Göthel2024-01-201-1/+24
| | | | as a one-liner in code
* GraphUI Group/BoxLayout/GridLayout: Handle empty Group, i.e. detect ↵Sven Göthel2024-01-203-5/+19
| | | | zero-size and avoid scale=Infinity and zero-sized resulting AABBox
* GraphUI Graph/Scene: Reuse TreeTool for contains(), getShapeByID() and ↵Sven Göthel2024-01-202-37/+6
| | | | getShapeByName(), also adding full traversion (instead of a flat lookup)
* Graph Clipping: Use Frustum Clipping using AABBox -> Mv transformed Cube -> ↵Sven Göthel2024-01-203-38/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | Frustum mapping + GraphUI Support AABBox clipping naturally couldn't be transformed into 3D Model-View (Mv) Space, as it is axis aligned and only provided 2 points (min/max). Therefor we map the Group's AABBox to a 8-point Cube, perform the Mv-transformation and then produce the 6-plane Frustum. As before, we cull fully outside shapes within the Group's draw method and perform fragment clipping with same Frustum planes in the shader. With clipping enabled, the 3D z-axis getBounds() depth will be slightly increased for functional Frustum operation. This is also done for setFixedSize(Vec2f). The Frustum planes are copied to the Graph shader via float[4*6] -> uniform vec4 gcu_ClipFrustum[6]; // L, R, B, T, N, F each {n.x, n.y, n.z, d} +++ Concludes related work of below commits - 1040bed4ecc6f4598ea459f1073a9240583fc3c3 - 5cca51e32999a882e2a5f00cb45ecafc824ffd86
* Frustum: Revise code and its Plane definition to support Cube->Frustum as ↵Sven Göthel2024-01-192-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | well as to extract planes for float[] vec4-shader uniforms. commit 1040bed4ecc6f4598ea459f1073a9240583fc3c3 added AABBox -> Cube -> Frustum mapping (incomplete) and requires Frustum.Plane.set(..) by normal and point-on-plane for distance. Frustum.isOutside(Cube) has been added, testing all its 8-points similar to AABBox. Further all 6 Frustum.Plane shall be extracted to Vec4f and float[], the latter to pass the whole float[4*6] as a vec4[6] uniform array to the shader. +++ Constructor, setter and getter have been adjusted accordingly. Most of the loops have been unrolled. +++ Method names to query Frustum, i.e. 'is*Outside(<Type>)' have been reduced to 'isOutside(<Type>)' where <Type> uniquely indenticates the purpose. Hence only 'isSphereOutside()' is left over.
* GraphUI Tooltip*: Generalize Tooltip base (more versatile) and add ↵Sven Göthel2024-01-195-41/+240
| | | | TooltipShape supporting general Shapes to be added
* GraphUI Enhance Clipping: Drop 'cullingScale' param, a simple ↵Sven Göthel2024-01-162-28/+11
| | | | | | | | | | intersection-test against 'clipBox' to discard whole shapes if completely outside is enough. Commit f06fe57b0ae738870a61700ff2c65680102d9e73 turns out addition of using `clipbBox*cullingScale` for the AABBox contains test was not required to render the new Glyphs in the FontView01 demo 'in time'. A simple intersection-test against 'clipBox' to discard shapes if completely outside is enough, hence dropping the 'cullingScale' parameter - simplifying.
* GraphUI GLButton: Filter out Region.AA_RENDERING_MASK in ctor, as ↵Sven Göthel2024-01-161-1/+2
| | | | GLEventListener renders into FBO at correct resolution.
* Graph/GraphUI AA-Quality + SampleCount (shader): Push params down to ↵Sven Göthel2024-01-1611-128/+71
| | | | | | | | | | | | | | | | | | RegionRenderer's RenderState usually rarely set from top of user API, reducing complexity. Discussion: Alternative was to pass AA-Quality same as SampleCount from the top (e.g. GraphUI Scene), however, this convolutes the API even more. Both parameter modify the resulting shader code in pass2 rendering (only). The used 'renderMode' is still maintained within the Region, since it contains more dynamic states individual to each Region instance (color-texture, ..). This despite 'renderMode' also changes the RenderState's shader program. In the end, it really doesn't matter and is a choice of frequency - the pipeline is usually rendering from on OpenGL rendering thread sequentially. AA-Quality and SampleCount simply usually don't change that often and are set only once.
* GraphUI RangedGroup.validateImpl(): Simplify updating contentPosZeroSven Göthel2024-01-161-5/+9
|
* GraphUI Enhance Clipping: Drop pixel clipping if `clip-box >= ↵Sven Göthel2024-01-162-10/+34
| | | | | | | | | | | | | | | | | | | | | | | clip-box*cullingScale` (Group). RangedGroup: Pass through `clipCullingScale` to cull fully outside shapes; Apply in FontView01 Demo.. Group.setClip{BBox, OnBounds}() set 'cullingScale' drops pixel clipping if `clip-box >= clip-box*cullingScale`. - Discard Shape rendering if completely outside of `clip-box*cullingScale` - Otherwise perform pixel-accurate clipping inside the shader within [`clip-box` .. `clip-box*cullingScale`] - If `clip-box >= clip-box*cullingScale` for all axis, no pixel-accurate clipping is performed as shapes are culled before +++ RangedGroup: Pass through `clipCullingScale` allowing to cull fully outside shapes outside the 'box * clipCullingScale' and use pixel-accurate clipping from [box..box*clipCullingScale]. Uses content.setClipBBox(..) with Mv premul-mat clippedContent.getBounds() in drawImpl0() override +++ FontView01 Demo - Using RangedGroup 'clipCullingScale' w/ culling >= 2*cell-size outside of clipping box (vertical only) - Allows to drop the manually coded setVisible() hack and simplifies overall usage! - This to not issue _initial_ rendering (draw) of all 14k+ Regions (Glyph-Count * 2) at once (resources, startup-performance)
* GraphUI Group Clipping setClip{OnBox->OnBounds}(): Add Vec3f cullingScale ↵Sven Göthel2024-01-151-21/+76
| | | | | | | | | | | | | | | | | | factor for the clip-box to discard rendering completely..; Add Group.setClipBBox(..) Changed Group.setClip{OnBox->OnBounds}(): Enable AABBox clipping on getBounds() for this group and its shapes as follows: - Discard Shape rendering if completely outside of the 'clip-box * cullingScale' - Otherwise perform pixel-accurate clipping inside the shader on 'clip-box' +++ Added Group.setClipBBox(): Enable AABBox clipping on explicit given pre-multiplied Mv-matrix 'clip-box as follows - Discard Shape rendering if completely outside of the 'clip-box * cullingScale' - Otherwise perform pixel-accurate clipping inside the shader on 'clip-box'
* GraphUI: Added RangedGroup Widget, displaying a clipped content Group with ↵Sven Göthel2024-01-151-0/+160
| | | | | | | | | | optional horizontal and/or vertical RangeSlider; FontView01 now uses RangedGroup scrolling GlyphGrid smooth per-pixel GraphUI: Added RangedGroup Widget, displaying a clipped content Group with optional horizontal and/or vertical RangeSlider - Utilizes Group.setClipBox() to enable clipping of its content to the Group's AABBox - Uses RangeSlider based on given contentSize FontView01 now uses RangedGroup scrolling GlyphGrid smooth per-pixel
* GraphUI Shape: Add receiveKeyEvents() and receiveMouseEvents() allowing a ↵Sven Göthel2024-01-153-8/+135
| | | | | | | | | | Shape to receive forwarded events from another Shape; Added receive*Events() specialisation for RangeSlider Forwarding events from shape to shape is useful, allowing inner shapes to send them to its group, which itself may send it out towards an outer widget like RangeSlider. RangeSlider's receive*Events() specialisation receives desired events from the source to its barAndKnob and knob shapes, which are listening. It also suppresses the mouseClicked() event as it is only useful coming from itself.
* GraphUI RangeSlider: [add,remove]{->Slider}Listener()Sven Göthel2024-01-151-2/+2
|
* GraphUI RangeSlider: Add SliderAdapter (convenience) and use a ↵Sven Göthel2024-01-152-38/+70
| | | | listener-array (was 1 instance)