| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
and subtitle language
|
|
|
|
| |
dropping UIMediaGrid00
|
|
|
|
|
|
| |
PointerListener for onClicked(), add onHover();
Subsequent commits will fix complete cleanup where code was changed mostly regarding other issues.
|
| |
|
|
|
|
| |
{get,set}FallbackFont() + Font.getBestCoverage(..); Use fallback-font in MediaButton in case chosen font doesn't match (foreign languages, e.g. 'zho' Chinese .. )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
| |
need to issue Shape.updateMat()
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
implementations: Either Uninit, Init, Pause or Play (exclusive)
|
| |
|
| |
|
|
|
|
| |
ass/saa) support via GLMediaPlayer/FFMPEGMediaPlayer
|
|
|
|
| |
GraphShape.drawImpl0(..) override;
|
|
|
|
|
|
|
|
| |
streams and languages and add convenient switchStream(..) entry.
audio/video/subtitle streams and language metadata is maintained by arrays holding the stream-IDs and language string identifier.
Implementation added in FFMPEGPlayer for these data-sets.
|
|
|
|
| |
SliderAdapter.clicked() as dragged is always called
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
FontView01: Use TooltipShape for GlyphShape only with mouse click -> Tooltip.now()
|
| |
|
|
|
|
| |
Shape (if reused in DAG); Fix FontView01 TooltipShape instance, use NoOp DestroyCallback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-> 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.
|
| |
|
|
|
|
| |
rendering in display()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
driven by a Scene
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
jogamp.graph.curve.opengl.VBORegion2PVBAAES2 perf-counter hooks (not committed)
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
listener-array (was 1 instance)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clipping funs for aaQuality/sampleCount; TextRegionUtil: Pass quality parameter in draw-functions
Region.DEFAULT_AA_QUALITY defaults to MAX_AA_QUALITY still
- TODO: AA shader is subject to change ..
Region.draw(..) clips the quality param (save)
TextRegionUtil: Pass quality parameter in draw-functions
- Allowing to select the AA shader
GraphUI Scene and some demos add the AA-quality param
to the status line or screenshot-filename.
- See Region.getRenderModeString(..)
+++
TestTextRendererNEWT20 and TestTextRendererNEWT21
now iterate through all fonts, AA-quality shader and sample-sizes.
Most demos and some more tests take AA-quality into acount,
demos via CommandlineOptions.graphAAQuality
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 GraphShape
- Rename: [get,set]{->AA}Quality()
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 Group
- Add setFixedSize()
- Add setClipOnBox()
- Document setRelayoutOnDirtyShapes(), isShapeDirty()
|
|
|
|
| |
sliding direction
|
| |
|
|
|
|
| |
expansion
|
| |
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Convenient using Graph/GraphUI produced AABBox)
Simple demo, setting clip-bbox manually:
- src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeClippingDemo00.java
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
|
| |
|
|
|
|
| |
GLCapabilities request, removing code duplication
|
|
|
|
| |
flexibility
|