summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1310: Detect missing glViewport(..) on Windows before ↵Sven Gothel2023-08-181-2/+24
| | | | | | | | | | | | | | | | | GLEventListener.reshape(..) when re-adding GLJPanel When re-adding GLJPanel on Windows glViewport() is not called through - GLJPanel.Updater.display() - GLDrawableHelper.reshape() - GLDrawableHelper.setViewportAndClear() Instead the following sequence is called due to sendReshape == false: - GLJPanel.Updater.display() - GLDrawableHelper.display() ** missing glViewport(..) ** This bug is not visible on X11 or MacOS since the glViewport is only set to a different user value on Windows ...
* Animator*: Add ctor variants passing modeBits directly, i.e. enable/disable ↵Sven Gothel2023-08-1339-673/+731
| | | | AWT rendering thread support. Adopt it in tests and demos
* FontViewListener01/TestTextRendererNEWT21: Use 30 pixelPerCell (total w/ ↵Sven Gothel2023-08-121-10/+21
| | | | gap) for test case to compare pixel-by-pixel
* Test Bug1310: Remove and re-add a GLJPanel from its Swing parent (working)Sven Gothel2023-08-071-0/+246
| | | | Also tested with Sofr-HiDPI on Linux using GDK_SCALE=2
* Graph: Simplify RegionRenderer API by exposing common RenderState methods ↵Sven Gothel2023-08-028-28/+22
| | | | (and fwd 'em to RenderState aggregate)
* Graph RegionRendered.init(..): Disable renderer (and shader programs etc) to ↵Sven Gothel2023-08-011-2/+1
| | | | avoid side-effects. Usually called @ GLEventListener.init(..)
* HiDPI: Revise AWT GLCanvas/GLJPanel ScalableSurface: No setSurfaceScale(), ↵Sven Gothel2023-05-152-2/+211
| | | | | | | | | | | have AWT toolkit define pixelScale only (simplification) This aligns with Glenn's initial AWT patch commit e5e7514d649cd7dd28bbb8e04b72338dc09c2c83, i.e. removing redundancies... Tested on Linux, Windows and MacOS w/ GLCanvas, GLJPanel and GLWindow using pixelScale values: - Linux: 1, 2 - Windows: 1, 1.25, 2 - MacOS: 1, 2
* HiDPI: Complete testing on Windows (AWT, NEWT, AWT+NEWT): AWT pixel scale ↵Sven Gothel2023-05-142-4/+10
| | | | propagated properly to our AWT GLCanvas and NEWT
* HiDPI AWT/NEWT: Propagate AWT enforced pixelScale via setSurfaceScale() ↵Sven Gothel2023-05-142-12/+705
| | | | blocking native change by monitor-pixelScale (Windows, X11)
* HiDPI: TestGearsES2NEWT: Show MonitorDevice properties, validating pixelScaleSven Gothel2023-05-131-0/+5
|
* GraphUI Working GridLayout w/ and w/o cell-size and alignment; Added BoxLayout.Sven Gothel2023-04-291-2/+3
|
* Graph GLRegion/TextRegionUtil: Enhance pre-determination of buffer-size, ↵Sven Gothel2023-04-205-8/+11
| | | | | | | | | | increase default initial 16->64 (unsued) - Region.countOutlineShape(..) now returns unpatched 3*triangle value for indices, avoiding grow - TextRegionUtil.addStringToRegion() uses countStringRegion(..) per default - Added GLRegion.create(.., OutlineShape) for convenience, using Region.countOutlineShape(..) - Refined API doc -
* GraphUI Test: Have TestTextRendererNEWT21's FontViewListener01 use 8mm/cell ↵Sven Gothel2023-04-181-1/+1
| | | | | | to match old screenshots for regression test. No rendering regressions w/ last Graph changes found.
* GraphUI Padding: Use CSS alike ctor semantics, hence swizzle ctor argumentsSven Gothel2023-04-181-1/+1
|
* Graph + GraphUI: Consolidate Vertex: Drop SVertex and factory, use Vec[234]f ↵Sven Gothel2023-04-182-3/+4
| | | | | | | | | | | 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 Demo/Test: FontView[Listener]01: Use 10 'mmPerCell', Monitor ↵Sven Gothel2023-04-141-6/+24
| | | | resolution independent for display same size.
* GraphUI Tests: Add TestTextRendererNEWT21 using FontViewListener01 (like ↵Sven Gothel2023-04-142-0/+458
| | | | FontView01 demos) rendering a grid of each glyph for better validation for many fonts and renderModes/sampleCount
* Graph Unit Tests: Minor edits: Wait for GLRunnable done on screenshot, ...Sven Gothel2023-04-143-3/+6
|
* Matrix4f.mapWin*(): Drop unused temp matrices, map*() returns false on ↵Sven Gothel2023-04-096-80/+174
| | | | | | | | | | | | | | | | | | | | | | | | invPMv null; PMVMatrix: Make Mvi, Mvit optional at ctor, add user PMv and PMvi - used at gluUnProject() .. Matrix4f.mapWin*() variants w/ invPMv don't need temp matrices, they also shall handle null invPMv -> return false to streamline usage w/ PMVMatrix if inversion failed. PMVMatrix adds user space common premultiplies Pmv and Pmvi on demand like Frustum. These are commonly required for e.g. gluUnProject(..)/mapWinToObj(..) and might benefit from caching if stack is maintained and no modification occured. PMVMatrix now has the shader related Mvi and Mvit optional at construction(!), so its backing buffers. This reduces footprint for other use cases. The 2nd temp matrix is also on-demand, to reduce footprint for certain use cases. Removed public access to temporary storage. +++ While these additional matrices are on demand and/or at request @ ctor, general memory footprint is reduced per default and hence deemed acceptable while still having PMVMatrix acting as a core flexible matrix provider.
* PMVMatrix rewrite using Matrix4f, providing SyncMatrix4f* for GLUniformData; ↵Sven Gothel2023-04-0740-1039/+727
| | | | | | | | | | | | | | | | | Utilize Vec3f, Recti, .. throughout API (Matrix4f, AABBox, .. Graph*) Big Easter Cleanup - Net -214 lines of code, despite new classes. - GLUniformData buffer can be synced w/ underlying data via SyncAction/SyncBuffer, e.g. SyncMatrix4f + SyncMatrices4f - PMVMatrix rewrite using Matrix4f and providing SyncMatrix4f/Matrices4f to sync w/ GLUniformData - Additional SyncMatrix4f16 + SyncMatrices4f16 covering Matrix4f sync w/ GLUniformData w/o PMVMatrix - Utilize Vec3f, Recti, .. throughout API (Matrix4f, AABBox, .. Graph*) - Moved FloatUtil -> Matrix4f, kept a few basic matrix ops for ProjectFloat - Most, if not all, float[] and int[] should have been moved to proper classes - int[] -> Recti for viewport rectangle - Matrix4f and PMVMatrix is covered by math unit tests (as was FloatUtil before) -> save Passed all unit tests on AMD64 GNU/Linux
* Matrix4f Perf: Enhance invert(), Drop (test) load on Matrix4f.mul(Matrix4f) ↵Sven Gothel2023-04-053-98/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for fair and realistic numbers - Both mul() ops faster than FloatUtil Enhanced invert() of Matrix4f* and FloatUtil: Use 1f/det factor for burst scale. Enhanced Matrix4f.invert(..): Use factored-out mulScale() to deliver the scale, giving a good 10% advantage on aarch64 and amd64. Brings Matrix4f.invert(..) on par w/ FloatUtil, on aarch64 even a 14% advantage. +++ TestMatrix4f02MulNOUI added an additional Matrix4f.load() to the mul(Matrix4f) loop test, which surely is an extra burden and not realistic as the mul(Matrix4f, Matrix4f) and FloatUtil pendants also don't count loading a value. Matrix4f.mul(Matrix4f) shall be used to utilize an already stored value anyways. Matrix4f.mul(Matrix4f) didn't really exist in FloatUtil. Same is true for Matrix4f.invert(), re-grouped order, i.e. pushing the non-arg variant last. +++ Revised performance numbers from commit 15e60161787224e85172685f74dc0ac195969b51 AMD64 + OpenJDK17 - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.mul(a, b) roughly ~10% faster than FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~18% faster than FloatUtil.multMatrix(a, b, dest) (*) - Matrix4f.invert(a) roughly ~ 2% faster than FloatUtil.invertMatrix(..) - Matrix4f.invert() roughly ~ 4% slower than FloatUtil.invertMatrix(..) (*) - Launched: nice -19 scripts/tests-x64.sh RaspberryPi 4b aarch64 + OpenJDK17 - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.mul(a, b) roughly ~ 9% faster than FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~14% faster than FloatUtil.multMatrix(a, b, dest) (*) - Matrix4f.invert(a) roughly ~14% faster than FloatUtil.invertMatrix(..) - Matrix4f.invert() roughly ~12% faster than FloatUtil.invertMatrix(..) (*) - Launched: nice -19 scripts/tests-linux-aarch64.sh (*) not a true comparison in feature, as operating on 'this' matrix values for one argument, unavailable to FloatUtil. Conclusion - Matrix4f.mul(..) is considerable faster! - Matrix4f.invert(..) faster, esp on aarch64 And additional Matrix4fb tests using float[16] similar to FloatUtil also demonstrates less performance compared to Matrix4f using dedicated float fields.
* TestAWTCardLayoutAnimatorStartStopBug532: Suppress warningsSven Gothel2023-04-051-1/+10
|
* Math: Complete Matrix4f w/ Vec[234]f and adopt it throughout Quaternion, ↵Sven Gothel2023-04-0513-408/+3218
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ray, AABBox, Frustum, Stereo*, ... adding hook to PMVMatrix Motivation was to simplify matrix + vector math usage, ease review and avoid usage bugs. Matrix4f implementation uses dedicated float fields instead of an array. Performance didn't increase much, as JVM >= 11(?) has some optimizations to drop the array bounds check. AMD64 + OpenJDK17 - Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~3% slower than FloatUtil.multMatrix(a, b, dest) - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.invert(..) roughly ~3% slower than FloatUtil.invertMatrix(..) RaspberryPi 4b aarch64 + OpenJDK17 - Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~20% slower than FloatUtil.multMatrix(a, b) - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.invert(..) roughly ~4% slower than FloatUtil.invertMatrix(..) Conclusion - Matrix4f.mul(b) needs to be revised (esp for aarch64) - Matrix4f.invert(..) should also not be slower ..
* Graph FontScale: Simplify names, fix API doc and add unit testSven Gothel2023-03-285-4/+66
|
* Graph Font: Rename getBBox*() -> getBounds*() to preserve a common semantic nameSven Gothel2023-03-271-2/+2
|
* Graph: Cleanup Vertex.Factory referencing: Only bind to OutlineShape and use ↵Sven Gothel2023-03-213-4/+4
| | | | | | | its default. GraphUI: Always use default. Graph RegionRenderer, its RenderState as well as GraphUI's Scene don't need to have knowledge of Vertex.Factory, which is only used within OutlineShape and its 'inner geom workings'.
* API doc cleanup, add + refine math testsSven Gothel2023-03-1913-11/+547
| | | | API doc
* Graph: Make RenderState a composition of RegionRenderer, which also creates ↵Sven Gothel2023-03-1510-83/+44
| | | | and destroys it. Dropping this also from user (complexity).
* Graph: Have RegionRenderer.reshapeNotify(..) track x/y as well (vieport); ↵Sven Gothel2023-03-141-1/+1
| | | | GraphUI.Scene using RegionRenderer's viewport (no duplicate)
* 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