aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp
Commit message (Collapse)AuthorAgeFilesLines
* Bug 805: GraphUI Scene/Shape Pick-Active/Interaction: Pick shall complete ↵Sven Gothel2023-12-182-142/+156
| | | | | | | | | | | | | | | | 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 Group: Add 'widget-mode' used to utilize a group as one ↵Sven Gothel2023-12-182-2/+66
| | | | | | | | | 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
* GraphUI Shape: Fix Z{Ascending,Descending}Comparator using and exposing ↵Sven Gothel2023-12-181-16/+31
| | | | | | | getAdjustedZ() getAdjustedZ() simply returns `position.z() * getScale().z() + zOffset`, i.e. with added zOffset reflecting activation status (renders shape/group on top).
* GraphUI Container: Cleanup or Group/Scene add*/remove* methodsSven Gothel2023-12-182-17/+55
|
* GraphUI Shape: Rename is{Container -> Group}(), denoting a group onlySven Gothel2023-12-182-3/+3
|
* GraphUI Padding, Margin, Gap: Use zero value constant None instead of ↵Sven Gothel2023-12-186-21/+21
| | | | default ctor
* GraphUI Alignment: Use Alignment.None instead of default ctor.Sven Gothel2023-12-182-7/+7
|
* GraphUI MediaButton: Disable AA_RENDERING_MASK for GLMediaPlayer color ↵Sven Gothel2023-12-181-1/+2
| | | | | | | | | 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: Rename [set|is]{Enabled -> Visible}(..) for claritySven Gothel2023-12-185-14/+20
| | | | | Note that invisible shapes are still considered for picking/activation. To completely mute the shape, issue {@link #setInteractive(boolean)} as well.
* GraphUI Shape/Group: Group.isActive() also returns true if any child is ↵Sven Gothel2023-12-122-1/+12
| | | | active; Add isContainer() to avoid rfeflection
* GraphUI Shape: Use Shape.MoveListener for Shape.onMove(..) providing more ↵Sven Gothel2023-12-121-18/+27
| | | | details of the translation
* GraphUI Shape: Add IO_ACTIVABLE stateSven Gothel2023-12-121-17/+38
|
* GraphUI Shape: Simplify setIO(..) usage (private)Sven Gothel2023-12-121-7/+7
|
* GraphUI Scene: Allow attaching GLAutoDrawable manually and adding ↵Sven Gothel2023-12-041-2/+26
| | | | GLEventListener (API)
* GraphUI Shape: Complete commit c8ec6fa7cc16a0777db16af8b4d0d0b898f8b546Sven Gothel2023-10-031-2/+13
|
* GraphUI Shape: 'int name' -> 'int id' and add 'String name', change get/set ↵Sven Gothel2023-10-034-23/+60
| | | | methods accordingly
* GraphUI Scene: Add custom one-time GLRunnable disposable action list, ↵Sven Gothel2023-10-031-0/+20
| | | | | | | | allowing to properly take-down user resources at dispose(GLAutoDrawable) Used for UISceneDemo20 to stop and release SimpleSineSynth and its ALAudioSink. The latter causes a bad exit (crash at OpenAL32.dll) on OpenJDK's Window Binary if not stopped!
* Bug 1467 - GraphUI: Don't de-activate a Shape if became active via ↵Sven Gothel2023-09-301-15/+24
| | | | | | | | 'mouseOver' (mouseDragged) When using a mouse, Scene activates a Shape if mouse is over it (mouseOver). Hence don't de-activate such Shape via mouse-button clicked or released.
* GraphUI: Shape: Add missing 'markShapeDirty()' on setBorderColor()Sven Gothel2023-09-301-0/+2
|
* Bug 1454 + Bug 1464: Maintain a Shape local 'zOffset' and only consider it ↵Sven Gothel2023-09-302-35/+43
| | | | | | | | | | for sorting w/o actually modifying the position (enogh to be painted on top and for selection) Also use a simplified comparison using only float relational operations w/o NaN/Inf bit-stuff or epsilon, as it should be accurate enough for this cause. This shall also resolve Bug 1454, as we no more modify the position directly but the local zOffset field .. but this has to be seen (data race).
* GraphUI: Group: Add attribute to allow not to relayout if child Shapes are ↵Sven Gothel2023-09-301-14/+24
| | | | dirty. Only issue validate on childs if theyre shape is dirty
* Bug 1465 - Graph / GraphUI: Render a Region's ColorTexture in proper ↵Sven Gothel2023-09-304-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aspect-ratio, letter-boxed or zoomed (config) + Bug 1466 Fix color mixing Bug 1465: Region currently simply bloats a given texture to its region AABBox, which renders textures with the wrong aspect ratio. Add facility to program the texture-coordinates to either letter-box or scaled-up (and cut) true aspect-ratio. Default shall be zoom (scale-up and cut), but user shall be able to set a flag in the Region for letter-box. Have the shader clip texture coordinates properly, best w/o branching to soothe performance. See functions.glsl +++ Bug 1466: Current color mix: texture * color_channel * color_static is useless in GraphUI. color_static shall modulate the texture, which works. But in case of color_channel (attribute/varying) we want it to be mixed so it can become the more dominant color for e.g. a border. Desired is: color = vec4( mix( tex.rgb * gcu_ColorStatic.rgb, gcv_Color.rgb, gcv_Color.a ), mix( tex.a * gcu_ColorStatic.a, 1, gcv_Color.a) );
* GraphUI Button: Support toggle'ed labels and fixed font size scaling for ↵Sven Gothel2023-09-261-51/+155
| | | | | | | | | | | | | | | | | | | | | | | | | symbols (see setFixedLabelSize()), This allows convenient instantiation of a Button changing its text (or symbol) when toggled, e.g.: UISceneDemo03: + final Button button = new Button(options.renderModes, fontSymbols, + fontSymbols.getUTF16String("play_arrow"), fontSymbols.getUTF16String("pause"), + buttonWidth, buttonHeight, buttonZOffset); + button.setSpacing(symSpacing, fixedSymSize); +++ setFixedLabelSize(..): Sets fixed label font size clipped to range [0 .. 1], defaults to {@code 0, 0}. Use {@code w=0, h=1} when using single symbols from fixed sized symbol fonts! Use {@link #setSpacing(Vec2f, Vec2f)} to also set spacing. The fixed label font size is used as the denominator when scaling.{@code max(fixedLabelSize, fontLabelSize)}, hence reasonable values are either {@code 1} to enable using the given font-size for the axis or {@code 0} to scale up/down the font to match the button box less spacing for the axis.
* GraphUI Button: Increase default spacing a little: x .12 -> .20, y .42 -> .46Sven Gothel2023-09-261-2/+2
|
* GraphUI Shape: Issue onToggleListener on setToggle(..) to complete user ↵Sven Gothel2023-09-261-0/+7
| | | | experience, add overridable toggleNotify(..) allowing implementations to react before listener.
* GraphUI Shape: Add remaining binary states to bitfield to preserver footprint ..Sven Gothel2023-09-261-26/+28
| | | | See commit e5eadcdaa615dbeb762885b50435a1f79d6ca895
* GraphUI: Mark some more methods final in Shape + GraphShapeSven Gothel2023-09-262-5/+5
|
* GraphUI Shape: Use a bitfield for the many binrary states instead of boolean ↵Sven Gothel2023-09-261-46/+47
| | | | to preserver footprint ..
* GraphUI GraphShape: Factor out static addRectangle(..) to be reused for ↵Sven Gothel2023-09-261-7/+8
| | | | debugging purposes
* GraphUI Layout: Simplify non-centered negative-offset (underline) removalSven Gothel2023-09-262-22/+4
|
* Bug 1462 - Graph Font: Add name + codepoint to ID and Glyph mapping plus ↵Sven Gothel2023-09-245-24/+15
| | | | | | | | | 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
* GraphUI Label: Condense getUnscaledGlyphBounds()Sven Gothel2023-09-241-4/+1
|
* Bug 1460 - GraphUI Shape: Allow keeping aspect-ratio at resizeSven Gothel2023-09-241-6/+25
| | | | For certain shapes the aspect-ratio shall be kept, e.g. MediaButton etc.
* GraphUI Shape: Crossref input modifier funcs in API doc; Condense simple ↵Sven Gothel2023-09-241-26/+26
| | | | setter/getter
* GraphUI MediaButton: Return this for chaining on setterSven Gothel2023-09-241-2/+3
|
* Bug 1459 - GraphUI Shape: Add active (pointer over/left) state and callback ↵Sven Gothel2023-09-242-6/+52
| | | | | | | | | Listener We already track this state within Scene, i.e. a shape is marked active when pointer is over it and released from active-duty when pointer left. Scene shall notify the Shape so it can track this state locally and also forward this event to the user via the typical Shape.Listener callback.
* Bug 1454 - GraphUI Scene: Make active ZOffset scale configurableSven Gothel2023-09-241-2/+7
|
* GraphUI Button: Remove redundant ctors and methods. ZOffset shall be simply ↵Sven Gothel2023-09-241-68/+0
| | | | given, calculated by caller
* Bug 1454 - GraphUI Scene: Elevate active (selected) shape (add z-offset) and ↵Sven Gothel2023-09-232-1/+28
| | | | | | | | | | | | | | | | | select (pick) in Z descending order Picking (select) a shape shall process all shapes in Z descending order, i.e. top shape first. This is a bug currently. Note: Picking (selecting) a shape using a (mouse-)pointer device is active by mouse-moved and not only mouse-clicked. Therefor, we select shapes by mouse-over. The active selected shape shall have an elevated Z offset to be rendered on top of the others on same plane. - This avoids them being rendered below others while moving them around etc. - This also avoids flickering of overlapping shapes with mouse over. - This stabilizes the UI experience
* Bug 1452: GraphUI Shape: Rename setMvTransform(..) -> setTransformMv(..), ↵Sven Gothel2023-09-236-43/+43
| | | | | | | 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 ..
* GraphUI Button.getSubString(): Expose labelZOffsetSven Gothel2023-09-231-1/+1
|
* Bug 1452: GraphUI Scene DefaultPMVMatrixSetup.set(): Fix regression of ↵Sven Gothel2023-09-231-1/+1
| | | | | | | | | | | | | | | | | | | commit 5d6e8a367c03644740187e500c6de5d3ac039d5e - pmv.glMatrixMode(GLMatrixFunc.GL_PROJECTION); - pmv.glLoadIdentity(); - pmv.gluPerspective(angle, ratio, zNear, zFar); - pmv.glTranslatef(0f, 0f, scene_dist); + pmv.loadPIdentity(); + pmv.perspectiveP(angle, ratio, zNear, zFar); + pmv.translateMv(0f, 0f, scene_dist); ^^ Was projection matrix. Fixed. Note: resolved via TraceGL and comparing output -> P matrix differed, here translation.
* GraphUI GlyphShape.addShapeToRegion(): In case the Font.Glyph has no shape, ↵Sven Gothel2023-09-201-0/+3
| | | | at least add an empty region to avoid an NPE
* GraphUI Container: Add getShapeCount() and add API doc ..Sven Gothel2023-09-203-6/+15
|
* Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit ↵Sven Gothel2023-09-2015-343/+344
| | | | | | | | | | | | | | | | | | | | 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 Layout (Box/Grid): Adjust bottom-left offset according to center-axisSven Gothel2023-09-192-6/+44
| | | | | - Remove the negative or positive delta on centered axis. - Only remove negative offset of non-centered axis (i.e. underline)
* GraphUI GridLayout: Disable TRACE_LAYOUTSven Gothel2023-09-191-1/+1
|
* GraphUI GridLayout: Fix scaled non-center: Only add center offset if ↵Sven Gothel2023-09-192-26/+23
| | | | requested and avoid double-add.
* GraphUI Label: Add convenient methods getUnscaledGlyphBounds(..)Sven Gothel2023-09-171-0/+12
|
* GraphUI Layout: Remove unused leftover var and complete GridLayout ctorSven Gothel2023-09-172-3/+12
|