The Jenkins Controller is preparing for shutdown. No new builds can be started.
Unstable
Changes
Summary
UISceneDemo03b: Add a little more customization .. (details)
Demos: Use Runnable lambda for window.destroy() off-thread and use key-symbols F4, ESC and Q to trigger off-thread window.destroy() (details)
TestSWTAccessor02NewtGLWindow: Use lambda for SWTAccessor.invokeOnOSTKThread(..) (details)
Vec[234]f: Add scale(Vec[234]f s) variant for convenience (details)
GraphUI: Group API doc + remove GlyphShape's redundant many getOrigPos() variants (details)
GraphUI: Shape: Add runSynced(Runnable); Add setPMVMatrix(..) to setup complete PMVMatrix, use it in getSurfaceSize(..), shapeToWinCoord(..) and winToShapeCoord(..) (details)
GraphUI Demo: UISceneDemo03: Add optional audio (only) via '-audio <URL or file-path>' using our GLMediaPlayer (FFmpeg + JOAL/OpenAL) (details)
UISceneDemo03: Detail demo description, add blog entry (details)
Graph Loop: Make initFromPolyline() and locateClosestVertex() more robust, report error but do not crash. (details)
Graph Font + Glyph: More robust detetection and API definition of non-contour/whitespace Glyphs (detect and allow to skip 'em) (details)
GraphUI Shape: Show dirty-state in getSubString() (details)
Graph Font: Make TypecastRenderer.DEBUG package private to be used by TypecastFont (details)
GraphUI Demo FontView01: Enhance usability and refactor: Add left-column glyphSymbol number, mouse-wheel scrolling, Fitting the font info, .. (details)
GraphUI Demo FontView01: Fix '-showUnderline', i.e. glyphListener shall use the last element in container, the GlyphShape (details)
GraphUI Demo: Rename UISceneDemoU01a -> UIGraphDemoU01a, not using GraphUI's Scene but manual GLEventListener etc, add a few Glyph tests (details)
Graph Font + Glyph: Fix whitespace definition: Include 'no original underlying shape' and add API doc (details)
PMVMatrix.gluPerspective(): Redfine angle in radians instead of degrees ** API Change ** (details)
Demos: CommandlineOptions: Add total_duration command line option '-duration <floar>' in seconds (details)
GraphUI Demos: Proper use of CommandlineOptions (details)
GraphUI Scene: Pass sampleCount in ctor variant and refine API doc, clip to [1..8]; Add clarity in Region; Demos CommandlineOptions adds actual graphAASamples set and utilized (details)
GraphUI Scene: Generalize its interface PMVMatrixSetup and usage of its DefaultPMVMatrixSetup w/o orthogonal alike scale-back but fully parametric (details)
FloatUtil.isEqual(..): Rename raw {isEqual->isEqualRaw}(a,b) varianr w/o EPSILON; Add isEqual(a,b) w/ default EPSILON; Use it where applicable (details)
GraphUI Shape: Enhance API doc for colors (details)
GraphUI Shape.ZAscendingComparator: Use (faster) FloatUtil.isEqual2(a,b) and consider Z-scaling (details)
GraphUI Scene: Expose Z-Epsilon API for default and current PMVMatrixSetup values; Button add Z-Epsilon API for ctor and setLabelZOffset(..) (details)
GraphUI Button: Add label bounds to own shape (adds used z-range) (details)
GraphUI Enhance: API doc; Scene/Button Z-offset and -epsilon; Push temp AffineTransform to local method; Simplify BaseButton setCorner(0) -> setPerp(); Protected abstract ctor .. (details)
GraphUI GraphShape: Split renderModes -> final renderModesReq + mutable renderModes, allowing the latter to be adjusted e.g. in case a color-channel is required (details)
GraphUI: Button/Label: Complete String -> CharSequence type change for text, rename Button set{Label->Text}(..), adjust demo/text code (details)
GraphUI Margin, Alignment: Reuse ctor for default-ctor (details)
FloatUtil.abs(a): Mark as deprecated, use Math.abs(a) directly. We assume it is an intrinsic + branch-less implementation (details)
GraphUI: Use z-top of bounding box for border rectangle, not z-center (details)
GraphUI Scene: Only set dbgBorderThickness on shape if not zero and shape has no border yet, i.e. don't override (details)
GraphUI Scene: Add invoke(boolean wait, GLRunnable) for convenience using GLAutoDrawable.invoke(..) (details)
GraphUI Shape: Add setScale(..) and scale(..) with Vec3f for convenience; Add border-color in toString() if hasBorder() (details)
GraphUI Layout Alignment: Separate center alignment to horizontal and vertical (details)
GraphUI Layout: Html'ify API header of Gap and Padding (details)
GraphUI Layout: Fix BoxLayout scale, margin and padding; Add same padding behavior to BoxLayout and GridLayout. (details)
make/build.xml: Add target 'all.but-onejar', allowing a quick build w/o the all-jar files as usable with atomic jars like: make/scripts/tests.sh `USE_BUILDDIR=1` (details)
make/build.xml: Fix target 'all.but-onejar', adding targets 'one.lib.dir' and 'test.compile' to have native libs in place and update tests/demos (details)
GraphUI Group: Override isShapeDirty(), performing a deep dirty state update on all group member to allow validate to function (details)
GraphUI Group.validateImpl(): Pick RenderMode for border from 1st Shape if required (hasBorder() and null border yet) (details)
GraphUI BoxLayout: Margin is only ignored for center Alignment w/o Fill scale. {Box,Grid}Layout: Always remove Bottom-Left delta and refine API doc of incl scale behavior (details)
Debug.debugExplicit(): Define and use explicit symbol debug flag; Use it for certain debug output to keep most silence for debugAll() (details)
GraphUI Demo FontView: Prescan available countour glyphs for fluent scrolling .. (details)
GraphUI Layout (Box/Grid): Adjust bottom-left offset according to center-axis (details)
GraphUI Demo Fontview: Fix '-showUnderline' mode; Fix and simplify addGlyphs(..) loop; Add Margin on glyphShapeBox (details)
Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit agnostic (PMVMatrix, Matrix4f, Vec4f, ..) (details)
GraphUI Container: Add getShapeCount() and add API doc .. (details)
GraphUI GlyphShape.addShapeToRegion(): In case the Font.Glyph has no shape, at least add an empty region to avoid an NPE (details)
GraphUI Test: FontViewListener01: Align to FontView01 .. fix invsible GlyphShape by adding a BoxLayout w/ Center and parent Group w/ GridLayout FillCenter (details)
GraphUI Demo FontView01: Re-add Margin for glyphInfoBox (text) and use Group's getShapeCount() .. (details)
GLMediaPlayerImpl: Replace StreamWorker thread management with GlueGen's new WorkerThread, helping to simplify code (details)
Demos MovieSimple, MovieCube: Use Uri.tryUriOrFile(..) and have user just use '-url YOUR_LOC' for file and URL. MovieSimple: Just use multiple '-url LOC' on commandline to determine window-count and so forth .. (details)
OculusVR: Adapt to latest GlueGen changes (details)
Bug 1452: PMVMatrix4f: Drop redundant unused mulWith*(Vec*...) 'v_out = M * v_in', user can simply get the desired matrix and apply its mulVec*(..) operation (details)
GLMediaPlayerImpl: Recover lost StreamException information from commit 77eab439147af69089fa3ebf07d64ee3b4d67bfd (details)
GraphUI Layout: Add UILayoutBoxGridOffset01, showing behavior w/ shapes not starting at 0/0 but at an offset (details)
Bug 1454 - GraphUI Scene: Elevate active (selected) shape (add z-offset) and select (pick) in Z descending order (details)
Bug 1455 - GLMediaPlayer: Add isAutioMuted() query on volume and earmark audio-volume if not initialized and set it when AudioSink becomes available (details)
UISceneDemo20: Set proper z-epsilon for all Buttons on reshape to use the perfect minimum label-z-offset (details)
GraphUI Button: Remove redundant ctors and methods. ZOffset shall be simply given, calculated by caller (details)
Bug 1454 - GraphUI Scene: Make active ZOffset scale configurable (details)
Bug 1459 - GraphUI Shape: Add active (pointer over/left) state and callback Listener (details)
UISceneDemo20 Use onToggle(..) for media-button (audio on/off) as well as use direct lambdas for all its other listener (details)
GLMediaPlayer: Stop audio streaming to AudioSink on zero volume (Flush on mute and play on un-mute) (details)
GraphUI MediaButton: Return this for chaining on setter (details)
GraphUI Shape: Crossref input modifier funcs in API doc; Condense simple setter/getter (details)
GraphUI GraphShape: Factor out static addRectangle(..) to be reused for debugging purposes (details)
GraphUI Shape: Use a bitfield for the many binrary states instead of boolean to preserver footprint .. (details)
GraphUI: Mark some more methods final in Shape + GraphShape (details)
Bug 1463 - Graph Font: Whitespace or undefined Glyphs shall not cover (any) height exceeding overall CharSequence (details)
GraphUI Shape: Add remaining binary states to bitfield to preserver footprint .. (details)
GraphUI Shape: Issue onToggleListener on setToggle(..) to complete user experience, add overridable toggleNotify(..) allowing implementations to react before listener. (details)
GraphUI Button: Increase default spacing a little: x .12 -> .20, y .42 -> .46 (details)
GraphUI Button: Support toggle'ed labels and fixed font size scaling for symbols (see setFixedLabelSize()), (details)
GraphUI Demo UISceneDemo20: Give 'Show FPS' a toggle text 'Hide FPS' .. and have the text resize being of fixed aspect-ratio (like the movie) (details)
Bug 1431: Fix NewtCanvasAWT resize on X11, broken since commit ad38d1559854985b1131e5b6c7274a392b5bc265 (details)
Bug 1430 - Fix Background erase not disabled with AWT GLCanvas and NewtCanvasAWT (details)
Bug 1465 - Graph / GraphUI: Render a Region's ColorTexture in proper aspect-ratio, letter-boxed or zoomed (config) + Bug 1466 Fix color mixing (details)
FFMPEGMediaPlayer: Insert GLSL comment-line documenting the addressed VideoPixelFormat conversion for easier debugging (details)
GraphUI: Group: Add attribute to allow not to relayout if child Shapes are dirty. Only issue validate on childs if theyre shape is dirty (details)
Bug 1454 + Bug 1464: Maintain a Shape local 'zOffset' and only consider it for sorting w/o actually modifying the position (enogh to be painted on top and for selection) (details)
GraphUI: Shape: Add missing 'markShapeDirty()' on setBorderColor() (details)
Bug 1467 - GraphUI: Don't de-activate a Shape if became active via 'mouseOver' (mouseDragged) (details)
TextureSequence.setTexCoordBBox(): Add 'verbose' parameter for debug output instead hard coded branch (details)
FFMPEGMediaPlayer: Always use own textureLookupShader and validate its custom name against GLSL internal 'texture2D', add missing VideoPixelFormat conversions (details)
Bug 1473 - ALAudioSink: AV Synchronization: Adopt to JOAL ALAudioSink changes (details)
Bug 1472: Enhance GLMediaPlayer AV Sync: Utilize SCR aware audio PTS used as master-clock, enabling proper AV sync w/ untouched audio (details)
Bug 1472: Enhance GLMediaPlayer AV Sync: Fix FFMPEGMediaPlayer's audio resample: Use swr_get_out_samples(..) to calculate the required output sample count (details)
Bug 1472: Enhance GLMediaPlayer AV Sync: Fine tune AV heuristics to (multiple of) audio_dequeued_ms (details)
GLJPanel: Allow disabling GLSL vertical flip programmatically via setUseGLSLVerticalFlip(false) in addition to property 'jogl.gljpanel.noglsl' (details)
Bug 1472: GLMediaPlayer: Expose SCR PTS and encourage its usage, removes user from selecting video or audio PTS. (details)
Bug 1472: GLMediaPlayer: Handle setPlaySpeed() like setAudioVolume() if stream is not yet initialized or playing, cached clipped value and set at initGL(..) (details)
GLMediaPlayerImpl: Don't reset SCR on video_scr_reset or irq'ed rendering w/o video-frame (fixes 'massive' seek'ing) (details)
GLMediaPlayerImpl: Use a PTS av_scr_cpy from av_scr for getPTS() avoiding direct user-exposure and potential data-race (details)
GLMediaPlayer: Recognize !use_audio when repeating (caching) a video-frame, i.e. ignore audio_queued_ms in such case (Fixes video sync on SCR w/o audio) (details)
GLMediaPlayer: Don't resetAVPTS() on resume(), allowing less AV sync disruption after pause(flush:=false) (details)
GLMediaPlayer.getPerfString(): Don't show audio pts values is no_audio, misleading and wrong info (e.g. on mute) (details)
Bug 1479 - NativeLibrary: Add getNativeLibraryPath() returning actual native library path, support throughout DynamicLibraryBundle[Info] (details)
FFMpeg: Fix and clarify 'resend package' and 'continue draining frames' states (details)
FFMpeg: Just be nice and flush GL stream, no finish sync required (details)
GraphUI Shape: Add receiveKeyEvents() and receiveMouseEvents() allowing a Shape to receive forwarded events from another Shape; Added receive*Events() specialisation for RangeSlider (details)
GraphUI Demos CommandlineOptions: Add ctor w/ graphAAQuality and graphAASamples (details)
GraphUI: Added RangedGroup Widget, displaying a clipped content Group with optional horizontal and/or vertical RangeSlider; FontView01 now uses RangedGroup scrolling GlyphGrid smooth per-pixel (details)
GraphUI Group Clipping setClip{OnBox->OnBounds}(): Add Vec3f cullingScale factor for the clip-box to discard rendering completely..; Add Group.setClipBBox(..) (details)
GraphUI Enhance Clipping: Drop pixel clipping if `clip-box >= clip-box*cullingScale` (Group). RangedGroup: Pass through `clipCullingScale` to cull fully outside shapes; Apply in FontView01 Demo.. (details)
Graph/GraphUI AA-Quality + SampleCount (shader): Push params down to RegionRenderer's RenderState usually rarely set from top of user API, reducing complexity. (details)
GraphUI GLButton: Filter out Region.AA_RENDERING_MASK in ctor, as GLEventListener renders into FBO at correct resolution. (details)
GraphUI Enhance Clipping: Drop 'cullingScale' param, a simple intersection-test against 'clipBox' to discard whole shapes if completely outside is enough. (details)
GraphUI Clipping Demo: Adding a simple Shape within a clipping Group all driven by a Scene (details)
GraphUI Tooltip*: Generalize Tooltip base (more versatile) and add TooltipShape supporting general Shapes to be added (details)
AABBox: Rename private fields {bl, tr} -> {lo, hi} denoting proper orientation in API doc (details)
Add Cube to Frustum Plane mapping, supporting transformation of object-space AABBox into model-view Cube to Frustum.Plane for culling (cpu) and clipping (gpu) (details)
Frustum: Revise code and its Plane definition to support Cube->Frustum as well as to extract planes for float[] vec4-shader uniforms. (details)
Graph Clipping: Use Frustum Clipping using AABBox -> Mv transformed Cube -> Frustum mapping + GraphUI Support (details)
GraphUI Graph/Scene: Reuse TreeTool for contains(), getShapeByID() and getShapeByName(), also adding full traversion (instead of a flat lookup) (details)
GraphUI Group/BoxLayout/GridLayout: Handle empty Group, i.e. detect zero-size and avoid scale=Infinity and zero-sized resulting AABBox (details)
GraphUI Group: Add ctor with most usable values, allowing injecting a Group as a one-liner in code (details)
GraphUI Tooltip*: Allow user to trigger display via now(); Ensure TooltipShape.DestroyCallback gets passed the user provided Shape only (details)
GraphUI RangeSlider: Keep Region.AA_RENDERING_MASK in renderModes (details)
GraphUI Demo Fontview: Demonstrate Clipping w/ rotation; Reuse GlyphShape for grid, info-box and tooltip (details)
UIShapeClippingDemo00: Fix behavior, use shape as child and completely chain rendering in display() (details)
Bug 1489 - GraphUI Group: Resolve Performance Regression in Scene.pickShape(): Drop invisible and clipped shapes (details)
Bug 1490: Add missing rename Shape.transformMvTo() -> applyMatToMv(), an transformMvTo() was an intermediate rename (oops) (details)
Bug 1488 - Graph RegionRenderer: Ensure shaderPrograms1 path is disabled using 'static final boolean useShaderPrograms0 = true' (details)
Simplify TooltipShape: Create own wrapper Group to not mutate user given Shape (if reused in DAG); Fix FontView01 TooltipShape instance, use NoOp DestroyCallback (details)
TooltipShape.destroyTip(): Only show warning instead of throwing a RuntimeException if tip couldn't be found within wrapper Group (details)
Scene.dispatchMouseEventPickShape(): Reuse PMVMatrix4f, Ray and Vec3f within EDT, reducing temp objects on mouse moves (details)
Bug 1488 - Graph RegionRenderer: Use a more deterministic 64-bit shaderKey: [0-31] bit values and state, [32-63] colorTexSeqHash (details)
Bug 1488: FFMPEGMediaPlayer: Fix getTextureFragmentShaderHashID(), i.e. use actual tc_w_1 = (float)getWidth() / (float)texWidth value as hardcoded within the shader. (details)
VBORegionSPES2: Disable verbose flag in TextureSequence.setTexCoordBBox() .. oops (details)
GraphUI Tooltip: Use delayMS for no time-based alarm (only used for now()); FontView01: Use TooltipShape for GlyphShape only with mouse click -> Tooltip.now() (details)
GraphUI RangeSlider/RangedGroup: Fix overall integration, adding more API comments; UIMediaGrid01 now uses RangedGroup (details)
Graph: Drop non-existing 'JAVA' font from FontFactory (details)
Bug 1488: Complete/Fix producing the 64-bit shaderKey: Use long values in bit-shift expressions and simplify it (details)
NativeWindowFactory.createDevice(..) w/ unitID for cloning; DefaultGraphicsDevice: Move ownership (Object) code into base class ensuring same code (details)
GraphUI Demo UIMediaGrid00: Add missing patch from relocating getSymbolsFont() (details)
FFMPEGMediaPlayer (native): Set used sid to none if not selected (missed) (details)
FFMPEGMediaPlayer (native): Simplify subtitle handling in readNextPacket0() (details)
GraphUI MediaButton: Clear cached subtitle data on uninit and init from GLMediaPlayer (details)
Cleanup GLMediaPlayer.EventMask.Bit handling in GLMediaEventListener implementations: Either Uninit, Init, Pause or Play (exclusive) (details)
FFMPEGMediaPlayer/GraphUI MediaButton: AVSubtitles's start/end are relative to pts [ms] (fixed); Use ASSEventLine packets within proper pts only. (details)
FFMPEGPlayer: Prep for bitmap'ed subtitles: Use glEnable()/glBindTexture() func-ptr in native; readNextPacket0() passes video+subtitle texTarget and texID (details)
GraphUI MediaButton: Add blending below subtitle, allow setting color/blending and subLineDY; MediaPlayer: Add full infoLine toggle with click on infoBox (details)
Bug 1494: Add SubTextureEvent & SubEmptyEvent; Add SubtitleEvent.release() provided by owner to take back borrowed resources (texture of bitmap subtitle) (details)
Utilize PTS.getCurrent() where applicable (details)
Bug 1495: GraphUI Shape: Only updateMat() if marked dirty once in applyMatToMv() and getMat(*) (details)
Bug 1496 - GraphUI Shape: Allow markShapeDirty() and markStateDirty() to be lock free (details)
GraphUI: Only issue Shape.mark*Dirty() if values were updated or data available; JOGL ImageSequence: Add addFrame(GL, TextureFrame), remove*Frame() and isSequenceAnimating() (details)
Add Vec2f.set(Vec2i) and Vec2f(Vec2i); Add Texture.set(..) allowing a pending setup/update of texture and image dimensions (details)
GraphUI Demos: FontView01 can use scaling Lable ctor; UISceneDemo01b doesn't need to issue Shape.updateMat() (details)
Graph shader (pass1 simple): USE_COLOR_TEXTURE: Clip to vec4(0) color using alpha 0 instead of the debug color white vec4(1), which leads to the white seam if out of gcu_ColorTexBBox (details)
Bug 1495: GraphUI Shape: Fix updateMat() API doc (details)
Bug 1494: Clarify SubtitleEvent class, adding general FFmpeg analog CodecID and hence also promoting VideoPixelFormat (details)
Bug 805: Graph/GraphUI TextureSequence Scale: Move Region.COLORTEXTURE_LETTERBOX_RENDERING_BIT to TextureSequence and add enabling/disabling of aratio adjustment + letter-box back-color (details)
Bug 1494 - GLMediaPlayer/GraphUI: Support Displaying Bitmap'ed Subtitles (PGS ..) via FFMPEGFMediaPlayer/FFmpeg (details)
GLMediaPlayerImpl: Allow one frame to be shown paused when issuing seek(), i.e. 'oneVideoFrameOnce'. (details)
GLMediaPlayerImpl.StreamWorker: Don't grow videoFramesFree since having removed buffer grow in commit 68ca5b14966cb7eec9501c17dc8b3b465421a68e (details)
GLMediaPlayer: Adjust API doc and certain names differentiating video (from subtititle) etc. (details)
GLMediaPlayerImpl: Disable subDEBUG flag (details)
Remove Clonable and clone() in favor of explicit determined copy() and copy-ctor in com.jogamp.graph.* and com.jogamp.math.* (details)
OutlineShape: Earmark coloring task when triangulating .. (details)
Bug 1493 - Text/ASS Subtitle via MediaButton/MediaPlayer Alignment defaults to CenterHoriz, also support Left. (details)
Bug 1493: Supply language code to SubtitleEvent, perhaps allowsing player to select font for ASS/Text rendering; Remove GLMediaPlayer's getStreamLang() as replaced by getLang() (details)
Graph/GraphUI: Move getDefault*() to FontFactory and add {get,set}FallbackFont() + Font.getBestCoverage(..); Use fallback-font in MediaButton in case chosen font doesn't match (foreign languages, e.g. 'zho' Chinese .. ) (details)
Added documentation to the 'loca' table. (details)
Added support for reading the SVG table. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java (details)
Added rudimentary documentation to the CFF table. (details)
Use new com.jogamp.common.util.StringUtil (GlueGen) (details)
Tooltip[Text]: Use a slightly round button, change to grayscale colors matching our buildin-theme and have the tips placed just above center of the toop (not above it) (details)
GraphUI RangedGroup: Keep position @ validate() (details)
GraphUI MediaPlayer: Elevate the ctrlSlider a little (and add it behind ctrlBlend) to remove the occlusion by the blending box (details)
Bug 1498: Refine Top-Level Widget Mode: Handle active-state by Scene, simplify and reduce runtime costs (details)
GraphUI: Add Shape.IO_DISCARDED and update it @ Scene/Group draw(); Prepare for experimental occlusion-culling (details)
Bug 1492: GLMediaPlayer: Add playStream(..) variant passing desired audio- and subtitle language (details)
GraphUI RangeSlider: Fix 'activeOldMod' -> static to member (details)
GLMediaPlayerImpl: Fix playing one frame after seek() @ getNextTexture(), requires pause state (normal at play-state) (details)
GLMediaPlayerImpl: Adjust aid/sid to AUTO if alang/slang is given (details)
GraphUI Shape: Add MouseEvent to MoveListener; RangeSlider: Add rel obj position + NEWT MouseEvent to listener, renamed {Slider->Change}Listener and add PeekListener for mouse-over events (details)
GraphUI Tooltip*: Remove unused paramter in createTip() and clarify names (details)
GraphUI: Add HUDShape, a convenient HUD shape to be exposed in the scene using inner object size/pos, similar like TooltipShape (details)
GraphUI MediaPlayer: Add HUDShape on time-slider @ mouse-over with time-string and still-images (optional) .. using HUDShape (details)
GraphUI Demos FontView01 + UIMediaGrid01: Use FSAA 8 (GPU MSAA 8) as these demos utilize lots of smaller resources regions ... (details)
Bug 1501: Graph RenderState add debug-bits, i.e. DEBUG_LINESTRIP used in VBORegionSPES2 to just render lines instead of the filled area -> Used in UIShapeDemo02a (details)
Bug 1501: Graph Shape: onInit(ListenerBool) -> onDraw(DrawListener) w/ added capability for code injection to render (details)
Bug 1501: VectorUtil: Deprecate prev line2line intersection tests, adding new impl; Add isConvex*() to determine whether a polyline is convex (details)
Bug 1501: Apply intersection tests for non-convex shapes to reject new CCW and non-circulcircle triangulation candidates in our Delaunay tessellator (details)
GraphUI Demo FontView01: Re-Enable snapshot via 's' (details)
GraphUI: Shape: Add runSynced(Runnable); Add setPMVMatrix(..) to setup complete PMVMatrix, use it in getSurfaceSize(..), shapeToWinCoord(..) and winToShapeCoord(..)
AABBox: Fix intersects2DRegion(..), add resize{Height, Width}(..) and AABBox ctor using Vec3f low and high
intersects2DRegion(..) got the passed width and height wrong, i.e. given object low position >= this-low position and given object high position including width/height <= this-high position is required to match for intersection.
GraphUI: Extract generalized AnimGroup functionality from UISceneDemo03*, providing sets of animated Shapes (GlyphShape or any other)
Hardcoding the whole animation process into user code is not feasible to allow a quick add-on.
GraphUI's new AnimGroup is a Group and allows to add multiple AnimGroup.Set of AnimGroup.ShapeData.
+++
AnimGroup.ShapeData holds the actual Shape and its start- and target position as well as its active animation state and an optional user object attachment.
AnimGroup.Set holds a list of AnimGroup.ShapeData as well as the animation properties and states like acceleration and velocity for translation and angular operations. It also contains the AnimGroup.LerpFunc for linear interpolation of the next position as called via AnimGroup.tick() over all sets.
AnimGroup.LerpFunc is intended to perform the linear interpolation for the next position, either user provided or one of the provided may be used, i.e. TargetLerp, ScrollLerp and SineLerp.
To setup the start- and target position for each AnimGroup.ShapeData, a AnimGroup.ShapeSetup is used - user implementated or one of the build-in of AnimGroup.addGlyphSetHorizScroll01(..), AnimGroup.assGlyphSetRandom01(..).
+++
UISceneDemo03 consolidated UISceneDemo03 + UISceneDemo03b (deleted) and shows the following AnimGroup capabilities:
- Two repetitive scrolling text lines. One text shorter than the line-width and one longer.
- One line of animated rectangles, rotating around their z-axis
- A text animation assembling one line of text, each glyph coming from from a random 3D point moving to its destination all at once including rotation.
GraphUI: Button: Reduce default DEFAULT_LABEL_ZOFFSET from 0.005f -> 0.0001f, have to check if working on all platforms (TODO)
Otherwise, we have to resolve the 'one Region' for the Button (backgroung shape + text on top) implementation with two OutlineShapes. As of now, we use the z-offset of the text above background to avoid z-fighting. This is like a manual application of glPolygonOffset(..) directly on the produced vertices.
GraphUI Demo FontView01: Enhance usability and refactor: Add left-column glyphSymbol number, mouse-wheel scrolling, Fitting the font info, ..
- Add mouse-wheel scrolling, for one-line and with control for one page. - Add left-column glyphSymbol number, for orientation while scrolling - Fitting the font info, i.e. consider width + height
Refactoring further isolated the addGlyphs(..) functionality in same method, etc.
Used to test Graph's capabilitry to properly read, detect and visualize certain fonts. Previous Graph fixes were triggered by this procedure, i.e. commits - 733cc5272cfed10fa07b707e29fd756f44581508 - 920e529516bb264f04138ed1caca80d4925e3773 - 7fd51917b0cc85c3dc3d07592093a62b213d1ea5
Further the proper detection of non-contour/whitespace allows FontView to skip them and only show usably Glyphs without noise.
Graph Font + Glyph: Fix whitespace definition: Include 'no original underlying shape' and add API doc
Regression was introduced with commit 920e529516bb264f04138ed1caca80d4925e3773 'Robust detetection and API definition of non-contour/whitespace Glyphs'.
Issue was mistaken a glyph as undefined if not having an underlying shape, which is true for some fonts (e.g. 'space').
+++
Also Use post table's name if no underlying shape exists.
GraphUI Scene: Pass sampleCount in ctor variant and refine API doc, clip to [1..8]; Add clarity in Region; Demos CommandlineOptions adds actual graphAASamples set and utilized
GraphUI GraphShape: Split renderModes -> final renderModesReq + mutable renderModes, allowing the latter to be adjusted e.g. in case a color-channel is required
GraphUI Layout: Fix BoxLayout scale, margin and padding; Add same padding behavior to BoxLayout and GridLayout.
For all: - Padding is applied to each {@Shape} via {@link Shape#setPaddding(Padding)} if passed in constructor
BoxLayout: - Optionally centered {@link Alignment.Bit#CenterHoriz horizontally}, {@link Alignment.Bit#CenterVert vertically} or {@link Alignment#Center both}. - Optionally scaled to cell-size if given and {@link Alignment#Fill} - Margin is ignored on dimension with center {@link Alignment} - Not implemented {@link Alignment}: Top, Right, Bottom, Left
GridLayout: - Optionally centered {@link Alignment.Bit#CenterHoriz horizontally}, {@link Alignment.Bit#CenterVert vertically} or {@link Alignment#Center both}. - Optionally scaled to cell-size if given and {@link Alignment#Fill} - Without cell-size behaves like a grid bag using individual shape sizes including padding - Can be filled in {@link Order#COLUMN} or {@link Order#ROW} major-order. - Not implemented {@link Alignment}: Top, Right, Bottom, Left
Changes to Group.Layout interface: - Added preValidate(Shape) allowing to prepare the shape before validation, used to inject Padding
Changes to Margin: - Removed the complex CENTER property and using Alignment in BoxLayout as well
Changes to BoxLayout: - Using Alignment
+++
Tested via UILayoutBox01 and UILayoutGrid01, try the tooltip by clicking on the group's description label.
make/build.xml: Add target 'all.but-onejar', allowing a quick build w/o the all-jar files as usable with atomic jars like: make/scripts/tests.sh `USE_BUILDDIR=1`
GraphUI BoxLayout: Margin is only ignored for center Alignment w/o Fill scale. {Box,Grid}Layout: Always remove Bottom-Left delta and refine API doc of incl scale behavior
GraphUI BoxLayout: Margin is only ignored for center Alignment w/o Fill scale. Margin outside of a shape is not scaled and hence must be considered when using Fill scale.
{Box,Grid}Layout: Always remove Bottom-Left delta Previously we were only dropping the negative extend.
However, since our scale and center algo uses the AABBox width and height, which excludes the bottom-left delta, we have to drop such offset.
TODO: Otherwise, we would need adjust for the bottom-left extend when NOT centering for each direction! This might be a useful enhancement in case one likes to drop shapes as-is w/o centering.
{Box,Grid}Layout: Refine API doc of incl scale behavior
Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit agnostic (PMVMatrix, Matrix4f, Vec4f, ..)
Math functionality (PMVMatrix, Matrix4f, Vec4f, ..) - shall be used toolkit agnostic, e.g. independent from OpenGL - shall be reused within our upcoming Vulkan implementation - may also move outside of JOGL, i.e. GlueGen or within its own package to be reused for other purposed.
The 'com.jogamp.opengl.util.PMVMatrix' currently also used to feed in GLUniformData via the toolkit agnostic SyncAction and SyncBuffer shall also be split to a toolkit agnostic variant.
An OpenGL PMVMatrix specialization implementing GLMatrixFunc can still exist, being derived from the toolkit agnostic base implementation.
+++
Initial commit .. compile clean, passing most unit tests.
GraphUI Test: FontViewListener01: Align to FontView01 .. fix invsible GlyphShape by adding a BoxLayout w/ Center and parent Group w/ GridLayout FillCenter
Demos MovieSimple, MovieCube: Use Uri.tryUriOrFile(..) and have user just use '-url YOUR_LOC' for file and URL. MovieSimple: Just use multiple '-url LOC' on commandline to determine window-count and so forth ..
Bug 1452: PMVMatrix4f: Drop redundant unused mulWith*(Vec*...) 'v_out = M * v_in', user can simply get the desired matrix and apply its mulVec*(..) operation
Original name was simply setTransform(..), so now let's keep using the suffix denominating the matrix while keep the main subject/verb upfront. Was an off reading ..
GraphUI Layout: Add UILayoutBoxGridOffset01, showing behavior w/ shapes not starting at 0/0 but at an offset
OK for centered or non-zoomed .. as used w/ FontView01 to show the underline space. Sure, Fill (zoom) w/o center on offset shapes is tricky and a matter of definition and taste, but in general useless.
Bug 1454 - GraphUI Scene: Elevate active (selected) shape (add z-offset) and 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
Bug 1463 - Graph Font: Whitespace or undefined Glyphs shall not cover (any) 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 Shape: Issue onToggleListener on setToggle(..) to complete user experience, add overridable toggleNotify(..) allowing implementations to react before listener.
GraphUI Button: Support toggle'ed labels and fixed font size scaling for 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.
Bug 1431: Fix NewtCanvasAWT resize on X11, broken since commit 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
Bug 1430 - Fix Background erase not disabled with AWT GLCanvas and NewtCanvasAWT
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 1465 - Graph / GraphUI: Render a Region's ColorTexture in proper 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.
Bug 1454 + Bug 1464: Maintain a Shape local 'zOffset' and only consider it 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).
Bug 1468 - SIGSEGV on use after free when destroying NEWT Window/Display via 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.
FFMPEGMediaPlayer: Always use own textureLookupShader and validate its custom name against GLSL internal 'texture2D', add missing VideoPixelFormat conversions
Always use own textureLookupShader, avoiding confusion or even race conditions.
Validate textureLookupShader custom name against GLSL internal 'texture2D' (illegal override)
Bug 1472: Enhance GLMediaPlayer AV Sync: Utilize SCR aware audio PTS used as master-clock, enabling proper AV sync w/ untouched audio
We can finally utilize the added pass through audio PTS, see commits - GlueGen 52725b4c6525487f93407f529dc0a758b387a4fc - JOAL 12029f1ec1d8afa576e1ac61655f318cc37c1d16
This enables us to use the audio PTS as the master-clock and adjust video to the untouched audio.
In case no audio is selected/playing or audio is muted, we sync merely on the system-clock (SCR) w/o audio.
AV granularity is 22ms, however, since the ALAudioSink PTS may be a little late, it renders even a slightly better sync in case of too early audio (d_apts < 0).
Since video frames are sync'ed to audio, the resync procedure may result in a hysteresis swinging into sync. This might be notable at start and when resumed audio or after seek.
We leave the audio frames untouched to reduce processing burden and allow non-disrupted listening.
Passed AV sync tests - Five-minute-sync-test.mp4 - Audio-Video-Sync-Test-Calibration-23.98fps-24fps.mp4 - Audio-Video-Sync-Test-2.mkv
Bug 1472: Enhance GLMediaPlayer AV Sync: Fix FFMPEGMediaPlayer's audio resample: Use swr_get_out_samples(..) to calculate the required output sample count
Notable when playing audio with e.g. 24k sample rate on a 48k OpenAL ALAudioSink, the sample duration was cut in half due to erroneous resampling missing half the required samples.
Using swr_get_out_samples(..) resolves this issue pre swr_convert(..), the resampling.
Bug 1472: Enhance GLMediaPlayer AV Sync: Fine tune AV heuristics to (multiple of) audio_dequeued_ms
The case of lagging audio to the audio master-clock (by experience) is a rare and probably synthethic case of the AV async videos, was dt_a > MAX_VIDEO_ASYNC && d_apts > 0 now with increased threshold max_adelay = Math.max( 4*audio_dequeued_ms, 4*MAX_VIDEO_ASYNC ) dt_a > max_adelay && d_apts > 0
In conjunction the video-repeat case (video pts > SCR) shall use a higher threshold _when_ detecting, i.e. min1_audio_queued_ms = Math.max( 2*audio_dequeued_ms, 2*MAX_VIDEO_ASYNC ) to ensure enough buffered audio exists (2 audio-frames) before the next getNextTexture() hits within vsync.
This early detection and min1_audio_queued_ms threshold is double of the late threshold for video-repeat min0_audio_queued_ms = Math.max( audio_dequeued_ms, MAX_VIDEO_ASYNC ), when the to-be repeated frame shall be displayed within getNextThreshold(). Failing this requirement (1 audio-frame) will discard it and gather the next video-frame, allowing to fill the audio-buffer. A subsequent AV sync shall correct the difference. Strategy is less intervention on less buffered-audio.
This shorter tolerance also reduces some video lag or stuttering on 24fps -> 60fps films.
GLJPanel: Allow disabling GLSL vertical flip programmatically via setUseGLSLVerticalFlip(false) in addition to property 'jogl.gljpanel.noglsl'
Suche setting would enable the slow path of flipping a potentially 'big' framebuffer via the CPU.
The best performance path is using the GLSL shader to vertically flip the FBO, or - w/o using the shader - to render the GL scene vertically-flipped and set the flag 'flipVertical' to false. - property "jogl.gljpanel.noverticalflip" - setter setSkipGLOrientationVerticalFlip(boolean) If set to <code>true</code>, user needs to flip the OpenGL rendered scene <i>if {@link #isGLOriented()} == true</i>, e.g. via the projection matrix.<br/> See constraints of {@link #isGLOriented()}.
Bug 1472: GLMediaPlayer: Handle setPlaySpeed() like setAudioVolume() if stream is not yet initialized or playing, cached clipped value and set at initGL(..)
GLMediaPlayer: Recognize !use_audio when repeating (caching) a video-frame, i.e. ignore audio_queued_ms in such case (Fixes video sync on SCR w/o audio)
GraphUI MediaButton: Disable AA_RENDERING_MASK for GLMediaPlayer color texture (effiency, less artifacts)
2-pass Graph-AA is not desired for video textures to enhance efficiency and reduce artifacts.
Consider using 'mPlayer.setTextureMinMagFilter( new int[] { GL.GL_LINEAR, GL.GL_LINEAR } )' of passed GLMediaPlayer instance to use bilinear filtering for different sizes.
GraphUI Shape: Fix Z{Ascending,Descending}Comparator using and exposing getAdjustedZ()
getAdjustedZ() simply returns `position.z() * getScale().z() + zOffset`, i.e. with added zOffset reflecting activation status (renders shape/group on top).
Bug 805: GraphUI Group: Add 'widget-mode' used to utilize a group as one visible UI widget element (activation, visibility)
Enabled widget behavior for a group causes - the whole group to be shown on top on (mouse over) activation of one of its elements via getAdjustedZ() - this group's onActivation(Listener) to handle all it's elements activation events - isActive() of this group and its sub-groups to return true if one of its elements is active
Bug 805: GraphUI Scene/Shape Pick-Active/Interaction: Pick shall complete traversion for most inner interactive shape; ...
Pick shall complete traversion for most inner interactive shape - Shape::dispatchMouseEvent() is only invoked for interactive shapes, impl. simplified.
- Remove 'Scene::dispatchMouseEvent(..)', use 'Scene::dispatchMouseEventPickShape(..)' for given use cases
- Scene::dispatchMouseEventForShape(..) used for mouseDragged() only, i.e. using activeShape.
+++
This allows a 'group widget' being used, allowing to click on inner shapes like a button.
Bug 805: GraphUI: Add Group.replaceShape(..) and Shape.getParent()
Group.replaceShape(..) allows replacing a shape w/o disturbing a layout, e.g. to zoom one element by taking it out of a grid-group and placing it on-top of the Scene while using a placeholder in the grid until returned.
Shape.getParent() - depending on use-case (w/o DAG) - allows access and control of a shape's Group.
Bug 805: GraphUI: Add Widget 'marker' (a Group), derived by {MediaUI01 -> MediaPlayer} and new RangeSlider
- A widget specifies specific UI semantics including individual controls. - Being a {@link Group}, implementations provide shape(s) and its instance can be added to the user's scene. - Due to the specific nature of widgets, individual controls/listener may be provided with semantic values.
+++
MediaPlayer exposes a RangeSlider for current position (view and control).
Graph GLSL functions.glsl: Complete overload vec2 and vec3 variants; Fix 'and'/'or' semantic (swapped); Add EPSILON in clip_coord(..) and add is_inside(..) function
Complete overload vec2 and vec3 variants
Fix 'and'/'or' semantic (swapped) - 'and' uses multiplication, i.e. all arguments must be > 0 (ideally 1) - 'or' uses addition, i.e. only one arguments must be > 0 (ideally 1) - both uses clamp [0..1]
Add EPSILON in clip_coord(..) - Only 'coord > high+EPSILON' is outside
Add is_inside(..) function - Similar to clip_coord(..) but returns float 0 or 1 instead of selecting color.
TODO: - GLSL: Add missing Mv-multiplication of vertex-position -> gcv_ClipBBoxCoord -- AABBox min/max should be set pre-multiplied w/ Mv covering an independent area, not per Shape/Region. -- This to properly work with moving/scaling of each Shape/Region etc
- GLSL vertex shader sets smooth varying 'gcv_ClipBBoxCoord' w/ Mv multiplied vertex-coord - RegionRenderer.setClipBBox(AABBox) expects a pre-multiplied Mv AABBox covering an independent area, not per Shape/Region. - This works as expected with moving/scaling of each Shape/Region etc
Graph/GraphUI: Revise Graph Region ShaderMapping, fix AABBox-Clipping for Pass2-AA, revise Pass2 AA Quality parameter ..
Misc: - Graph VBORegion2PVBAAES2: Drop unused FBO rescale - Move MIN/MAX QUALITY/SAMPLE from GraphUI Scene -> Graph Region
+++
Quality -> Pass2 AA Quality - Drop quality field in region - Pass quality to GLRegion.draw(..) similar to sampleCount for dynamic shader and switch - TODO: Pass quality parameter in TextRegionUtil's functions
Fix RegionRenderer Shader Mapping - Use ShaderKey class to properly implement the hash value and equals method - For this, TextureSequence.getTextureFragmentShaderHashID() has been added to provide actual shader-snippet for the equals function - All required criterias are included in the hash value and equals method
Fix AABBox Clipping for Pass-2 AA - Clipping in pass2-AA must happen in pass2 on actual gcu_PMVMatrix01 (not ortho)
GraphUI Scene - Rename: mark{All->}ShapesDirty(), set{AllShapes->}Sharpness(), set{AllShapes->AA}Quality() - Fix setSampleCount(..), i.e. markStatesDirty() not markShapesDirty() - Fix setAAQuality(), markShapesDirty() and markStatesDirty(): Use forAll(..) to traverse through all shapes and groups.
GraphUI Shape: Add receiveKeyEvents() and receiveMouseEvents() allowing a 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: Added RangedGroup Widget, displaying a clipped content Group with 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 Group Clipping setClip{OnBox->OnBounds}(): Add Vec3f cullingScale 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 Enhance Clipping: Drop pixel clipping if `clip-box >= 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)
Graph/GraphUI AA-Quality + SampleCount (shader): Push params down to 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 Enhance Clipping: Drop 'cullingScale' param, a simple 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.
AABBox: Rename private fields {bl, tr} -> {lo, hi} denoting proper orientation in API doc
br, tr wasn't sufficient as in commit d778889f36bd6bee999ceb502c5f0ce265b014bf while working on Frustum, as it doesn't properly reflect axis order not z.
Hence going back to 'low' and 'high' semantics, but using same length identifier and emphasizing far (lo) < near (hi) of our model-view coordinate system.
Add Cube to Frustum Plane mapping, supporting transformation of object-space AABBox into model-view Cube to Frustum.Plane for culling (cpu) and clipping (gpu)
Frustum: Revise code and its Plane definition to support Cube->Frustum as 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.
Graph Clipping: Use Frustum Clipping using AABBox -> Mv transformed Cube -> 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
GraphUI Demo Fontview: Demonstrate Clipping w/ rotation; Reuse GlyphShape for grid, info-box and tooltip
Added TooltipText for help and TooltipShape for GlyphShape.
Notable: The actual {@link GlyphShape} created for the glyph-grid {@link Group} is reused as-is in the bigger info-grid as well as for the {@link TooltipShape}.
This is possible only if not modifying the scale or position of the {@link GlyphShape}, achieved by simply wrapping it in a {@link Group}. The latter gets scaled and translated when dropped into a {@link Group} with {@link Group.Layout}.
This is a good example for a Directed Acyclic Graph (DAG).
Bug 1488 - Graph RegionRenderer Shader Mapping: Revert to IntObjectHashMap and throw exception on shaderKey collision
Commit 6363ae5fb6975a6f2e7c1093ce81f25b699e3e61 changed RegionRenderer.useShaderProgram()'s shader mapping using a new ShaderKey instance.
Such ShaderKey instance is created every time @ RegionRenderer.useShaderProgram() to retrieve the ShaderProgram from the HashMap<ShaderKey, Shader Program>. While this is most correct, creating the ShaderKey instance causes a lot of temp objects.
ShaderKey also uses the optional colorTexSeq shader code for equality test in case of hash-collisions.
Previous code simply ignored hash-collisions and used a 1:1 hashCode -> ShaderProgram mapping using our IntObjectHashMap. However, there was no test whether collision occur.
+++
Solution would be either 1- Revert fully to the previous code just using an IntObjectHashMap, but throwing a RuntimeException in case of hashCode collisions. In case of a collisions, we would need to produce a better hashCode. This is possible, as the underlying data is fully internal .. etc.
2- Use the IntObjectHashMap as long there is no hashCode collision, then revert back to HashMap<ShaderKey, Shader Program>.
+++
This patch implements variant (1), so far no exception has been thrown on multiple demos w/ and w/o diff color-textures.
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.
Bug 1489 - GraphUI Group: Resolve Performance Regression in 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.
Simplify TooltipShape: Create own wrapper Group to not mutate user given Shape (if reused in DAG); Fix FontView01 TooltipShape instance, use NoOp DestroyCallback
Bug 1488: FFMPEGMediaPlayer: Fix getTextureFragmentShaderHashID(), i.e. use actual tc_w_1 = (float)getWidth() / (float)texWidth value as hardcoded within the shader.
GraphUI Tooltip: Use delayMS for no time-based alarm (only used for now()); FontView01: Use TooltipShape for GlyphShape only with mouse click -> Tooltip.now()
GraphUI RangeSlider/RangedGroup: Fix overall integration, adding more API 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
Bug 1488: Complete/Fix producing the 64-bit shaderKey: Use long values in bit-shift expressions and simplify it
commit 1dcfdf71c09c6d774ac47012c05e09da4a085d7b - still used the 'hash code' bit shift pattern, not necessary -> simplified - the value as not ensured to be long, hence conversion occured
This caused Graph's MSAA not being picked up properly using the shaderKey.
NativeWindowFactory.createDevice(..) w/ unitID for cloning; DefaultGraphicsDevice: Move ownership (Object) code into base class ensuring same code
NativeWindowFactory.createDevice(..) w/ unitID - Allows cloning a device instance with same parameter.
DefaultGraphicsDevice: Move ownership (Object) code final into base class ensuring same code - Rename DefaultGraphicsDevice.swapDeviceHandleAndOwnership() -> swapHandleAndOwnership()
initStreamImpl() calls ffmpeg natives.setStream0(..), which in turn callsback to the GLMediaPlayerImpl and FFMPEGPlayer and hence requires a valid moviePtr. In total, it covers a longer time period.
This patch uses a moviePtrLock object avoiding destruction while within initStreamImpl.
Bug 1491: GLMediaPlayerImpl: Use a shared *GraphicsDevice for all compatible shared GLContext, removing resource restrictions
In a use case with hundreds of GLMediaPlayer instances, this causes the application to bail out due to running out of resources.
+++
GLMediaPlayer exposes resource restrictions and locking related with the created off-thread shared GLContext due to its newly created NativeWindow *GraphicsDevice instance (on X11).
On the X11 platform, the *GraphicsDevice actually uses a native resource (X11 Display handle) and hence creating such device is costly and limited.
To operate an off-thread GLContext w/o actual X11 input handling, it is *NOT* required to use a new instance.
+++
Further more, the device is using locking. To operate an off-thread GLContext, it is *NOT* required to use locking on it as it does not perform actual X11 input handling etc. All operations are performed on the shared GL context.
+++
Solution is to create a shared non-locking device clone compatible with the source. A share counter shall determine that the last one actually gets destructed. The usual ..
FFMPEGPlayer: Prep for bitmap'ed subtitles: Use glEnable()/glBindTexture() func-ptr in native; readNextPacket0() passes video+subtitle texTarget and texID
For bitmap subtitles we need to push the bitmap into its own texture. Hence readNextPacket0() must switch to used texture using glEnable() on !core and glBindTexture().
GraphUI MediaButton: Add blending below subtitle, allow setting color/blending and subLineDY; MediaPlayer: Add full infoLine toggle with click on infoBox
Bug 1494: Add SubTextureEvent & SubEmptyEvent; Add SubtitleEvent.release() provided by owner to take back borrowed resources (texture of bitmap subtitle)
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.
Bug 1495: GraphUI Shape: Only updateMat() if marked dirty once in 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.
GraphUI: Only issue Shape.mark*Dirty() if values were updated or data available; JOGL ImageSequence: Add addFrame(GL, TextureFrame), remove*Frame() and isSequenceAnimating()
Graph shader (pass1 simple): USE_COLOR_TEXTURE: Clip to vec4(0) color using alpha 0 instead of the debug color white vec4(1), which leads to the white seam if out of gcu_ColorTexBBox
Bug 1494 - GLMediaPlayer/GraphUI: Support Displaying Bitmap'ed Subtitles (PGS ..) via FFMPEGFMediaPlayer/FFmpeg
FFMPEGFMediaPlayer related changes: - Add libswscale (6th FFmpeg lib used) for sws_getCachedContext(), sws_scale() and sws_freeContext(), used natively to convert the palette'ed bitmap into RGBA colorspace -> GL texture
- Handling AVSubtitleRect.type SUBTITLE_BITMAP -- only handled if libswscale is available -- config/adjust texture object -- sws_scale palette'ed bitmap to texture -- intermediate memory is cached, may be resized and free'ed at destroy -- texture objects are managed and passed from GLMediaPlayerImpl, as they are also forwarded to player client via SubBitmapEvent
- Passing the AVCodecID to GLMediaPlayerImpl, converted to our CodecID enum.
- Unifying creation and opening of AVCodecContext with 'createOpenedAVCodecContext(..)'
+++
SubtitleEvent* - SubTextEvent now also handles ASS.Dialogue (FFmpeg 4) besides ASS.Event (FFmpeg 5, 6, ..).
+++
GLMediaPlayerImpl - Added ringbuffer subTexFree, managing Texture for bitmap'ed subtitles -- Uses 1 bitmap-subtitle Texture per used textureCount in cache, as one bitmap-subtile can be displayed per frame. Could be potentially reduced to just 2 .. but resources used are relatively low here.
- Validating subTexFree + videoFramesFree usage, use blocking get/put ringbuffer due to utilization from different threads.
- Receives subtitle content from native getNextPacket0() via callback, creates SubtitleEvent instance and passes it to a SubtitleEventListener - if exists. (See MediaButton example)
-- SubBitmapEvent also gets its special SubBitmapEvent.TextureOwner to handle client releasing the event and allowing us to put back the Texture resource to 'subTexFree'. This passing through of the Texture object is probably a weakness of this lifecycle and requires the client to ensure SubtitleEvent.release() gets called. See MediaButton example!
- Exposing CodecID, allowing clients like MediaButton to handle SubtitleEvent content according to codec
Bug 1493: Supply language code to SubtitleEvent, perhaps allowsing player to select font for ASS/Text rendering; Remove GLMediaPlayer's getStreamLang() as replaced by getLang()
Graph/GraphUI: Move getDefault*() to FontFactory and add {get,set}FallbackFont() + Font.getBestCoverage(..); Use fallback-font in MediaButton in case chosen font doesn't match (foreign languages, e.g. 'zho' Chinese .. )
* Added documentation to fields in `HeadTable` taken from https://docs.microsoft.com/en-us/typography/opentype/spec/head. * Added `LongDateTime` conversion of date values encoded as "seconds since 1904". * Added `getType()` API to `Table` interface. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/SbixTable.java
Original commit from typecast merge:
From 43c20bb2e7644aef7002caeb93e1770be5cacaab Mon Sep 17 00:00:00 2001 From: Bernhard Haumacher <haui@haumacher.de> Date: Sat, 9 May 2020 12:49:39 +0200
Added documentation to the 'glyf' table and structures.
* Completed missing toString() functions in some table. * Added dump() functionality to create a human readable description of all font tables with complete detail. * Fixed some signed/unsigned problems in the parser. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java # src/test/java/net/java/dev/typecast/ot/TTFontTest.java
* Include the offset table in the font's dump. * Simplified reading since the offset table now does not be read twice. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java
Added support for reading the SVG table. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java
Hausmacher Merge: Complete merge part-1: Compile and test clean (pre-write-feature)
Bernhard Haumacher provided changes in May 2020 to the typecast project within his public branch https://github.com/haumacher/typecast This merges the pre-write-feature work, which probably is incomplete.
Tooltip[Text]: Use a slightly round button, change to grayscale colors matching our buildin-theme and have the tips placed just above center of the toop (not above it)
Positional change could occurre in case the content has changed. However, our positional slider would not reflect this and the sliding view should stay stable.
Test: UIMediaGrid01 having one player tile zoomed and returned.
Bug 1493: Enhance Text/ASS subtitle layout: Split too wide text into multiple lines (max 4) fitting into box, trimming it beforehand
Not always are Text/ASS subtitles well formed with newline character. Use new StringUtil to re-layout if their width doesn't fit into the box, by trimming all whitespace and splitting them into up-to 4 lines.
The forwardActivation listener is still applied to all children as well as isActive() is also still overloaded for same required behavior.
However, none of the children is set in 'widget mode' as well as the Group is simply added to (or removed from) the Scene's top-level Group list - the holder.
Scene's setActiveShape(Shape) and releaseActiveShape() handle the top-level Group if affected, i.e. adding or zero'ing its ZOffset.
Bug 1498: GraphUI: Fix Picking Traversal throughout Groups in Z-Descending Order, testing Children and fallback to Group if positive
Picking algo in Z-Ascending order worked only by chance, as it picked up any bottom node.
+++
Proper algo is in Z-Descending order to block occluded (child) nodes:
for-all s : shapes p1 = testPicking(s) if ( s is Container ) { p2 = testPicking(s.childs) if( null != p2 ) { p1 = p2; // override w/ child prio } } return p1 }
Further, testPicking(shape) shall only return a positive shape, if the event dispatching check (mouse-over, click, ..) signals end-of-traversal - as originally intended.
Overall philosophy is to pick the 'deepest' child of a group if responding, otherwise the next higher interactive group.
GraphUI: Add Shape.IO_DISCARDED and update it @ Scene/Group draw(); Prepare for experimental occlusion-culling
TreeTool's cullShapes(), actually a naive dumm occlusion test (*RENAME IT*), would need to realize whether the shape/groups actually cover shapes below, i.e. are not on same Z-Axis and transparent.
Hence, this is disabled in code and we rely on the Z buffer still, just an idea ..
GraphUI Shape: Add MouseEvent to MoveListener; RangeSlider: Add rel obj position + NEWT MouseEvent to listener, renamed {Slider->Change}Listener and add PeekListener for mouse-over events
GraphUI Demos FontView01 + UIMediaGrid01: Use FSAA 8 (GPU MSAA 8) as these demos utilize lots of smaller resources regions ...
.. and this also brings us to the next required task: Resolve AA w/o supersampling right in our shader, which is very well possible when extending the tessellated outline triangle's area.
Bug 1501: Graph Delaunay: Add double triAreaVec2() and isInCircleVec2() version, overcome float precision; Loop: Pass edgeType not Winding, simplify findClosestValidNeighbor() -> isValidNeighbor(); CDTriangulator2D.addCurve() enforces Winding.CCW on BOUNDARY null == loop case
Add double version of triAreaVec2() and isInCircleVec2() in VectorUtil, overcoming float precision limits - Analysis exposed float precision limits within isInCircleVec2()
Bug 1501: Graph Delaunay: Use default winding outer-boundary:=CCW and inner-hole:=CW w/o using winding determination (might be incorrect)
This simplifies our code further and it has been validated that our polygon shoelace-algo for area >= 0 ? CCW doesn't produce correct results with all curves. Hence rely on given winding depending on outer-boundary and inner-hole if CDTriangulator2D.FixedWindingRule == true (default and fixed).
This also removes the more costly winding shoelace calculus, hence Outline ctor only sets dirtyWinding:=true w/o calculating the winding.
Bug 1501: Graph RenderState add debug-bits, i.e. DEBUG_LINESTRIP used in VBORegionSPES2 to just render lines instead of the filled area -> Used in UIShapeDemo02a
Bug 1501: VectorUtil: Deprecate prev line2line intersection tests, adding new impl; Add isConvex*() to determine whether a polyline is convex
I had problems using the previous line2line intersection methods in my (and my son's) C++ gfxbox2 project, e.g. freefall01. Hence I found a different solution, also using less operations: <https://jausoft.com/cgit/cs_class/gfxbox2.git/tree/include/pixel/pixel2f.hpp#n660>
While adding intersection tests for our Delaunay (Bug 1501) .. I came across this issue again and hence swapped the implementation.
The used Delaunay tessellation works well with (almost) convex shapes. In case e.g. a glyph gets to the extremes like 'M' in FreeMono or any other complex Chinese symbol - it may just simply happen that the new non-circumcircle triangle point crosses the inner (hope) or outer boundaries of the given polygon.
Applying further constraint at Loop.cut() resolves most cases by rejecting the proposed CCW and non-circumcircle triangle candidate if its new two line-segments intersects with the original polygon.
This results in mostly proper rendered Chinese fonts and also FreeMono is now readable - overal remaining bugs in Glyphs is low.
+++
Of course, this intersection test is costly around >= O(log(n)*n) costs, practically adding a measured ~65% processing time. E.g. for FontView01 using FreeSerif.ttf - orig total took 1430.817638ms, per-glyph 0.2236ms, glyphs 6399 - fix total took 2377.337359ms, per-glyph 0.371517ms, glyphs 6399
Pure Glyph/Shape instantiation shows > 2x costs: 750 ms 100% convex (fake) 1875 ms 0% convex (fake) 1870 ms 13% convex 824/6399
+++
Hence it is desired to either (1) Manually mark a polygon non-convex to add described intersection test for accuracy. Also may be used to just drop the additional costs despite the lack of correctness.
PROVIDED
(2) Determine non-convex nature of a polygon with a and overall less expensive algorithm. If considerably cheaper, this could reduce O(log(n) * n) -> O(n) or even O(log n).
Added convex/non-convex classification while ignoring off-curve points, but only ~13% of FreeSerif is pure convex, hence there is no benefit with this classification type.
It might be desired to attempt other classes, i.e. being rendered in non-convex mode w/o intersection tests. See - GENERALIZED DELAUNAY TRIANGULATIONS OF NON-CONVEX DOMAINS https://deepblue.lib.umich.edu/bitstream/handle/2027.42/28782/0000614.pdf;sequence=1
VectorUtil: Bring back specialized testSeg2segIntersection() w/ build-in FloatUtil.EPSILON epsilon and no collinear test
commit 5488665474cc7b88577cedfca6416784f0fda3ba Generalize *seg2segIntersection* w/ epsilon and doCollinear caused a big performance hit about 1/3 due to added doCollinear case and manual epsilon adding branches and having the method being longer - probably not 'hotspot'ed.
Bug 1489: Lock-Free Double-Buffered 'renderedShapes' causes data-race between rendering & input-edt, use synchronized tripple-buffering
Tripple-buffering _almost_ produces zero data-race collisions, however .. it still does rarely -> hence synchronize on the used ArrayList<>. This adds a minimal chance for blocking the input-EDT, but gives correct code & results.
Double-buffered 'renderedShapes' was introduced to resolve Bug 1489 in commit 5f9fb7159fa33bc979e5050d384b6939658049bd
This solution is tested by passing '-swapInterval 0' via CommandlineOptions for FontView01, UIMediaGrid01 .., i.e. rendering faster than picking and hence provoking the data-race condition.