| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ..
|
|
|
|
| |
text-processing information
|
| |
|
| |
|
| |
|
|
|
|
| |
OutlineShape.Visitor, allowing to use the Glyph (information).
|
|
|
|
| |
modify values if text and/or font differs, skipping markShapeDirty() saves performance.
|
|
|
|
| |
TextRegionUtil.countStringRegion() allowing to use Region.setBufferCapacity()
|
|
|
|
| |
than enough
|
|
|
|
| |
but recommended)
|
|
|
|
| |
Clock.getMonotonicTime() ...
|
| |
|
|
|
|
| |
(redundant), add getLeftSideBearings*() from htmx table; Flatten TypecastGlyph impl by merging its Metrics, add equal() complementing hashCode()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mapping, rely on no-shape for 'space' non-contour.
Drop erroneous Glyph ID_SPACE, ID_CR to rely on no-shape for 'space' non-contour
resolves different cmap-mappings of fonts, not following 'some std'.
Hence getGlyph(glyph_id) no more uses the `font.getGlyph(Glyph.ID_UNKNOWN)` shape,
but a null-shape as intended and using the hmtx and hhea table values for asvance and bounds.
This fixes 'space' spacing in general and specifically FreeSerif-Regular and the like.
This path also simplifies processing/layout of glyphs in process(..) and get*BoundsFU(..).
|
|
|
|
| |
lineGap, document them properly and fix Font.getLineHeightFU()
|
|
|
|
| |
dropping redundant getMetricWidth*(); Fix getMetricBoundsFU()
|
|
|
|
|
|
|
|
|
|
| |
processString(..) to Font, cleaning up ..
Further having Font.processString() return the AABBox of the whole string's 'laidout' OutlineShapes,
which is used for (debug) Font.getPointsBounds2(..) just to validate the coordinated with
the Glyph based AABBox of Font.getPointsBounds(..).
Static TextRegionUtil.drawString(..) no more require to pass the temp AffineTransform instances (ugly).
|
|
|
|
| |
getPointsBoundsFU(); Glyph: Drop getSymbol()
|
|
|
|
|
|
|
|
|
| |
system.
- All pixelSize metrics methods are dropped in Font*
- TypecastGlyph.Advance dropped, i.e. dropping prescales glyph advance based on pixelSize
- TextRegionUtil produces OutlineShape in font em-size [0..1] added to GLRegion
- Adjusted demos
|
|
|
|
|
|
|
|
|
| |
Use TestTextRendererNEWT01 to produce validation snaps
- Move kerning handling from Font to Font.Glyph using binary-search for right-glyph-id on kerning subset from this instance (left)
- TextRegionUtil: Kerning must be added before translation as it applies before the current right-glyph.
- TestTextRendererNEWT01 produces validation snapshots against LibreOffice print-preview snapshots
- GPUTextRendererListenerBase01 added another text for kerning validation, show more font-size details (pt, px, mm)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
original font-units (FU) to have them scaled later ( fu * pixelScale / unitsPerEM )
Scaling from font-units (funits, or FU) is now performed by the renderer itself,
i.e. applying the scale-factor 'fontPixelSize / font.getMetrics().getUnitsPerEM()'
to the PMV matrix to render the whole graph GLRegion.
This finally provides proper device and resolution independent font utilization.
Further, preliminary kerning has been added.
+++
Also ...
TypecastFont:
- getGlyphID(..) getGlyph(..) enforce symbol mapping to Glyph.ID_SPACE Glyph.ID_CR,
as some fonts ave an erroneous cmap (FreeSerif-Regular)
- add getKerning(..)
TODO: Add binary search
- Set TypecastFont.USE_PRESCALED_ADVANCE := false,
i.e. dropping all prescaled pixel-sized advance values mapped to font pixel-size
as we utilize font-units only for later uniform scaling.
- Drop virtual getPixelSize() and add static FontScale.toPixels(..)
- Add fullString() for debugging purposed, including some font tables
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
d78bb1be0a6290cb94918b21865a023c01825048
- Skip relative lookup for IOUtil.ClassResources using 'asset' only (from JAR file)
- Tested w/ jar file and build-dir, see scripts/tests.sh 'USE_BUILDDIR'
|
|
|
|
|
|
| |
bd24599b21f9787ac989e65b44dc1ba762162f22
- add missing PrivilegedAction around tempFile[0].delete()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
628509b39ea7c16210315d191860511d6be4aa69)
FontFactory Remove:
- Font get(final URLConnection conn)
- Font get(final InputStream stream)
FontFactory Add:
- [1] Font get(final InputStream stream, final int streamLen, final boolean closeStream)
- Direct usage of font InputStream w/ determined length,
may instantiate BufferedInputStream in case given stream
doesn't support mark/reset!
- [2] Font get(final InputStream stream, final boolean closeStream)
- Copy font InputStream w/o determined length,
resulting in BufferedInputStream supporting mark/reset!
Security Related:
- Only perform priviledged code on determine InputStream,
_not_ when parsing the font stream itself!
- Hence PrivilegedAction only happens in FontFactory's
InputStream preparation.
Misc:
- Use Uri class
|
|\ |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in shader; Update attributes and uniforms manually, drop ShaderState;
- ShaderCode
- add int insertShaderSource(int shaderIdx, int position, Class<?> context, String path)
- insertShaderSource(..): pos==-1 -> append code
- VectorUtil
- add isVec3InTriangle3(..., float epsilon)
- add testSeg2SegIntersection(..., float epsilon)
- add testTri2SegIntersection(..., float epsilon)
- AffineTransform: Return result for chaining
- Font
- Add pixel precise 'getPointsBounds(final AffineTransform transform, CharSequence string, float pixelSize)'
- Rename getString*() -> getMetric*()
- OTGlyph: Release _points field, no more used
-
- Graph Triangulation
- Count additional vertices in: Triangulator, CDTriangulator2D
- OutlineShape:
- Allow skipping of 'transformOutlines2Quadratic', i.e. allow tagging
OutlineShape to be quadratic_nurbs via 'setIsQuadraticNurbs()'
- Clarify cleanup ot outlines in same method 'cleanupOutlines()'
- Count additional vertices ..
- Graph Shader:
- Start splitting and segmenting shader code for:
- pass1 / pass2
- features, i.e. sampleCont, color-channel, ..
|
|
|
|
| |
(performance, reduce temp objects)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Proper FontSize -> PixelSize
VBAA Render-Mode Based on SampleCount (not a user-based texWidth)
- All Region based APIs now use 'sampleCount' instead of 'texWidth'
- VBORegion2PES2 calculates perspective FBO width/height considering the sampleCount
Proper FontSize -> PixelSize
- Font: Add getPixelSize(fontSize, dpi)
- Text* Demos/Classes: Use proper fontSize -> PixelSize
|
| |
|
|
|
|
|
|
| |
Minor edits:
- Add some docs to curve-shader and remove FIXME remark about gcu_Alpha, which will be used < 1.0.
- Font: Add more TTF references
|
|
|
|
| |
Better separation of cached and uncached regions
|
|
|
|
|
|
|
|
|
| |
Glyph/Typecast* ; Misc Cleanup
Commit c3621221b9a563495b4f54fe60e18e8db8cc57fb introduced
create an OutlineShape per Glyph from it's data w/o going through Path2D.
Misc Cleanup: Remove unused code/fields, use private/final where possible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Strategy Change:
- Font.Glyph itself holds it's OutlineShape
with it's default scaling.
Triangulation is done only once per glyph!
- A CharSequence produces a Region
by translating and scaling each Glyphs's OutlineShape.
This removes the need for re-triangulate - see above.
See: TextRendererUtil
- The indices of re-added Triangles are
offset to the new vertices (FIXME, seems not be be accurate yet).
- OutlineShape's vertices and triangles are reused if 'clean'.
- Simplified code
- Reduced copies
API Changes:
- OutlineShape, Region, ...: See above
- Removed TextRenderer, GlyphShape and GlyphString: Redundant
- Added TextRendererUtil to produce the Region from CharSequence
Result:
- Over 600 fps while changing text for each frame.
Previously only ~60fps max.
TODO:
- Region shall not hold the triangles itself,
but the indices instead.
This will remove the need to swizzle w/ vertices in the Region Renderer impl
and easies reusage of OutlineShapes.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
make/scripts/tests.sh
src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java
src/jogl/classes/com/jogamp/graph/curve/Region.java
src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java
src/jogl/classes/com/jogamp/graph/font/Font.java
src/jogl/classes/com/jogamp/opengl/math/VectorUtil.java
src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java
src/jogl/classes/jogamp/graph/curve/text/GlyphString.java
src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java
src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
|
| |
| |
| |
| | |
Signed-off-by: Harvey Harrison <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Harvey Harrison <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
and CR/ENTER are printable for NEWT KeyEvent and font handling. Fix regression.
- Original behavior was treating CR/ENTER them as printable, lets keep it this way.
- KeyEvent: Query these 3 whitespaces upfront, no need to incl. them in 'nonPrintableKeys'.
- Fix regression: Native VK_ENTER was not change in commit 4c34f5980bddcdc84b10cb3bcbb96b365b9d471e.
|
| |
| |
| |
| |
| |
| |
| |
| | |
minimize footprint. Review of Harvey.
Since accessing the static final exposed strings would trigger static initialization,
setting the properties this way would not work anyways (if not inlined ..).
Well.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
com.jogamp.opengl.math.geom packages
Note: WIP - We may relocate / reorg math package.
Public relocations:
com.jogamp.opengl.util -> com.jogamp.opengl.math
- FixedPoint
- FloatUtil
com.jogamp.graph.math -> com.jogamp.opengl.math
- Quaternion
- VectorUtil
com.jogamp.graph.geom -> com.jogamp.opengl.math.geom
- AABBox
VectorUtil:
Introducing Vert2fImmutable and Vert3fImmutable interfaces, allowing graph Vertex instances
to be used 'graph' agnostic and to document 2d/3d use-cases.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remark: This commit is unclean and requires 'Part-1b' due to
merging this commit after more than 2 years!
Graph:
- Use List<OutlineShape> instead of array
allowing more flexible memory managment.
- GLRegion -> Region promotion:
- Region create(List<OutlineShape> outlineShapes, int renderModes)
- Region create(OutlineShape outlineShape, int renderModes)
- Region additions
- void addOutlineShape(OutlineShape shape)
- void addOutlineShapes(List<OutlineShape> shapes)
- RegionRenderer
- draw(..) remove 'position', redundant
-
- Deprecate 'TextRenderer' and 'GlyphString'
Use Region.create(Font.getOutlineShapes(...)) + RegionRenderer instead.
- FontInt -> Font promotion (make public)
- getOutlineShape and getOutlineShapes
- Font.Glyph additions
- 'getID(), hashCode()'
- 'float getScale(float pixelSize)'
- GlyphShape
- Add reference to Glyph allowing GlyphString
to access the font metrics for translation and scaling
- Experimental pre-scale/translation in GlyphString
using default font size and it's metrics
|
|
|
|
|
| |
Font::getAdvancedWidth(..) allows applications to query a glyphs width
with a given pixel size, as it is being used for rendering.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
API doc enhancements; Minor edits
- API doc added/enhanced:
- ShaderCode
- ShaderUtil
- NewtBaseActivity: Clarify method / var names
|