aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/jogamp/graph
Commit message (Collapse)AuthorAgeFilesLines
* GraphUI: Add Shape.IO_DISCARDED and update it @ Scene/Group draw(); Prepare ↵Sven Göthel2024-02-051-0/+30
| | | | | | | | | | | 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 ..
* Bug 1498: Change Top-Level Widget Mode: Register a top-level Group in Scene, ↵Sven Göthel2024-02-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | where its zOffset gets adjusted when activated.. .. instead of having a non-working complicated callback orgy setup. This also takes away the getAdjustedZ() overloading burden (or better uglyness) etc. Hence Group's setWidgetMode(boolean) became: - enableTopLevelWidget(Scene) - disableTopLevelWidget() 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.
* GraphUI Cleanup: Use TreeTool directly (Reduce virtl-funcs); Fix typos; Use ↵Sven Göthel2024-02-041-2/+27
| | | | | | PointerListener for onClicked(), add onHover(); Subsequent commits will fix complete cleanup where code was changed mostly regarding other issues.
* Bug 1489 - GraphUI Group: Resolve Performance Regression in ↵Sven Göthel2024-01-221-31/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()
* GraphUI Graph/Scene: Reuse TreeTool for contains(), getShapeByID() and ↵Sven Göthel2024-01-201-16/+48
| | | | getShapeByName(), also adding full traversion (instead of a flat lookup)
* Bug 1462 - Graph Font: Add name + codepoint to ID and Glyph mapping plus ↵Sven Gothel2023-09-241-4/+4
| | | | | | | | | traversing through all Glyphs See UISceneDemo03 new Button(options.renderModes, fontSymbols, " "+fontSymbols.getUTF16String("pause")+" ", buttonWidth, buttonHeight); // pause Unicode codepoint symbol is also contained in FontGlyph
* Bug 1452: GraphUI Shape: Rename setMvTransform(..) -> setTransformMv(..), ↵Sven Gothel2023-09-231-4/+4
| | | | | | | aligning w/ PMVMatrix4f naming .. 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 ..
* Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit ↵Sven Gothel2023-09-202-20/+20
| | | | | | | | | | | | | | | | | | | | 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: Button/Label: Complete String -> CharSequence type change for text, ↵Sven Gothel2023-09-041-1/+1
| | | | rename Button set{Label->Text}(..), adjust demo/text code
* GraphUI Enhance: API doc; Scene/Button Z-offset and -epsilon; Push temp ↵Sven Gothel2023-09-041-4/+4
| | | | AffineTransform to local method; Simplify BaseButton setCorner(0) -> setPerp(); Protected abstract ctor ..
* GraphUI GraphShape: createGLRegion() -> updateGLRegion(), called by ↵Sven Gothel2023-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | addShapeToRegion() impl to utilize OutlineShape -> GLRegion ctor w/ proper buffer-size This way we avoid unnecessary buffer growth and allow creation of 'always' fitting buffer sizes. +++ Update or freshly create the GLRegion, while allocating its buffers with given initial `vertexCount` and `indexCount`. Method shall be invoked by the addShapeToRegion(GLProfile, GL2ES2) implementation before actually adding the OutlineShape to the GLRegion. addShapeToRegion(GLProfile, GL2ES2) is capable to determine initial `vertexCount` and `indexCount` buffer sizes, as it composes the OutlineShapes to be added. updateGLRegion(GLProfile, GL2ES2, TextureSequence, OutlineShape) maybe used for convenience. In case GLRegion is `null`, a new instance is being created. In case the GLRegion already exists, it will be either cleared if the GL2ES2 `gl` instance is not `null` or earmarked for deletion at a later time and a new instance is being created.
* Graph + GraphUI: Consolidate Vertex: Drop SVertex and factory, use Vec[234]f ↵Sven Gothel2023-04-181-7/+9
| | | | | | | | | | | instead of float[] and remove unused VectorUtil methods After Matrix4f consolidation and proving same or better performance on non array types, this enhances code readability, simplifies API, reduces bugs and may improve performance. GraphUI: - Have RoundButton as a functional class to make a round or rectangular backdrop, i.e. impl. addShapeToRegion() via reused addRoundShapeToRegion()
* GraphUI TreeTool: Iterate from start to end (not vice versa), eliminating ↵Sven Gothel2023-04-121-4/+4
| | | | potential side-effects - fixing forSortedAll(..)
* GraphUI TreeTool: For all forAll*(): Allow acting upon Container Shape, i.e. ↵Sven Gothel2023-04-101-22/+14
| | | | | | 1st visit Shape, only therafter (if false) traverse into Container This is required to allow actions on a Container itself.
* GraphUI: Adopting Vec*f API; Adding Group; Scene + Group are Container, ↵Sven Gothel2023-04-052-2/+162
| | | | | | | | | | | | | | | | traversing the PMVMatrix throughout childs (-> see TreeTool). Utilizing the Vec*f (and Matrix4f) API w/ AABBox et al renders our code more clean & safe, see commit 15e60161787224e85172685f74dc0ac195969b51. A Group allows to contain multiple Shapes, hence the PMVMatrix must be traversed accordingly using TreeTool for all operations (draw, picking, win->obj coordinates, ..). Hence Scene + Group are now implementing Container and reuse code via TreeTool and a Shape.Visitor*. This will allow further simplification of user code.
* GraphUI Button: Simplify addShapeToRegion()Sven Gothel2023-03-281-2/+2
|
* GraphUI: Promote API to JOGL via graphui.jar or within any jogl-all*.jar (WIP)Sven Gothel2023-03-101-0/+81
Root package is 'com.jogamp.graph.ui.gl', i.e. a sub-package of Graph denoting UI and OpenGL usage. Implementation will stay small, hence relative files size costs are minimal. Source and build is in parallel to nativewindow, jogl and newt and has a dependency to all of them. The NEWT dependencies are merely the input listener ..