aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
Commit message (Collapse)AuthorAgeFilesLines
...
* [PMV]Matrix[4f]: Clarify 'mulVec[34]f' in-place arg properties, add pure ↵Sven Gothel2023-04-282-16/+113
| | | | in-place variant and use it in PMVMatrix dropping temporary
* Vec[234]f: Add 'max' and 'min' functionSven Gothel2023-04-283-0/+45
|
* Graph GLRegion/TextRegionUtil: Enhance pre-determination of buffer-size, ↵Sven Gothel2023-04-203-33/+93
| | | | | | | | | | 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 -
* Graph OutlineShape.get{Outline->}VectexCount() renamedSven Gothel2023-04-201-1/+1
|
* GLArrayDataClient: Refine API doc for grow*() and reserve()Sven Gothel2023-04-201-2/+2
|
* Graph GLRegion*: Utilize interleaved GLSL buffers for vertices, curveParams ↵Sven Gothel2023-04-203-68/+105
| | | | | | | | | | | and the optional colors (GPU effeciency and performance; Increased CPU buffer growth performance) Besides simplification, interleaved GPU memory boosts - effeciency - performance Since only one underlying backing buffer on the CPU (host) has to be managed, it also increases buffer growth performance.
* GLArrayDataServer.addGLSLSubArray(): Return (actual) GLArrayDataWrapper ↵Sven Gothel2023-04-201-1/+1
| | | | instead of just GLArrayData interface, exposing and allowing mutable access to attribute location for interleaved sub-arrays
* Graph [GL]Region: Use small initial indices/vertices count (640 -> 16), ↵Sven Gothel2023-04-192-6/+9
| | | | | | since (huge) text glyph gets always pre-calculated. Region.countOutlineShape() indices ceiling raised from 60% to 90% of vertices, otherwise gets exceeded too often later on.
* Graph GLRegion: Consolidate pass-1 common data (indices, vertices, ..) and ↵Sven Gothel2023-04-192-14/+184
| | | | all related methods. Add growCount stat.
* Graph Region.addOutlineShape(): Fix DEBUG_INSTANCE path, enable perf counter ↵Sven Gothel2023-04-191-0/+3
| | | | if disabled.
* Graph: Region.countOutlineShape(..) -> static, allow usage w/o instance; ↵Sven Gothel2023-04-193-33/+40
| | | | | | | | TextRegionUtil.addStringToRegion() grow region buffer w/ counting (as well); GLRegion.create(..) count + reuse create(.., size) static-ctor All supported string -> region method utilize pre-calc of size and growth! Before, GraphUI's Label0 used TextRegionUtil.addStringToRegion() and hence missed this optimization path.
* Graph Font.getGlyphShapeBounds(): Use variant w/ 2 temp AffineTransform ↵Sven Gothel2023-04-181-2/+5
| | | | matching getGlyphBounds()
* Graph OutlineShape.checkOverlaps(): Test overlap first to drop ↵Sven Gothel2023-04-181-1/+1
| | | | overlaps.contains(..) test
* VectorUtil: Fix isVec3InTriangle3(..) testing p1, p2 and p3Sven Gothel2023-04-181-12/+8
|
* Graph + GraphUI: Consolidate Vertex: Drop SVertex and factory, use Vec[234]f ↵Sven Gothel2023-04-1815-956/+438
| | | | | | | | | | | 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()
* Typecast Font: Add API doc for getLineHeight(), remove unused Vec3f importSven Gothel2023-04-141-2/+14
|
* Graph OutlineShape: Add getOutlineVectexCount(), i.e. total vertex count of ↵Sven Gothel2023-04-141-0/+10
| | | | all Outlines
* Typecast Font.Glyph: Expose isUndefined(), i.e. name == ".notdef"Sven Gothel2023-04-141-0/+3
|
* Typecast: Expose (new) getGlyphCount(): GlyfTable.getSize() -> ↵Sven Gothel2023-04-141-0/+5
| | | | (OTFont,Font).getGlyphCount()
* Graph Region: Add NORM_RENDERING_BIT (0) for better documented usage; Add ↵Sven Gothel2023-04-141-0/+31
| | | | getRenderModeString(renderModes, graphSampleCount, fsaaSampleCount) for unified tech representation
* Graph/Math: Cleanup toString(), spacing and use System.lineSeparator()Sven Gothel2023-04-124-27/+21
|
* Matrix4f.mapWin*(): Drop unused temp matrices, map*() returns false on ↵Sven Gothel2023-04-092-335/+603
| | | | | | | | | | | | | | | | | | | | | | | | 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: Expose temporary storage (w/o side-effects) for efficiency; ↵Sven Gothel2023-04-081-1/+42
| | | | | | | GraphUI.Shape: Efficiently reuse matPMv and temporary PMVMatrix storage Reuse PMv in Shape.getSurfaceSize() and Shape.winToShapeCoord(), for the latter we invert the reused PMv for mapWinToObj (i.e. UnProject).
* PMVMatrix API doc: Use `` to quote code since {@code } causes block-quoting ↵Sven Gothel2023-04-081-5/+5
| | | | w/ Doxygen. Doxygen uses markdown
* PMVMatrix rewrite using Matrix4f, providing SyncMatrix4f* for GLUniformData; ↵Sven Gothel2023-04-0720-1416/+1524
| | | | | | | | | | | | | | | | | 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-052-89/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* AABBOX: Revert API doc copy/type errors from commit ↵Sven Gothel2023-04-051-7/+7
| | | | 15e60161787224e85172685f74dc0ac195969b51
* Math: Complete Matrix4f w/ Vec[234]f and adopt it throughout Quaternion, ↵Sven Gothel2023-04-0520-871/+3238
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 GLSL: Enable 'discard' in fragment shader w/o ↵Sven Gothel2023-03-301-5/+11
| | | | | | | | | GLRendererQuirks.GLSLBuggyDiscard to avoid overdraw of such regions. Historically we disabled `discard` due to an old NV tegra2 compiler bug, which caused the compiler to freeze. Today we no more seem to have this GLSL compiler issue, i.e. GLRendererQuirks.GLSLBuggyDiscard never gets set.
* Graph*: API doc refinementSven Gothel2023-03-301-1/+1
|
* Vec2f, Vec3f: Return this @ set(..), add set(float[]) and add(float, ..)Sven Gothel2023-03-302-22/+60
|
* Graph RenderState: Add setColorStatic(float[]) variantSven Gothel2023-03-281-0/+3
|
* Graph Font.GlyphVisitor*: Pass 'char symbol' to visitor, passing full ↵Sven Gothel2023-03-283-5/+8
| | | | text-processing information
* Graph Font.Glyph: Add getFont() (the owner)Sven Gothel2023-03-281-0/+3
|
* Graph FontScale: Simplify names, fix API doc and add unit testSven Gothel2023-03-281-27/+102
|
* Graph Font: Rename getBBox*() -> getBounds*() to preserve a common semantic nameSven Gothel2023-03-271-6/+6
|
* Quaternion: Shorten toString() type nameSven Gothel2023-03-271-1/+2
|
* Add Vec2f and Vec3f, to support a more simple OO vector-math usage, e.g. for ↵Sven Gothel2023-03-222-0/+528
| | | | | | | | animation etc Implementation borrowed my 'gfxbox2' C++ project <https://jausoft.com/cgit/cs_class/gfxbox2.git/tree/include/pixel/pixel3f.hpp#n29> and its layout from OpenAL's Vec3f.
* Graph: Remove OutlineShape.Visitor* as being replaced by Font.GlyphVisitorSven Gothel2023-03-222-24/+1
| | | | (We may ressurect them if needed for a future use case)
* Graph Font Processing: Use Font.GlyphVisitor instead of ↵Sven Gothel2023-03-224-19/+63
| | | | OutlineShape.Visitor, allowing to use the Glyph (information).
* GraphUI UISceneDemo*: Use lambdas for GLAutoDrawable.invoke(..) to reduce LOCSven Gothel2023-03-211-0/+7
| | | | GLAutoDrawable.invoke(..) API doc: Add semantics about GLRunnable return value.
* Graph: Cleanup Vertex.Factory referencing: Only bind to OutlineShape and use ↵Sven Gothel2023-03-213-43/+21
| | | | | | | 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'.
* GLArrayDataClient: Allow null buffer @ growIfNeeded(), removed from commit ↵Sven Gothel2023-03-201-20/+1
| | | | | | 90a95e6f689b479f3c3ae3caf4e30447030c7682 A null buffer is possible in case initialElementCount at ctor is <= 0
* GLOffscreenAutoDrawable: Remove unused importSven Gothel2023-03-201-2/+0
|
* Add FloatUtil.isZero(float) using FloatUtil.EPSILONSven Gothel2023-03-201-0/+8
|
* Graph: Add RegionRenderer.enable(..) variant w/ passing enable + disable ↵Sven Gothel2023-03-191-4/+15
| | | | GLCallback
* Graph: GLRegion.draw(): Mod curRenderModes by sampleCount { 0 = no-sampling, ↵Sven Gothel2023-03-191-1/+19
| | | | -1 = glSelect } (Experimental not working fully)
* Graph: GLRegion: Pass curRenderModes to updateImpl() + drawImpl(), prepare ↵Sven Gothel2023-03-192-8/+12
| | | | switch by sampleCount; Don't use any resource not requested by curRenderModes
* Graph : Misc API docSven Gothel2023-03-192-2/+5
|
* Graph: Add RenderState API doc; RegionRenderer: Remove unused shell method, ↵Sven Gothel2023-03-192-6/+8
| | | | left over from f8584748e33aab56780eca5cf7009a5a0d11991d