summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp
Commit message (Collapse)AuthorAgeFilesLines
* Fix ShaderProgram ownership bug, introduced in commit ↵Sven Gothel2023-03-153-35/+36
| | | | | | | | | 67a723477ecd818fbc5859fe20ee536a3b4efae5 (reverting and clarifying) All Graph ShaderPrograms used are owned by RegionRenderer, not RenderState nor [GL]Region*, hence [GL]Region* shall only nullify the resources but not destroy the shader currently in use. One RegionRenderer maybe used for multuple Regions.
* Graph: Have RegionRenderer.reshapeNotify(..) track x/y as well (vieport); ↵Sven Gothel2023-03-141-5/+7
| | | | GraphUI.Scene using RegionRenderer's viewport (no duplicate)
* Graph: RegionRenderer: Adopt to TextureSequence API Change: Use ↵Sven Gothel2023-03-141-9/+8
| | | | setTextureLookupFunctionName(..) before using hash and/or code.
* Graph: Region: Add API doc on markStateDirty() and markShapeDirty()Sven Gothel2023-03-141-5/+13
|
* AABBox: Add API doc comment on reset() and hence default ctor regarding ↵Sven Gothel2023-03-141-3/+10
| | | | infinite dimension
* TextureSequence (API Change): Use setTextureLookupFunctionName(..) ↵Sven Gothel2023-03-142-16/+46
| | | | explicitly to set the name upfront, clarifying workflow. Impl: ImageSequence + GLMediaPlayerImpl
* GLRegion + RegionRenderer: Add clearShader(..) to delete all ShaderPrograms ↵Sven Gothel2023-03-133-7/+27
| | | | and is references.
* Graph: Add GLRegion creation w/ pre-calculating its buffer sizes; ↵Sven Gothel2023-03-132-2/+60
| | | | | | TextRegionUtil: Use pre-calc'ing buffer sizes for GLRegion; TextRendererGLELBase: Fix temp AffineTransform usage
* GLMediaPlayer: Overhaul and simplify states, allow usage before stream ready ↵Sven Gothel2023-03-131-17/+28
| | | | | | | | | | | | | | | showing test-texture. Adding stop(); (API Change) - allow multiple initGL(..) @ uninitialized and initialized - allows usage before stream is ready - using a test-texture @ uninitialized - adding stop() API change - initStream() -> playStream() - play() -> resume() FFMPEG: Added 'ready' check for robustness
* Misc: Add MonitorDevice.perMMToPerInch(..); Drop unused ↵Sven Gothel2023-03-091-3/+2
| | | | RegionRenderer.init(..) renderModes argument
* Merge pull request #110 from gbburkhardt/masterGöthel Software2023-03-081-1/+7
|\ | | | | Fix for AWT GLCcanvas DPI scaling. Forum thread https://forum.jogamp…
| * Fix for AWT GLCcanvas DPI scaling. Forum thread ↵Glenn Burkhardt2023-03-061-1/+7
| | | | | | | | https://forum.jogamp.org/DPI-scaling-not-working-td4042206.html
* | Rename NonFSAAGLCapabilitiesChooser -> NonFSAAGLCapsChooser (too long)Sven Gothel2023-03-081-3/+3
| |
* | Apply NonFSAAGLCapabilitiesChooser in NEWTGLContext (tests only). TODO: ↵Sven Gothel2023-03-081-3/+14
| | | | | | | | Consider applying it in default chooser?
* | Graph: Font: Add equals() + hash() API doc; GraphUI's Label*.setText(): Only ↵Sven Gothel2023-03-081-0/+18
| | | | | | | | modify values if text and/or font differs, skipping markShapeDirty() saves performance.
* | Graph GPUUISceneNewtDemo: Filter out all FSAA (multisample) caps if ↵Sven Gothel2023-03-081-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | undesired (Graph VBAA + MSAA); Add NonFSAAGLCapabilitiesChooser Notable: On RaspiPi4b w/ Mesa3D's Broadcom/VC driver, the chosen capabilities is a multisamnple one even though not requested. This causes - extra performance overhead - doubled AA: 1st our VBAA, then the FSAA (multisample) -> loss of sharpness Simply dropping the undersired FSAA helps and ups performance on the Raspi board (22 -> 35 fps).
* | GLArrayData: Fix API doc typo in sealed()Sven Gothel2023-03-071-1/+1
| |
* | Graph: Region: Enhance API doc, fix typo .. (brace close left open during ↵Sven Gothel2023-03-071-12/+34
| | | | | | | | selected commits)
* | Graph Perf: Add Region.countOutlineShape(), Font.processString(Visitor2,..), ↵Sven Gothel2023-03-074-4/+79
| | | | | | | | TextRegionUtil.countStringRegion() allowing to use Region.setBufferCapacity()
* | Graph Perf: Font*: Remove PerfCounterCtrl since the Region counter is more ↵Sven Gothel2023-03-071-1/+0
| | | | | | | | than enough
* | Graph Perf: OutlineShape: Uncomment all debug code to keep it smallerSven Gothel2023-03-071-7/+7
| |
* | Graph Perf: Region*: Add setBufferCapacity(..) and cut-off growBuffer() ↵Sven Gothel2023-03-072-3/+21
| | | | | | | | early if not needed (track capacity); Align all VBORegion* buffer init/set/grow impl.
* | Graph Perf: Region: split addOutlineShape() -> addOutlineShape0() (fast) and ↵Sven Gothel2023-03-071-54/+81
| | | | | | | | addOutlineShape1() (slow perf+debug), rename growBufferSize() -> growBuffer()
* | Graph Perf: Region*: Rely on growBuffer(..) per addOutlineShape() and known ↵Sven Gothel2023-03-071-0/+13
| | | | | | | | buffer data-type to directly put[34][sif](..) skipping GLArrayDataClient/Buffers buffer-growth and validations
* | GLArrayData: Promote sealed() from GLArrayDataEditable, to correctly being ↵Sven Gothel2023-03-075-119/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | used for getElemCount() instead of 0==position, ... (API change) API Change - sealed() moved up from GLArrayDataEditable -> GLArrayData - GLArrayDataWrapper is sealed by default - getSizeInBytes() -> getByteCount() - Semantics of getElemCount() and getByteCount() - Correctly use sealed() to switch from position to limit - instead of 0==position Aligned method names: - getElemCount() - elemPosition() - remainingElems() - getElemCapacity() to corresponding byte counts: - getByteCount() - bytePosition() - remainingBytes() - getByteCapacity()
* | Graph: Bring back passing through temp AffineTransform instances (optional, ↵Sven Gothel2023-03-072-17/+44
| | | | | | | | but recommended)
* | Graph Perf Counter: Use GlueGen's Clock.currentNanos() to ease on ↵Sven Gothel2023-03-071-19/+17
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | performance-hit measuring performance. This was mostly notable on a Raspberry-Pi 4 arm64, where perfromance degragated around 3x using high-freq counter. Using our well determined Clock.currentNanos() removes this overhead, back to 'easy measuring' and having a well defined 'currentNanos()' since module start. TestTextRendererNEWT00 can enable Region and Font perf-counter w/ '-perf', w/o it only uses its own counter and hence reduce the high-freq burden (64% perf win on raspi4). +++ Below numbers show that Region.addOutlineShape() perhaps needs a little performance work to allow long text to be processed in 'real time' on embedded platform. Hower, usually we cache the Region for long text and can have at least one liner to be renderer within 60fps fast, i.e. Region produced in ~26ms for a 81 char line instead of ~130ms for 664 chars. +++ Raspberry Pi 4b, OpenJDK17, Debian 11: Using current medium sized text_1 w/ 664 chars, w/o '-perf' and after having passed 40 frames, we have following durations: - process the OutlineShape -> Region: 129ms (text) - Render the Region: 53ms Startup Times: - loading GlueGen - loading test 0 [ms] - loading GlueGen - start test 1,910 [ms] - loading test - start test 1,910 [ms] - loading test - gl 2,631 [ms] - loading test - graph 2,636 [ms] - loading test - txt 2,844 [ms] - loading test - draw 3,062 [ms] Perf .. 1 / 1: Perf Launch: Total: graph 5, txt 207, draw 218, txt+draw 425 [ms] 1 / 1: Perf Launch: PerLoop: graph 5,505,740, txt 207,530,736, draw 218,393,680, txt+draw 425,924,416 [ns] 20 / 20: Perf Frame20: Total: graph 16, txt 376, draw 281, txt+draw 657 [ms] 20 / 20: Perf Frame20: PerLoop: graph 807,055, txt 18,820,824, draw 14,075,146, txt+draw 32,895,970 [ns] 20 / 40: Perf Frame40: Total: graph 3, txt 129, draw 53, txt+draw 182 [ms] 20 / 40: Perf Frame40: PerLoop: graph 176,670, txt 6,451,330, draw 2,658,217, txt+draw 9,109,547 [ns] +++ On a modern desktop (~2y old), GNU/Linux Debian 11, AMD GPU on Mesa3D: Using current medium sized text_1 w/ 664 chars, w/o '-perf' and after having passed 40 frames, we have following durations: - process the OutlineShape -> Region: 42ms (text) - Render the Region: 5ms Startup Times: - loading GlueGen - loading test 0 [ms] - loading GlueGen - start test 310 [ms] - loading test - start test 309 [ms] - loading test - gl 459 [ms] - loading test - graph 460 [ms] - loading test - txt 490 [ms] - loading test - draw 506 [ms] Perf .. 1 / 1: Perf Launch: Total: graph 1, txt 29, draw 15, txt+draw 45 [ms] 1 / 1: Perf Launch: PerLoop: graph 1,191,096, txt 29,868,436, draw 15,519,445, txt+draw 45,387,881 [ns] 20 / 20: Perf Frame20: Total: graph 240, txt 68, draw 21, txt+draw 89 [ms] 20 / 20: Perf Frame20: PerLoop: graph 12,045,651, txt 3,415,402, draw 1,069,348, txt+draw 4,484,750 [ns] 20 / 40: Perf Frame40: Total: graph 283, txt 42, draw 5, txt+draw 47 [ms] 20 / 40: Perf Frame40: PerLoop: graph 14,152,395, txt 2,116,114, draw 265,292, txt+draw 2,381,406 [ns]
* Graph: Use PerfCounterCtrl interface and Instant/Duration & ↵Sven Gothel2023-03-062-68/+91
| | | | Clock.getMonotonicTime() ...
* Graph: Font: Add perf counter (w/ API)Sven Gothel2023-03-061-0/+11
|
* Graph: Region: Add perf counter (w/ API); Utilize put[34][sif](..); Fix ↵Sven Gothel2023-03-062-23/+184
| | | | | | | | | | | | | | | indices growBufferSize(); Add GLRegion.create(..) w/ initial vertices/indices count; Up default[VI]Count; Following heuristcs were found, hence we might want to calculate these for each font (TODO): /** * Heuristics with TestTextRendererNEWT00 text_1 + text_2 = 1334 chars * - FreeSans ~ vertices 64/char, indices 33/char * - Ubuntu Light ~ vertices 100/char, indices 50/char * - FreeSerif ~ vertices 115/char, indices 61/char * * Now let's assume a minimum of 10 chars will be rendered */
* GLArrayData: year-rangeSven Gothel2023-03-061-1/+1
|
* GLArrayData*: Minor edits: API doc, space and year-rangeSven Gothel2023-03-063-5/+5
|
* GLArrayDataEditable: Clarify API doc on clear*(..) and rewind()Sven Gothel2023-03-061-2/+54
|
* GLArrayDataClient: Minor toString() and DEBUG output fixesSven Gothel2023-03-061-3/+3
|
* GLArrayData[Editable,Client]: Add put[34][bsif](..) and array put[bsif](..) ↵Sven Gothel2023-03-062-0/+101
| | | | | | | | variants for flexibility/performance Notable: The array-put is slower than small range single-puts, e.g. put3i(..). Uses GlueGen's Buffers change commit 69b748925038b7d44fa6318536642b426e3d3e38
* GLDrawableFactory: Fix typos and mention 'surfaceless' in ↵Sven Gothel2023-03-041-3/+3
| | | | createDummyDrawable(..)
* GLProfile::initProfilesForDeviceCritical(): initLock.addOwner(t) only if t ↵Sven Gothel2023-03-041-8/+21
| | | | is not orig-owner
* GLProfile.isValidArrayDataType() add missing accepted types for ES3/GL3+ but ↵Sven Gothel2023-03-022-24/+74
| | | | | | dropping its usage (GLArrayDataWrapper validation) Skip GLProfile based index, comps, type validation, might not be future proof.
* Graph Region: Address overflow issue using GL2ES3 integer indices (WIP...); ↵Sven Gothel2023-02-243-25/+81
| | | | | | | | | | | | | | | Ease GLArrayData* buffer growth. Using integer indices, i.e. GL_UNSIGNED_INT, requires us to pass a GLProfile 'hint' to the GLRegion ctor. Region.max_indices is computed in this regard and used in Region.addOutlineShape(). TODO: If exceeding max_indices, the code path needs some work. Buffer growth is eased via GLArrayData using its golden growth ratio and manually triggering growth before processing all triangles in Region.addOutlineShape(). +++ TextRegionUtil static drawText() won't clear passed Region anymore, caller has to do this if so intended.
* GLArrayData*: Expose reserve() for total elementCount and growIfNeeded() for ↵Sven Gothel2023-02-242-37/+69
| | | | additional components ...
* GLArrayData*: Shorten methods (*API Change*), use proper constructor and ↵Sven Gothel2023-02-245-213/+247
| | | | | | | | | | | | | finalize immutables, add growthFactor (default golden ratio 1.618), add getCapacity*() and printStats(..) The growthFactor becomes essential for better growth behavior and can be set via setGrowthFactor(). The other changes were merely to clean up the GLArrayData interface and its 4 implementations. Not great to change its API, but one name was misleading ['getComponentCount' -> 'getCompsPerEleme'], so overall .. readability is enhanced. Motivation for this change was the performance analysis and improvement of our Graph Curve Renderer.
* Graph TextRegionUtil: Fix HashMap (font,text)->GLRegion: Preserve key data ↵Sven Gothel2023-02-191-20/+40
| | | | | | (fontName, text) for equals Otherwise we would need to use a mostly collision free secure hash algo, Black2b-512 or sha256/512
* Graph Font.Glyph: Cleanup: Remove Font and getScale() from interface ↵Sven Gothel2023-02-191-12/+7
| | | | (redundant), add getLeftSideBearings*() from htmx table; Flatten TypecastGlyph impl by merging its Metrics, add equal() complementing hashCode()
* Graph Font: Add 'name' to Glyph; Drop erroneous Glyph ID_SPACE, ID_CR manual ↵Sven Gothel2023-02-191-2/+3
| | | | | | | | | | | | | | mapping, rely on no-shape for 'space' non-contour. Drop erroneous Glyph ID_SPACE, ID_CR to rely on no-shape for 'space' non-contour resolves different cmap-mappings of fonts, not following 'some std'. Hence getGlyph(glyph_id) no more uses the `font.getGlyph(Glyph.ID_UNKNOWN)` shape, but a null-shape as intended and using the hmtx and hhea table values for asvance and bounds. This fixes 'space' spacing in general and specifically FreeSerif-Regular and the like. This path also simplifies processing/layout of glyphs in process(..) and get*BoundsFU(..).
* Graph Font.Metrics: Use unchanges sign of (+) ascent, (-) descent and (+) ↵Sven Gothel2023-02-191-22/+33
| | | | lineGap, document them properly and fix Font.getLineHeightFU()
* Rename VectorUtil.ccw(..) -> isCCW(..)Sven Gothel2023-02-171-2/+3
|
* Graph: Outline: Remove minor redundancySven Gothel2023-02-171-2/+1
|
* Merge pull request #109 from david-hall/masterSven Gothel2023-02-171-0/+1
|\ | | | | Add missing case in getDbgSeverityString()
| * Add GL_DEBUG_SEVERITY_NOTIFICATION to getDbgSeverityString()David Hall2023-02-131-0/+1
| |
* | Graph: Fix Loop.initFromPolyline()'s Winding determination, document Winding ↵Sven Gothel2023-02-173-56/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rules for OutlineShape and add get/setWinding in Outline Loop.initFromPolyline()'s Winding determination used a 3-point triangle-area method, which is insufficent for complex shapes like serif 'g' or 'æ'. Solved by using the whole area over the Outline shape. Note: Loop.initFromPolyline()'s Winding determination is used to convert the inner shape or holes to CW only. Therefor the outter bondary shapes must be CCW. This details has been documented within OutlineShape, anchor 'windingrules'. Since the conversion of 'CCW -> CW' for inner shapes or holes is covered, a safe user path would be to completely create CCW shapes. However, this has not been hardcoded and is left to the user. Impact: Fixes rendering serif 'g' or 'æ'. The enhanced unit test TestTextRendererNEWT01 produces snapshots for all fonts within FontSet01. While it shows proper rendering of the single Glyphs it exposes another Region/Curve Renderer bug, i.e. sort-of a Region overflow crossing over from the box-end to the start.