| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
code.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scene.pickShape(): Drop invisible and clipped shapes
After implementing Bug 1487 (Frustum Clipping/Culling) and using thousands of shapes within one Group mostly culled (outside of frustum),
overall mouse Scene.pickShape() caused tremendous lagging.
This is caused by Scene.pickShape() traversing through _all_ shapes,
rendered ones, invisible ones and culled ones.
+++
Solution is to have Scene and Group provide a pre-sorted list
of actually rendered shapes, i.e. isVisible() and not culled.
Scene.pickShape() can now use this reduced and pre-sorted list
reducing the load considerably.
+++
Further
- cleanup TreeTool
- rename Container methods:
-- setFrustumCullingEnabled() -> setPMvCullingEnabled()
-- isFrustumCullingEnabled() -> isPMvCullingEnabled()
- supply Container with
-- isCullingEnabled()
-- List<Shape> getRenderedShapes()
-- isOutside()
-- isOutside2()
-- forAllRendered()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RegionRenderer's RenderState usually rarely set from top of user API, reducing complexity.
Discussion:
Alternative was to pass AA-Quality same as SampleCount from the top (e.g. GraphUI Scene),
however, this convolutes the API even more.
Both parameter modify the resulting shader code in pass2 rendering (only).
The used 'renderMode' is still maintained within the Region,
since it contains more dynamic states individual to each Region instance (color-texture, ..).
This despite 'renderMode' also changes the RenderState's shader program.
In the end, it really doesn't matter and is a choice of frequency - the pipeline is
usually rendering from on OpenGL rendering thread sequentially.
AA-Quality and SampleCount simply usually don't change that often
and are set only once.
|
|
|
|
| |
sampleSet 3 -> 1 and fontSet 11 -> 7 to avoid footprint for default tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clipping funs for aaQuality/sampleCount; TextRegionUtil: Pass quality parameter in draw-functions
Region.DEFAULT_AA_QUALITY defaults to MAX_AA_QUALITY still
- TODO: AA shader is subject to change ..
Region.draw(..) clips the quality param (save)
TextRegionUtil: Pass quality parameter in draw-functions
- Allowing to select the AA shader
GraphUI Scene and some demos add the AA-quality param
to the status line or screenshot-filename.
- See Region.getRenderModeString(..)
+++
TestTextRendererNEWT20 and TestTextRendererNEWT21
now iterate through all fonts, AA-quality shader and sample-sizes.
Most demos and some more tests take AA-quality into acount,
demos via CommandlineOptions.graphAAQuality
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pass2-AA, revise Pass2 AA Quality parameter ..
Misc:
- Graph VBORegion2PVBAAES2: Drop unused FBO rescale
- Move MIN/MAX QUALITY/SAMPLE from GraphUI Scene -> Graph Region
+++
Quality -> Pass2 AA Quality
- Drop quality field in region
- Pass quality to GLRegion.draw(..) similar to sampleCount
for dynamic shader and switch
- TODO: Pass quality parameter in TextRegionUtil's functions
Fix RegionRenderer Shader Mapping
- Use ShaderKey class to properly implement the hash value and equals method
- For this, TextureSequence.getTextureFragmentShaderHashID() has been added
to provide actual shader-snippet for the equals function
- All required criterias are included in the hash value and equals method
Fix AABBox Clipping for Pass-2 AA
- Clipping in pass2-AA must happen in pass2 on actual gcu_PMVMatrix01 (not ortho)
+++
GraphUI GraphShape
- Rename: [get,set]{->AA}Quality()
GraphUI Scene
- Rename: mark{All->}ShapesDirty(), set{AllShapes->}Sharpness(), set{AllShapes->AA}Quality()
- Fix setSampleCount(..), i.e. markStatesDirty() not markShapesDirty()
- Fix setAAQuality(), markShapesDirty() and markStatesDirty(): Use forAll(..) to traverse through all shapes and groups.
GraphUI Group
- Add setFixedSize()
- Add setClipOnBox()
- Document setRelayoutOnDirtyShapes(), isShapeDirty()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a native dispatch'ed event like key/mouse/touch input
SIGSEGV on use after free of native X11 Display* at XEventsQueued in DisplayDriver.DispatchMessages0.
This potentially happens when an application destroys
the NEWT Window/Display from an action being called directly
from DisplayDriver.DispatchMessages0 (itself), i.e. keyboard or mouse input.
DisplayDriver.DispatchMessages0 stays in the event loop and the next
XEventsQueued call causes a SIGSEGV due to already deleted
display driver connection and hence invalid native X11 Display*.
This issue also exist for other Windowing System drivers,
where the native (dispatch) method sticks to a loop
and still (re)uses the window or display handle.
One is WindowsWindow, where touch events are looped,
but such handler could have closed the window.
Querying the status of a window / display instance before dispatching
is not be good enough
- resource could already be GC'ed, so we also would need to query jobject status
- would imply an addition Java callback
+++
This fix: Having the Java callbacks return
a boolean with the value Window.isNativeValid().
This way the dispatch logic
- can bail out right away w/o using the resource anymore
- must be reviewed by myself due to changed Call{Void->Boolean}*(..)
invocation change.
This review shall resolve potential similar issues.
+++
Tested on X11/Linux/GNU, Windows and MacOS
with new TestDestroyGLAutoDrawableNewtAWT,
which tests all destruction invocation variants.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ad38d1559854985b1131e5b6c7274a392b5bc265
Commit ad38d1559854985b1131e5b6c7274a392b5bc265 introduced XTranslateCoordinates(..) to savely validate
the client-space window position against the parent (root).
Totally missing in this change was the NEWT child window case
since it always used the root-window as the destination.
This change tracks the parent-window (valid parent Window or NULL)
within the JavaWindow struct and either uses the parent-window
if available or the root-window for XTranslateCoordinates(..).
This results in the proper client-space position.
Validated against
- TestGearsES2NewtCanvasAWT
- TestBug1431NewtCanvasAWT
on Debian 12 w/ Java17.
|
| |
|
|
|
|
|
|
|
|
|
| |
traversing through all Glyphs
See UISceneDemo03
new Button(options.renderModes, fontSymbols, " "+fontSymbols.getUTF16String("pause")+" ", buttonWidth, buttonHeight); // pause
Unicode codepoint symbol is also contained in FontGlyph
|
|
|
|
| |
GlyphShape by adding a BoxLayout w/ Center and parent Group w/ GridLayout FillCenter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
[1..8]; Add clarity in Region; Demos CommandlineOptions adds actual graphAASamples set and utilized
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
tests for now
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ...
|
|
|
|
| |
AWT rendering thread support. Adopt it in tests and demos
|
|
|
|
| |
gap) for test case to compare pixel-by-pixel
|
|
|
|
| |
Also tested with Sofr-HiDPI on Linux using GDK_SCALE=2
|
|
|
|
| |
(and fwd 'em to RenderState aggregate)
|
|
|
|
| |
avoid side-effects. Usually called @ GLEventListener.init(..)
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
propagated properly to our AWT GLCanvas and NEWT
|
|
|
|
| |
blocking native change by monitor-pixelScale (Windows, X11)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
-
|
|
|
|
|
|
| |
to match old screenshots for regression test.
No rendering regressions w/ last Graph changes found.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
| |
resolution independent for display same size.
|
|
|
|
| |
FontView01 demos) rendering a grid of each glyph for better validation for many fonts and renderModes/sampleCount
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ..
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
and destroys it. Dropping this also from user (complexity).
|
|
|
|
| |
GraphUI.Scene using RegionRenderer's viewport (no duplicate)
|