| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
certain debug output to keep most silence for debugAll()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is an intrinsic + branch-less implementation
Expected implementation is
- return Float.intBitsToFloat(Float.floatToRawIntBits(a) & 0x7fffffff);
replacing old implementation
- return (a <= 0.0F) ? 0.0F - a : a;
.. also market as @IntrinsicCandidate
Hence we shall leave it to the JRE core-lib implementation...
|
|
|
|
| |
AffineTransform to local method; Simplify BaseButton setCorner(0) -> setPerp(); Protected abstract ctor ..
|
|
|
|
|
|
| |
EPSILON; Add isEqual(a,b) w/ default EPSILON; Use it where applicable
Also add isEqual2(a,b) w/o corner cases (NaN, Inf) used for comparison in Graph Outline, OutlineShape and later GraphUI Shape.
|
|
|
|
|
|
|
|
| |
API Change **
Since this is an extra implementation of PMVMatrix and not of GLMatrixFunc, we shall use the default ISO dimension avoiding conversion.
This alsi redefined Graph's RegionRenderer.reshapePerspective() angle definition from degrees to radians
|
|
|
|
|
|
| |
non-contour/whitespace Glyphs (detect and allow to skip 'em)
We also drop shapes for both, but for id 0 (unknown).
|
|
|
|
|
|
|
|
|
| |
ctor using Vec3f low and high
intersects2DRegion(..) got the passed width and height wrong,
i.e. given object low position >= this-low position
and given object high position including width/height <= this-high position
is required to match for intersection.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
addNotify(), leading to proper initialization sequence when re-adding panel.
The proper initialization sequence subsequently also leads to proper glViewport initialization,
see commit d17d807a76ba9cb940542264fcad9cf71c7ec585
No side-effects expected, just ensuring same code-path compared to initial addNotify().
|
|
|
|
|
|
| |
ensuring JOGL is completely initialized
Noteable: On MacOS 13.1 (aarch64) UISceneDemo20 won't show the window if NEWT is initialized before JOGL core via GLProfile.initSingleton().
|
|
|
|
| |
TODO: Full cleanup perhaps
|
|
|
|
|
|
|
|
|
| |
over ownership and allows destroy() to delete it, otherwise not. Fixes GraphUI's GLButton.
GraphUI's GLButton uses the offscreen's FBO texture and hence can't pass over ownership of the texture.
Hence the Texture instance is created w/o handing over ownership!
GLMediaPlayerImpl does hand over ownership of the generated and passed texture to the Texture ctor.
|
|
|
|
| |
AWT rendering thread support. Adopt it in tests and demos
|
|
|
|
| |
shall handle null streamWorker, i.e. when using NullGLMediaPlayer
|
| |
|
| |
|
|
|
|
|
|
|
| |
AudioSink.setChannelLimit() ..
May be utilized to enforce 1 channel (mono) downsampling
in combination with JOAL/OpenAL to experience spatial 3D position effects.
|
|
|
|
| |
270172bcbd91f96d4a38a3d73e23d744f57a25b8) and joal (commit 03f4bb63ce8a358b1c2ef303480e1887d72ecb2e)
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
with EventMask.Bit/EventMask
|
| |
|
| |
|
|
|
|
| |
in-place variant and use it in PMVMatrix dropping temporary
|
| |
|
| |
|
|
|
|
| |
instead of just GLArrayData interface, exposing and allowing mutable access to attribute location for interleaved sub-arrays
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
w/ Doxygen. Doxygen uses markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
15e60161787224e85172685f74dc0ac195969b51
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ..
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
OutlineShape.Visitor, allowing to use the Glyph (information).
|
|
|
|
| |
GLAutoDrawable.invoke(..) API doc: Add semantics about GLRunnable return value.
|
|
|
|
|
|
| |
90a95e6f689b479f3c3ae3caf4e30447030c7682
A null buffer is possible in case initialElementCount at ctor is <= 0
|
| |
|
| |
|
|
|
|
| |
API doc
|
|
|
|
| |
useProgram() only throw exception if 'on==true' is requested (disabling after delettion is OK)
|