summaryrefslogtreecommitdiffstats
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* TextureSequence (API Change): Use setTextureLookupFunctionName(..) ↵Sven Gothel2023-03-141-1/+7
| | | | explicitly to set the name upfront, clarifying workflow. Impl: ImageSequence + GLMediaPlayerImpl
* Graph: Add GLRegion creation w/ pre-calculating its buffer sizes; ↵Sven Gothel2023-03-132-20/+4
| | | | | | TextRegionUtil: Use pre-calc'ing buffer sizes for GLRegion; TextRendererGLELBase: Fix temp AffineTransform usage
* Move png assets (NEWT icons + GLMediaPlayer dummy/test) to simple classpath, ↵Sven Gothel2023-03-131-2/+4
| | | | allowing access w/o jars. TODO: Test Android.
* Cleanup Demos: Move demos to jogl-demos.jar (here Graph + AudioVideo), ready ↵Sven Gothel2023-03-1161-12233/+5
| | | | for easy deployment and test w/ junit/ant
* GraphUI: Promote API to JOGL via graphui.jar or within any jogl-all*.jar (WIP)Sven Gothel2023-03-1027-2686/+112
| | | | | | | | | | 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 ..
* GraphUI: Revision: Simplify resource handling via SceneUIController, add ↵Sven Gothel2023-03-097-297/+818
| | | | general functionality in UIShape (drag, ..)
* Adopt to RegionRenderer.init(..) dropped unused renderModes argumentSven Gothel2023-03-096-6/+6
|
* Rename NonFSAAGLCapabilitiesChooser -> NonFSAAGLCapsChooser (too long)Sven Gothel2023-03-083-6/+6
|
* TestTextRendererNEWT20: Cover Graph-VBAA, Graph-MSAA, FSAA, NONE .. (have ↵Sven Gothel2023-03-083-21/+76
| | | | proper filenames for screenshots)
* Apply NonFSAAGLCapabilitiesChooser in NEWTGLContext (tests only). TODO: ↵Sven Gothel2023-03-083-2/+10
| | | | Consider applying it in default chooser?
* Graph: Font: Add equals() + hash() API doc; GraphUI's Label*.setText(): Only ↵Sven Gothel2023-03-083-15/+38
| | | | modify values if text and/or font differs, skipping markShapeDirty() saves performance.
* Graph GPUUISceneNewtDemo: Filter out all FSAA (multisample) caps if ↵Sven Gothel2023-03-082-10/+36
| | | | | | | | | | | | | | 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).
* [GL]Capabilities*: Enhance identity-check in root Capabilities.equals(..), ↵Sven Gothel2023-03-081-0/+109
| | | | | | | | | | comparing the VisualID first; Added VisualIDHolder.isVisualIDSupported(VIDType) We cannot accept 2 capabilities with different VisualID but same attributes otherwise accepted as equal, since the underlying windowing system uniquely identifies them via their VisualID. Such comparison is used in certail GLAutoDrawable implementations like AWT GLCanvas to determine a configuration change etc.
* PerfTextRendererNEWT00: Scale font to match screen witdh after producing the ↵Sven Gothel2023-03-071-10/+10
| | | | region, i.e. have a proper resolution independent layout.
* Graph Demos: Add 'JOGL line' and tweak PerfTextRendererNEWT00 a little to ↵Sven Gothel2023-03-073-21/+27
| | | | fit on small displays
* Graph Perf: PerfTextRendererNEWT00 Disable VSync per default (duh!)Sven Gothel2023-03-071-3/+8
| | | | PC 'regioned' perf enhanced a little bit, for some reason the RPI performance went down a tiny bit (fluctuations?).
* Graph Perf: Add Region.countOutlineShape(), Font.processString(Visitor2,..), ↵Sven Gothel2023-03-071-4/+13
| | | | TextRegionUtil.countStringRegion() allowing to use Region.setBufferCapacity()
* Graph Perf: Font*: Remove PerfCounterCtrl since the Region counter is more ↵Sven Gothel2023-03-071-4/+0
| | | | than enough
* GLArrayData: Promote sealed() from GLArrayDataEditable, to correctly being ↵Sven Gothel2023-03-073-3/+3
| | | | | | | | | | | | | | | | | | | | | | | 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-0710-27/+51
| | | | but recommended)
* Graph Perf Test: {Test->Perf}TextRendererNEWT00: Drop junit, ... (WIP)Sven Gothel2023-03-072-72/+58
| | | | | | | | Also tested w/ alternative JVM (Azul) .. works well, no big difference (but slower startup time, but might be OpenJDK 17->19 related as well). Printing usual system infos to make the test record useful. Cmdline is: com.jogamp.opengl.test.junit.graph.PerfTextRendererNEWT00 -es2 -Nperf -long_text -loop 40
* Clock: Use Clock.currentNanos() instead of System.nanoTime(); Enhancing ↵Sven Gothel2023-03-075-49/+97
| | | | | | FPSCounterImpl accuracy by maintaining timestamps in [ns] Idea: Perhaps we want to use [ns] for FPSCounter's method types by now?
* Graph Perf Counter: Use GlueGen's Clock.currentNanos() to ease on ↵Sven Gothel2023-03-071-70/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* Adapt to GlueGen dropping Platform.currentTimeMicros(), use ↵Sven Gothel2023-03-062-22/+26
| | | | Platform.currentTimeMillis()
* Graph: Use PerfCounterCtrl interface and Instant/Duration & ↵Sven Gothel2023-03-061-65/+77
| | | | Clock.getMonotonicTime() ...
* TestTextRendererNEWT00: Add '-perf' mode using new perf counter, testing on ↵Sven Gothel2023-03-061-25/+162
| | | | PC and raspi-aarch64 ..
* NEWT Screen: Allow injection of global (single) monitor size in [mm] via ↵Sven Gothel2023-03-051-0/+3
| | | | | | | | newt.ws.mmwidth and newt.ws.mmheight property This is essential on bare-metal devices where the screen DRM/GBM driver does not provide the screen-size (in mm). Otherwise we would have resolution/(size_mm=0) infinity density and none of our graph font demos would work, as we compute pixel-em-size based using dpi and pixel-pt-size.
* Movie* Demos: Add screenshots w/ 'S' key; Cleanup screenshot filename ↵Sven Gothel2023-02-255-16/+80
| | | | creation in other demos.
* Graph Region: Address overflow issue using GL2ES3 integer indices (WIP...); ↵Sven Gothel2023-02-2423-132/+143
| | | | | | | | | | | | | | | 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*: Shorten methods (*API Change*), use proper constructor and ↵Sven Gothel2023-02-245-5/+5
| | | | | | | | | | | | | 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 UI: Update demos, move pure demo code from demos/ui -> demos, rename ↵Sven Gothel2023-02-2312-129/+1431
| | | | test-shapes
* Graph: Update demos ..Sven Gothel2023-02-196-120/+177
|
* Graph Font.Metrics: Use unchanges sign of (+) ascent, (-) descent and (+) ↵Sven Gothel2023-02-192-3/+288
| | | | lineGap, document them properly and fix Font.getLineHeightFU()
* Graph Overflow Bug: Reorder TestTextRendererNEWT* tests from simple to ↵Sven Gothel2023-02-175-790/+805
| | | | complex example code, ascending
* Graph UI: Fix UIShape's PMVMatrix handling of getSurfaceSize, objToWinCoord ↵Sven Gothel2023-02-175-22/+67
| | | | and winToObjCoord (expect all set, no doubling); GLEventListenerButton: Resize FBO to screen-size for proper 1:1 quality
* Graph RoundButton: setDimension -> setSizeSven Gothel2023-02-171-1/+1
|
* Graph GPUUISceneGLListener0A: Prep for reshape_resize, notch up relative ↵Sven Gothel2023-02-171-40/+88
| | | | sizes a little
* Graph Demos: Formatting ..Sven Gothel2023-02-173-85/+82
| | | | GPUUISceneGLListener0A: Formatting and move reshape() after init()
* TestTextRendererNEWT01: Drop unused importSven Gothel2023-02-171-1/+0
|
* Graph: Fix Loop.initFromPolyline()'s Winding determination, document Winding ↵Sven Gothel2023-02-175-43/+403
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Graph Font: Enhance API doc (source of values), better get*Bounds() names, ↵Sven Gothel2023-02-161-1/+1
| | | | dropping redundant getMetricWidth*(); Fix getMetricBoundsFU()
* Graph Unit Tests: General cleanup, adding UITypeDemo01 w/ TestObject* to ↵Sven Gothel2023-02-169-52/+1400
| | | | determine CurveRenderer issues
* Graph UI: Move methods SceneUIController to UIShape public providing ↵Sven Gothel2023-02-164-172/+444
| | | | | | | | | | win<->obj coord transformation, enhance documentation a little, Have win<->obj coord transformation in UIShape public: - Move SceneUIController.transformShape() -> UIShape.setTransform() - Move SceneUIController.windowToShapeCoordsImpl() -> UIShape.winToObjCoord() - Add UIShape.objToWinCoord() - Add UIShape.getSurfaceSize()
* Graph: Merge UIListener01 + UINewtDemo01 -> UIShapeDemo01 to have simple ↵Sven Gothel2023-02-162-97/+0
| | | | test cases
* Graph: TextRegionUtil: Make addStringToRegion(..) versatile/usable w/ ↵Sven Gothel2023-02-152-45/+22
| | | | optional AffineTransform (see Label0)
* Graph TextRegionUtil: Move ShapeVisitor to OutlineShape.Visitor and ↵Sven Gothel2023-02-154-16/+9
| | | | | | | | | | processString(..) to Font, cleaning up .. Further having Font.processString() return the AABBox of the whole string's 'laidout' OutlineShapes, which is used for (debug) Font.getPointsBounds2(..) just to validate the coordinated with the Glyph based AABBox of Font.getPointsBounds(..). Static TextRegionUtil.drawString(..) no more require to pass the temp AffineTransform instances (ugly).
* Graph Font: getGlyph(char symbol -> int glyph_id), add kerning to ↵Sven Gothel2023-02-141-2/+2
| | | | getPointsBoundsFU(); Glyph: Drop getSymbol()
* Graph OutlineShape: Path2F alike sub-path ctor: Add z coordinate for custom ↵Sven Gothel2023-02-142-36/+35
| | | | plane.
* Graph Type Rendering: Drop pixelSize and use font em-size [0..1] throughout ↵Sven Gothel2023-02-1316-207/+196
| | | | | | | | | system. - All pixelSize metrics methods are dropped in Font* - TypecastGlyph.Advance dropped, i.e. dropping prescales glyph advance based on pixelSize - TextRegionUtil produces OutlineShape in font em-size [0..1] added to GLRegion - Adjusted demos
* Graph font/typecast: Adopt to our Typecast updates (see below); Fix kerning; ↵Sven Gothel2023-02-1210-164/+246
| | | | | | | | | Use TestTextRendererNEWT01 to produce validation snaps - Move kerning handling from Font to Font.Glyph using binary-search for right-glyph-id on kerning subset from this instance (left) - TextRegionUtil: Kerning must be added before translation as it applies before the current right-glyph. - TestTextRendererNEWT01 produces validation snapshots against LibreOffice print-preview snapshots - GPUTextRendererListenerBase01 added another text for kerning validation, show more font-size details (pt, px, mm)