| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
capability for code injection to render
Besides the one-shot on-init functionality, this allows us to re-render the shape differently.
|
|
|
|
| |
position + NEWT MouseEvent to listener, renamed {Slider->Change}Listener and add PeekListener for mouse-over events
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
PointerListener for onClicked(), add onHover();
Subsequent commits will fix complete cleanup where code was changed mostly regarding other issues.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
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
|