aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* TextureSequence.setTexCoordBBox(): Add 'verbose' parameter for debug output ↵Sven Gothel2023-10-034-7/+7
| | | | instead hard coded branch
* GraphUI Shape: Complete commit c8ec6fa7cc16a0777db16af8b4d0d0b898f8b546Sven Gothel2023-10-031-2/+13
|
* GraphUI Shape: 'int name' -> 'int id' and add 'String name', change get/set ↵Sven Gothel2023-10-038-34/+71
| | | | methods accordingly
* GraphUI Scene: Add custom one-time GLRunnable disposable action list, ↵Sven Gothel2023-10-032-0/+24
| | | | | | | | allowing to properly take-down user resources at dispose(GLAutoDrawable) Used for UISceneDemo20 to stop and release SimpleSineSynth and its ALAudioSink. The latter causes a bad exit (crash at OpenAL32.dll) on OpenJDK's Window Binary if not stopped!
* Bug 1470 - FFmpeg / JNI: Perform exception check and rethrow for all Java ↵Sven Gothel2023-10-023-7/+48
| | | | Callbacks as recommended
* Bug 1471: Add a GLEventAdapter for GLEventListener similar to the other ↵Sven Gothel2023-10-021-0/+42
| | | | Adapter patterns
* Bug 1470 - NEWT/JNI: Perform exception check and rethrow for all Java ↵Sven Gothel2023-10-026-7/+67
| | | | Callbacks as recommended
* Bug 1469 - FFmpeg binding uses ReleaseStringChars instead of ↵Sven Gothel2023-10-021-12/+14
| | | | ReleaseStringUTFChars for GetStringUTFChars() acquired UTF
* Bug 1468 - SIGSEGV on use after free when destroying NEWT Window/Display via ↵Sven Gothel2023-10-0225-380/+814
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a native dispatch'ed event like key/mouse/touch input SIGSEGV on use after free of native X11 Display* at XEventsQueued in DisplayDriver.DispatchMessages0. This potentially happens when an application destroys the NEWT Window/Display from an action being called directly from DisplayDriver.DispatchMessages0 (itself), i.e. keyboard or mouse input. DisplayDriver.DispatchMessages0 stays in the event loop and the next XEventsQueued call causes a SIGSEGV due to already deleted display driver connection and hence invalid native X11 Display*. This issue also exist for other Windowing System drivers, where the native (dispatch) method sticks to a loop and still (re)uses the window or display handle. One is WindowsWindow, where touch events are looped, but such handler could have closed the window. Querying the status of a window / display instance before dispatching is not be good enough - resource could already be GC'ed, so we also would need to query jobject status - would imply an addition Java callback +++ This fix: Having the Java callbacks return a boolean with the value Window.isNativeValid(). This way the dispatch logic - can bail out right away w/o using the resource anymore - must be reviewed by myself due to changed Call{Void->Boolean}*(..) invocation change. This review shall resolve potential similar issues. +++ Tested on X11/Linux/GNU, Windows and MacOS with new TestDestroyGLAutoDrawableNewtAWT, which tests all destruction invocation variants.
* Bug 1468: Demos MiscUtil.destroyWindow() Call GLAutoDrawable.destroy() ↵Sven Gothel2023-10-013-7/+23
| | | | directly w/o mitigation attempts (off-thread)
* Bug 1467 - GraphUI: Don't de-activate a Shape if became active via ↵Sven Gothel2023-09-301-15/+24
| | | | | | | | 'mouseOver' (mouseDragged) When using a mouse, Scene activates a Shape if mouse is over it (mouseOver). Hence don't de-activate such Shape via mouse-button clicked or released.
* GraphUI: Shape: Add missing 'markShapeDirty()' on setBorderColor()Sven Gothel2023-09-301-0/+2
|
* Bug 1454 + Bug 1464: Maintain a Shape local 'zOffset' and only consider it ↵Sven Gothel2023-09-302-35/+43
| | | | | | | | | | for sorting w/o actually modifying the position (enogh to be painted on top and for selection) Also use a simplified comparison using only float relational operations w/o NaN/Inf bit-stuff or epsilon, as it should be accurate enough for this cause. This shall also resolve Bug 1454, as we no more modify the position directly but the local zOffset field .. but this has to be seen (data race).
* GraphUI: Group: Add attribute to allow not to relayout if child Shapes are ↵Sven Gothel2023-09-301-14/+24
| | | | dirty. Only issue validate on childs if theyre shape is dirty
* FFMPEGMediaPlayer: Insert GLSL comment-line documenting the addressed ↵Sven Gothel2023-09-301-1/+6
| | | | VideoPixelFormat conversion for easier debugging
* Bug 1465 - Graph / GraphUI: Render a Region's ColorTexture in proper ↵Sven Gothel2023-09-3019-183/+587
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aspect-ratio, letter-boxed or zoomed (config) + Bug 1466 Fix color mixing Bug 1465: Region currently simply bloats a given texture to its region AABBox, which renders textures with the wrong aspect ratio. Add facility to program the texture-coordinates to either letter-box or scaled-up (and cut) true aspect-ratio. Default shall be zoom (scale-up and cut), but user shall be able to set a flag in the Region for letter-box. Have the shader clip texture coordinates properly, best w/o branching to soothe performance. See functions.glsl +++ Bug 1466: Current color mix: texture * color_channel * color_static is useless in GraphUI. color_static shall modulate the texture, which works. But in case of color_channel (attribute/varying) we want it to be mixed so it can become the more dominant color for e.g. a border. Desired is: color = vec4( mix( tex.rgb * gcu_ColorStatic.rgb, gcv_Color.rgb, gcv_Color.a ), mix( tex.a * gcu_ColorStatic.a, 1, gcv_Color.a) );
* Bug 1430 - Fix Background erase not disabled with AWT GLCanvas and NewtCanvasAWTSven Gothel2023-09-294-14/+125
| | | | | | | | | | Commit c5431f46b7bf64f109315ec78461859dd88f202a reduced the disableBackgroundErase(..) to SunToolkit's variation which doesn't work on Windows as it does not act upon the java.awt.Canvas peer post addNotify(). This re-introduces the java.awt.Canvas method via class JAWTUtil.BackgroundEraseControl and its called only after addNotify() on Windows and ASAP for everyone else. Method also calles the SunTookit variation just to be sure.
* Bug 1431: Fix NewtCanvasAWT resize on X11, broken since commit ↵Sven Gothel2023-09-295-12/+259
| | | | | | | | | | | | | | | | | | | | | ad38d1559854985b1131e5b6c7274a392b5bc265 Commit ad38d1559854985b1131e5b6c7274a392b5bc265 introduced XTranslateCoordinates(..) to savely validate the client-space window position against the parent (root). Totally missing in this change was the NEWT child window case since it always used the root-window as the destination. This change tracks the parent-window (valid parent Window or NULL) within the JavaWindow struct and either uses the parent-window if available or the root-window for XTranslateCoordinates(..). This results in the proper client-space position. Validated against - TestGearsES2NewtCanvasAWT - TestBug1431NewtCanvasAWT on Debian 12 w/ Java17.
* GraphUI Demos: Minor refinements..Sven Gothel2023-09-262-5/+5
|
* GraphUI Demo UISceneDemo20: Give 'Show FPS' a toggle text 'Hide FPS' .. and ↵Sven Gothel2023-09-261-1/+2
| | | | have the text resize being of fixed aspect-ratio (like the movie)
* GraphUI Button: Support toggle'ed labels and fixed font size scaling for ↵Sven Gothel2023-09-265-88/+214
| | | | | | | | | | | | | | | | | | | | | | | | | symbols (see setFixedLabelSize()), This allows convenient instantiation of a Button changing its text (or symbol) when toggled, e.g.: UISceneDemo03: + final Button button = new Button(options.renderModes, fontSymbols, + fontSymbols.getUTF16String("play_arrow"), fontSymbols.getUTF16String("pause"), + buttonWidth, buttonHeight, buttonZOffset); + button.setSpacing(symSpacing, fixedSymSize); +++ setFixedLabelSize(..): Sets fixed label font size clipped to range [0 .. 1], defaults to {@code 0, 0}. Use {@code w=0, h=1} when using single symbols from fixed sized symbol fonts! Use {@link #setSpacing(Vec2f, Vec2f)} to also set spacing. The fixed label font size is used as the denominator when scaling.{@code max(fixedLabelSize, fontLabelSize)}, hence reasonable values are either {@code 1} to enable using the given font-size for the axis or {@code 0} to scale up/down the font to match the button box less spacing for the axis.
* GraphUI Button: Increase default spacing a little: x .12 -> .20, y .42 -> .46Sven Gothel2023-09-261-2/+2
|
* GraphUI Shape: Issue onToggleListener on setToggle(..) to complete user ↵Sven Gothel2023-09-261-0/+7
| | | | experience, add overridable toggleNotify(..) allowing implementations to react before listener.
* GraphUI Shape: Add remaining binary states to bitfield to preserver footprint ..Sven Gothel2023-09-261-26/+28
| | | | See commit e5eadcdaa615dbeb762885b50435a1f79d6ca895
* Bug 1463 - Graph Font: Whitespace or undefined Glyphs shall not cover (any) ↵Sven Gothel2023-09-261-4/+7
| | | | | | | | | | | | | | | | | | height exceeding overall CharSequence TypecastFont using `metrics.getAscentFU() - metrics.getDescentFU()` for ascent used for all undefined and whitespace Glyphs w/o a spatial outline, leads to a potential exceeding height compared to the actual used bounding box of the rendered text. This in turn leads to layout issues, e.g. button labels are placed too low. Solution: - Whitespace/Undefined: Drop full height 'metrics.getAscentFU() - metrics.getDescentFU()', b/c of non-existing shape height. - Otherwise, layout on AABBox or created empty shape would pick up such default hhea-table ascent which might exceed actual string height. Sideeffect would be if user relies on height of a whitespace. However, knowing this fact - a user may always pick the hhea-table's ascent metric values as exposed in Font and Font.Metric. This resolves remaining layout issues, including button labels.
* GraphUI: Mark some more methods final in Shape + GraphShapeSven Gothel2023-09-262-5/+5
|
* GraphUI Shape: Use a bitfield for the many binrary states instead of boolean ↵Sven Gothel2023-09-261-46/+47
| | | | to preserver footprint ..
* GraphUI GraphShape: Factor out static addRectangle(..) to be reused for ↵Sven Gothel2023-09-261-7/+8
| | | | debugging purposes
* GraphUI Layout: Simplify non-centered negative-offset (underline) removalSven Gothel2023-09-262-22/+4
|
* Bug 1462 / 1462: GraphUI Demo UISceneDemo20: Replace some text in buttons ↵Sven Gothel2023-09-241-6/+7
| | | | with symbols
* GraphUI Demos UIMediaGrid01: Demos multiple MediaButton in a grid - ↵Sven Gothel2023-09-241-0/+360
| | | | performance & stability
* Graph Font: API doc: Fix typos 'Return ' .. to 'Returns `.Sven Gothel2023-09-241-17/+20
|
* Graph Font Tests: Fix missing codepoint -> GlyphID conversionSven Gothel2023-09-244-5/+5
|
* Bug 1462 - Graph Font: Add name + codepoint to ID and Glyph mapping plus ↵Sven Gothel2023-09-2419-212/+352
| | | | | | | | | traversing through all Glyphs See UISceneDemo03 new Button(options.renderModes, fontSymbols, " "+fontSymbols.getUTF16String("pause")+" ", buttonWidth, buttonHeight); // pause Unicode codepoint symbol is also contained in FontGlyph
* Graph Fonts: Add 'Material Icons Round-Regular' (APL-2 license) and use it ↵Sven Gothel2023-09-245-5/+100
| | | | in UISceneDemo03 via hard coded unicode symbol numbers
* Graph Fonts UbuntuFontLoader: Factor out FontLoaderImpl and have get(..) ↵Sven Gothel2023-09-242-103/+139
| | | | synchronized for static fontMap field access
* Graph Fonts: Remove not required text files from Ubuntu fontsSven Gothel2023-09-243-409/+0
|
* GraphUI Demo FontView01: Add mode showing the Glyph's name below in gridSven Gothel2023-09-241-15/+33
| | | | Yeah, for good eyes only .. but enough to label the Greek alphabet :)
* GraphUI Label: Condense getUnscaledGlyphBounds()Sven Gothel2023-09-241-4/+1
|
* Bug 1460 - GraphUI Shape: Allow keeping aspect-ratio at resizeSven Gothel2023-09-242-9/+26
| | | | For certain shapes the aspect-ratio shall be kept, e.g. MediaButton etc.
* GraphUI Shape: Crossref input modifier funcs in API doc; Condense simple ↵Sven Gothel2023-09-241-26/+26
| | | | setter/getter
* GraphUI MediaButton: Return this for chaining on setterSven Gothel2023-09-241-2/+3
|
* GLMediaPlayer: Stop audio streaming to AudioSink on zero volume (Flush on ↵Sven Gothel2023-09-242-2/+10
| | | | mute and play on un-mute)
* UISceneDemo20 Use onToggle(..) for media-button (audio on/off) as well as ↵Sven Gothel2023-09-241-29/+17
| | | | use direct lambdas for all its other listener
* Bug 1459 - GraphUI Shape: Add active (pointer over/left) state and callback ↵Sven Gothel2023-09-242-6/+52
| | | | | | | | | Listener We already track this state within Scene, i.e. a shape is marked active when pointer is over it and released from active-duty when pointer left. Scene shall notify the Shape so it can track this state locally and also forward this event to the user via the typical Shape.Listener callback.
* Bug 1454 - GraphUI Scene: Make active ZOffset scale configurableSven Gothel2023-09-241-2/+7
|
* GraphUI Button: Remove redundant ctors and methods. ZOffset shall be simply ↵Sven Gothel2023-09-241-68/+0
| | | | given, calculated by caller
* UISceneDemo20: Set proper z-epsilon for all Buttons on reshape to use the ↵Sven Gothel2023-09-241-0/+4
| | | | perfect minimum label-z-offset
* Bug 1455 - GLMediaPlayer: Add isAutioMuted() query on volume and earmark ↵Sven Gothel2023-09-232-5/+25
| | | | | | | | audio-volume if not initialized and set it when AudioSink becomes available Setting the audio volume before initialization shall impact GLMediaPlayer when it becomes initialized. Further add a query if audio is muted, merely based on volume.
* Bug 1454 - GraphUI Scene: Elevate active (selected) shape (add z-offset) and ↵Sven Gothel2023-09-232-1/+28
| | | | | | | | | | | | | | | | | select (pick) in Z descending order Picking (select) a shape shall process all shapes in Z descending order, i.e. top shape first. This is a bug currently. Note: Picking (selecting) a shape using a (mouse-)pointer device is active by mouse-moved and not only mouse-clicked. Therefor, we select shapes by mouse-over. The active selected shape shall have an elevated Z offset to be rendered on top of the others on same plane. - This avoids them being rendered below others while moving them around etc. - This also avoids flickering of overlapping shapes with mouse over. - This stabilizes the UI experience