| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
(Convenient using Graph/GraphUI produced AABBox)
Simple demo, setting clip-bbox manually:
- src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeClippingDemo00.java
TODO:
- GLSL: Add missing Mv-multiplication of vertex-position -> gcv_ClipBBoxCoord
-- AABBox min/max should be set pre-multiplied w/ Mv covering an independent area, not per Shape/Region.
-- This to properly work with moving/scaling of each Shape/Region etc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
min/max vec3 as convenient using Graph/GraphUI produced AABBox
USE_AABBOX_CLIPPING
- Conditional compilation w/ macro 'USE_AABBOX_CLIPPING'
- gcv_ClipBBoxCoord smooth varying setup in vertex shader
- fragment shader clips via branch
if( is_inside(gcv_ClipBBoxCoord, gcu_ClipBBox[0], gcu_ClipBBox[1]) < 0.5 ) { CLIP }
- clipping via discard or alpha=0 in case of buggy-discard.
Other optimization:
- Drop gcv_ColorTexExt, fragment-shader uses gcu_ColorTexBBox[2] directly (flat)
- Simplified gcv_ColorTexCoord smooth varying equation in vertex shader.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'and'/'or' semantic (swapped); Add EPSILON in clip_coord(..) and add is_inside(..) function
Complete overload vec2 and vec3 variants
Fix 'and'/'or' semantic (swapped)
- 'and' uses multiplication, i.e. all arguments must be > 0 (ideally 1)
- 'or' uses addition, i.e. only one arguments must be > 0 (ideally 1)
- both uses clamp [0..1]
Add EPSILON in clip_coord(..)
- Only 'coord > high+EPSILON' is outside
Add is_inside(..) function
- Similar to clip_coord(..) but returns float 0 or 1
instead of selecting color.
|
|
|
|
| |
'curverenderer01-pass1.vp' (commit 297c48f4fefd1ab59800524ea5f0dd56684d6786)
|
|
|
|
| |
instead hard coded branch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aspect-ratio, letter-boxed or zoomed (config) + Bug 1466 Fix color mixing
Bug 1465: Region currently simply bloats a given texture to its region AABBox,
which renders textures with the wrong aspect ratio.
Add facility to program the texture-coordinates to either letter-box
or scaled-up (and cut) true aspect-ratio.
Default shall be zoom (scale-up and cut),
but user shall be able to set a flag in the Region for letter-box.
Have the shader clip texture coordinates properly,
best w/o branching to soothe performance.
See functions.glsl
+++
Bug 1466: Current color mix: texture * color_channel * color_static
is useless in GraphUI.
color_static shall modulate the texture, which works.
But in case of color_channel (attribute/varying)
we want it to be mixed so it can become the more dominant color
for e.g. a border.
Desired is:
color = vec4( mix( tex.rgb * gcu_ColorStatic.rgb, gcv_Color.rgb, gcv_Color.a ),
mix( tex.a * gcu_ColorStatic.a, 1, gcv_Color.a) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
height exceeding overall CharSequence
TypecastFont using `metrics.getAscentFU() - metrics.getDescentFU()` for ascent used for all undefined and whitespace Glyphs w/o a spatial outline,
leads to a potential exceeding height compared to the actual used
bounding box of the rendered text.
This in turn leads to layout issues, e.g. button labels are placed too low.
Solution:
- Whitespace/Undefined: Drop full height 'metrics.getAscentFU() - metrics.getDescentFU()', b/c of non-existing shape height.
- Otherwise, layout on AABBox or created empty shape would pick up such default hhea-table ascent which might exceed actual string height.
Sideeffect would be if user relies on height of a whitespace.
However, knowing this fact - a user may always pick the hhea-table's ascent metric values as exposed in Font and Font.Metric.
This resolves remaining layout issues, including button labels.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
in UISceneDemo03 via hard coded unicode symbol numbers
|
|
|
|
| |
synchronized for static fontMap field access
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
underlying shape' and add API doc
Regression was introduced with commit 920e529516bb264f04138ed1caca80d4925e3773
'Robust detetection and API definition of non-contour/whitespace Glyphs'.
Issue was mistaken a glyph as undefined if not having an underlying shape,
which is true for some fonts (e.g. 'space').
+++
Also Use post table's name if no underlying shape exists.
|
|
|
|
| |
TypecastFont
|
|
|
|
|
|
| |
non-contour/whitespace Glyphs (detect and allow to skip 'em)
We also drop shapes for both, but for id 0 (unknown).
|
|
|
|
|
|
| |
report error but do not crash.
This behavior has been evaluated with a few fonts and the WIP FontView01 demo application.
|
|
|
|
| |
texture unit after ctor
|
|
|
|
|
|
|
| |
simplify inclusion in distribution; UbuntuFontLoader's Uri is patched accordingly.
This font jar file is actually not an atomic in the sense it being aggregated to e.g. jogl-all.jar or even a fat jar.
Hence it is more suitable to have it all visible in the top-dir next to the main jars.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Loop.initFromPolyline(..) outline.getGraphPoint().size() < 3 IllegalArgumentException
This issue has to be added to our CD ..
/*
* Font FreeMono-Bold: ID 0 + 465: Glyph[id 465 'uni020F', advance 600, leftSideBearings 42, kerning[size 0, horiz true, cross true], shape true], OutlineShape@5e8a459[outlines 2, vertices 34]
Drop innerPoly ctrlpts < 3
- innerPo[vertices 2, ctrlpts 2] < 3
- outline[vertices 4, ctrlpts 4]
- Input[vertices 4]
*
* Font FreeSans-Regular: ID 0 + 409: Glyph[id 409 'Udieresiscaron', advance 720, leftSideBearings 80, kerning[size 0, horiz true, cross false], shape true], OutlineShape@5eb97ced[outlines 3, vertices 33]
Drop innerPoly ctrlpts < 3
- innerPo[vertices 1, ctrlpts 1] < 3
- outline[vertices 1, ctrlpts 1]
- Input[vertices 1]
* Stack:
at jogamp.graph.curve.tess.CDTriangulator2D.addCurve(CDTriangulator2D.java:97)
at com.jogamp.graph.curve.OutlineShape.triangulateImpl(OutlineShape.java:988)
at com.jogamp.graph.curve.OutlineShape.getTriangles(OutlineShape.java:1012)
at com.jogamp.graph.curve.Region.countOutlineShape(Region.java:503)
at com.jogamp.graph.ui.shapes.GlyphShape.<init>(GlyphShape.java:77)
*/
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
BITHINT_GLOBAL_DEPTH_TEST_ENABLED usage -> To be investigated.
|
|
|
|
| |
all related methods. Add growCount stat.
|
|
|
|
| |
matching getGlyphBounds()
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
| |
isWhiteSpace = true, use emptyShape
|
| |
|
|
|
|
| |
(OTFont,Font).getGlyphCount()
|
| |
|
|
|
|
| |
even a Glyph was mapped to the ID
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ..
|
|
|
|
| |
discard, even though technically allowed (ignored after discard)
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
isWhitespace() continue w/ AABBox resize, but don't earmark this (whitespace) glyph for next left_glyph (kerning).
|
|
|
|
| |
text-processing information
|
| |
|
| |
|
|
|
|
| |
Regression from commit a5d593478afa2298282a0624b2490fde84c3a292
|
|
|
|
| |
OutlineShape.Visitor, allowing to use the Glyph (information).
|
|
|
|
| |
to allow better handling of such non-contour symbols.
|
|
|
|
|
|
|
| |
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'.
|
|
|
|
| |
switch by sampleCount; Don't use any resource not requested by curRenderModes
|
|
|
|
|
|
|
|
|
| |
67a723477ecd818fbc5859fe20ee536a3b4efae5 (reverting and clarifying)
All Graph ShaderPrograms used are owned by RegionRenderer, not RenderState nor [GL]Region*,
hence [GL]Region* shall only nullify the resources but not destroy the shader currently in use.
One RegionRenderer maybe used for multuple Regions.
|
|
|
|
| |
GraphUI.Scene using RegionRenderer's viewport (no duplicate)
|
|
|
|
| |
and is references.
|
|
|
|
| |
modify values if text and/or font differs, skipping markShapeDirty() saves performance.
|