aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
Commit message (Collapse)AuthorAgeFilesLines
* VectorUtil: Remove double InCircleDThreshold = DoubleUtil.EPSILONSven Göthel2024-02-142-6/+7
|
* DoubleUtil: Align Epsilon ops w/ FloatUtilSven Göthel2024-02-142-14/+34
|
* FloatUtil Epsilon ops: Generalize all epsilon operations by allowing passing ↵Sven Göthel2024-02-141-6/+26
| | | | a zero epsilon value to reduce complexity in upper math layers
* Use FloatUtil.isZero(a) w/ build-in FloatUtil.EPSILON directly instead of ↵Sven Göthel2024-02-142-12/+12
| | | | passing FloatUtil.EPSILON to explicit isZero(a, epsilon)
* Bug 1501: Graph CDTriangulator2D: Add properties to enforce convex and ↵Sven Göthel2024-02-141-2/+10
| | | | non-convex treatment to simplify debugging etc
* Bug 1501: Apply intersection tests for non-convex shapes to reject new CCW ↵Sven Göthel2024-02-135-129/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and non-circulcircle triangulation candidates in our Delaunay tessellator <https://jogamp.org/bugzilla//show_bug.cgi?id=1501#c6> The used Delaunay tessellation works well with (almost) convex shapes. In case e.g. a glyph gets to the extremes like 'M' in FreeMono or any other complex Chinese symbol - it may just simply happen that the new non-circumcircle triangle point crosses the inner (hope) or outer boundaries of the given polygon. Applying further constraint at Loop.cut() resolves most cases by rejecting the proposed CCW and non-circumcircle triangle candidate if its new two line-segments intersects with the original polygon. This results in mostly proper rendered Chinese fonts and also FreeMono is now readable - overal remaining bugs in Glyphs is low. +++ Of course, this intersection test is costly around >= O(log(n)*n) costs, practically adding a measured ~65% processing time. E.g. for FontView01 using FreeSerif.ttf - orig total took 1430.817638ms, per-glyph 0.2236ms, glyphs 6399 - fix total took 2377.337359ms, per-glyph 0.371517ms, glyphs 6399 Pure Glyph/Shape instantiation shows > 2x costs: 750 ms 100% convex (fake) 1875 ms 0% convex (fake) 1870 ms 13% convex 824/6399 +++ Hence it is desired to either (1) Manually mark a polygon non-convex to add described intersection test for accuracy. Also may be used to just drop the additional costs despite the lack of correctness. PROVIDED (2) Determine non-convex nature of a polygon with a and overall less expensive algorithm. If considerably cheaper, this could reduce O(log(n) * n) -> O(n) or even O(log n). Added convex/non-convex classification while ignoring off-curve points, but only ~13% of FreeSerif is pure convex, hence there is no benefit with this classification type. It might be desired to attempt other classes, i.e. being rendered in non-convex mode w/o intersection tests. See - GENERALIZED DELAUNAY TRIANGULATIONS OF NON-CONVEX DOMAINS https://deepblue.lib.umich.edu/bitstream/handle/2027.42/28782/0000614.pdf;sequence=1 - https://en.wikipedia.org/wiki/List_of_self-intersecting_polygons - https://en.wikipedia.org/wiki/Complex_polygon
* Bug 1501: VectorUtil: Deprecate prev line2line intersection tests, adding ↵Sven Göthel2024-02-131-72/+476
| | | | | | | | | | | new impl; Add isConvex*() to determine whether a polyline is convex I had problems using the previous line2line intersection methods in my (and my son's) C++ gfxbox2 project, e.g. freefall01. Hence I found a different solution, also using less operations: <https://jausoft.com/cgit/cs_class/gfxbox2.git/tree/include/pixel/pixel2f.hpp#n660> While adding intersection tests for our Delaunay (Bug 1501) .. I came across this issue again and hence swapped the implementation.
* VectorUtil: Consolidate names, remove unused float prevision variants (if any)Sven Göthel2024-02-133-109/+52
|
* Bug 1501: Graph RenderState add debug-bits, i.e. DEBUG_LINESTRIP used in ↵Sven Göthel2024-02-132-1/+17
| | | | VBORegionSPES2 to just render lines instead of the filled area -> Used in UIShapeDemo02a
* Graph RenderState/RegionRenderer: Rename isHintMaskSet()->hintBitsSet(), ↵Sven Göthel2024-02-135-31/+32
| | | | setHintMask()->setHintBits(), clearHintMask()->clearHintBits()
* Loop.isValidNeighborDbg(): Remove DEBUG branch, always trueSven Göthel2024-02-121-8/+4
|
* VectorUtil: Remove unused isInCircleVec2f() and triAreaVec2f(), now using ↵Sven Göthel2024-02-121-34/+8
| | | | *2d() variants
* Bug 1501 Graph Delaunay: Replace MaterialIconsRound-Regular.ttf with fixed ↵Sven Göthel2024-02-121-0/+0
| | | | winding direction (outer-bondary TTF CW (Graph CCW) and inner-hole TTF CCW (Graph CW)
* Bug 1501: Graph Delaunay: Use default winding outer-boundary:=CCW and ↵Sven Göthel2024-02-125-45/+77
| | | | | | | | | | | inner-hole:=CW w/o using winding determination (might be incorrect) This simplifies our code further and it has been validated that our polygon shoelace-algo for area >= 0 ? CCW doesn't produce correct results with all curves. Hence rely on given winding depending on outer-boundary and inner-hole if CDTriangulator2D.FixedWindingRule == true (default and fixed). This also removes the more costly winding shoelace calculus, hence Outline ctor only sets dirtyWinding:=true w/o calculating the winding.
* Bug 1501: Graph Delaunay: Add double triAreaVec2() and isInCircleVec2() ↵Sven Göthel2024-02-124-106/+197
| | | | | | | | | | | | version, overcome float precision; Loop: Pass edgeType not Winding, simplify findClosestValidNeighbor() -> isValidNeighbor(); CDTriangulator2D.addCurve() enforces Winding.CCW on BOUNDARY null == loop case Add double version of triAreaVec2() and isInCircleVec2() in VectorUtil, overcoming float precision limits - Analysis exposed float precision limits within isInCircleVec2() Loop: Pass edgeType not Winding, simplify findClosestValidNeighbor() -> isValidNeighbor() - Enhance code clarity CDTriangulator2D.addCurve() enforces Winding.CCW on BOUNDARY null == loop case
* Graph: Outline[Shape]: Add print()Sven Göthel2024-02-112-0/+26
|
* GLMediaPlayerImpl: Adjust aid/sid to AUTO if alang/slang is givenSven Göthel2024-02-071-3/+5
|
* GLMediaPlayerImpl: Fix playing one frame after seek() @ getNextTexture(), ↵Sven Göthel2024-02-071-4/+4
| | | | requires pause state (normal at play-state)
* Bug 1492: GLMediaPlayer: Add playStream(..) variant passing desired audio- ↵Sven Göthel2024-02-0511-91/+180
| | | | and subtitle language
* GLMediaPlayer.Chapter: Add duration()Sven Göthel2024-02-041-0/+2
|
* Graph Font: Pull up static functionSven Göthel2024-02-041-16/+16
|
* Use new com.jogamp.common.util.StringUtil (GlueGen)Sven Göthel2024-02-042-24/+2
|
* Typecast: Re-apply overwritten stability changes (NPE, redundancy)Sven Göthel2024-02-031-11/+12
| | | | | 0e5e38478a6197b2dc65960c55bc831d6b4796a7 Sun Feb 12 00:54:40 2023 +0100 d18df847b17a89fdc4b47fa9cfe010af1a61690b Sat Mar 1 16:48:48 2014 +0100
* Typecast: Cleanup: finalSven Göthel2024-02-032-18/+19
|
* Hausmacher Merge: Complete merge part-1 into JOGL from our typecast branch; ↵Sven Göthel2024-02-031-0/+65
| | | | | | | | | | | | | Adding missing LongDateTime class haumacher https://github.com/haumacher/typecast https://jogamp.org/cgit/typecast.git/log/?h=jogl_patches Status: - Compile clean - Graph/GraphUI Bring-Up OK - Fixes CJK ttf font parsing due to fixed Cmap table
* Cleanup (static, final, whitespace, ..) post Hausmacher MergeSven Göthel2024-02-0319-426/+433
|
* Hausmacher Merge: Complete merge part-1: Compile and test clean ↵Sven Göthel2024-02-033-28/+32
| | | | | | | (pre-write-feature) Bernhard Haumacher provided changes in May 2020 to the typecast project within his public branch https://github.com/haumacher/typecast This merges the pre-write-feature work, which probably is incomplete.
* Enhanced dump format of cmap table.Bernhard Haumacher2024-02-038-36/+77
|
* Added rudimentary documentation to the CFF table.Bernhard Haumacher2024-02-031-1/+35
|
* Added support for reading the SVG table. # Conflicts: # ↵Bernhard Haumacher2024-02-034-48/+363
| | | | src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java
* Added documentation to the 'loca' table.Bernhard Haumacher2024-02-031-5/+33
|
* Improved documentation of Cmap table.Bernhard Haumacher2024-02-038-6/+331
|
* Bugfix: Format 14 header of Cmap table is not skipped correctly.Bernhard Haumacher2024-02-031-2/+1
|
* Added offset table as member to the font.Bernhard Haumacher2024-02-035-17/+52
| | | | | | | | * Include the offset table in the font's dump. * Simplified reading since the offset table now does not be read twice. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java
* Added documentation to the HmtxTable.Bernhard Haumacher2024-02-031-12/+148
|
* Added documentation to the 'glyf' table and structures.Bernhard Haumacher2024-02-0319-152/+989
| | | | | | | | | | | | | | * Completed missing toString() functions in some table. * Added dump() functionality to create a human readable description of all font tables with complete detail. * Fixed some signed/unsigned problems in the parser. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java # src/test/java/net/java/dev/typecast/ot/TTFontTest.java
* Getters for macStyle bits, enhanced docu for fontDirectionHint.Bernhard Haumacher2024-02-032-16/+150
|
* Added JavaDoc references, split version fields according to spec.Bernhard Haumacher2024-02-031-6/+100
|
* Documentation for `HeadTable`Bernhard Haumacher2024-02-0332-55/+439
| | | | | | | | | | | | | | | | | | | * Added documentation to fields in `HeadTable` taken from https://docs.microsoft.com/en-us/typography/opentype/spec/head. * Added `LongDateTime` conversion of date values encoded as "seconds since 1904". * Added `getType()` API to `Table` interface. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/SbixTable.java Original commit from typecast merge: From 43c20bb2e7644aef7002caeb93e1770be5cacaab Mon Sep 17 00:00:00 2001 From: Bernhard Haumacher <[email protected]> Date: Sat, 9 May 2020 12:49:39 +0200
* Graph/GraphUI: Move getDefault*() to FontFactory and add ↵Sven Göthel2024-02-033-0/+58
| | | | {get,set}FallbackFont() + Font.getBestCoverage(..); Use fallback-font in MediaButton in case chosen font doesn't match (foreign languages, e.g. 'zho' Chinese .. )
* Bug 1493: Supply language code to SubtitleEvent, perhaps allowsing player to ↵Sven Göthel2024-02-026-29/+44
| | | | select font for ASS/Text rendering; Remove GLMediaPlayer's getStreamLang() as replaced by getLang()
* OutlineShape: Earmark coloring task when triangulating ..Sven Göthel2024-02-021-0/+10
|
* Remove Clonable and clone() in favor of explicit determined copy() and ↵Sven Göthel2024-02-028-71/+36
| | | | copy-ctor in com.jogamp.graph.* and com.jogamp.math.*
* GLMediaPlayerImpl: Disable subDEBUG flagSven Göthel2024-02-021-1/+1
|
* GLMediaPlayer: Adjust API doc and certain names differentiating video (from ↵Sven Göthel2024-02-022-16/+28
| | | | subtititle) etc.
* GLMediaPlayerImpl.StreamWorker: Don't grow videoFramesFree since having ↵Sven Göthel2024-02-021-4/+0
| | | | removed buffer grow in commit 68ca5b14966cb7eec9501c17dc8b3b465421a68e
* GLMediaPlayerImpl: Allow one frame to be shown paused when issuing seek(), ↵Sven Göthel2024-02-021-5/+14
| | | | | | i.e. 'oneVideoFrameOnce'. This allows a player to see the current seek'ed position while paused.
* Bug 1494 - GLMediaPlayer/GraphUI: Support Displaying Bitmap'ed Subtitles ↵Sven Göthel2024-02-0220-488/+962
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (PGS ..) via FFMPEGFMediaPlayer/FFmpeg FFMPEGFMediaPlayer related changes: - Add libswscale (6th FFmpeg lib used) for sws_getCachedContext(), sws_scale() and sws_freeContext(), used natively to convert the palette'ed bitmap into RGBA colorspace -> GL texture - Handling AVSubtitleRect.type SUBTITLE_BITMAP -- only handled if libswscale is available -- config/adjust texture object -- sws_scale palette'ed bitmap to texture -- intermediate memory is cached, may be resized and free'ed at destroy -- texture objects are managed and passed from GLMediaPlayerImpl, as they are also forwarded to player client via SubBitmapEvent - Passing the AVCodecID to GLMediaPlayerImpl, converted to our CodecID enum. - Unifying creation and opening of AVCodecContext with 'createOpenedAVCodecContext(..)' +++ SubtitleEvent* - SubTextEvent now also handles ASS.Dialogue (FFmpeg 4) besides ASS.Event (FFmpeg 5, 6, ..). +++ GLMediaPlayerImpl - Added ringbuffer subTexFree, managing Texture for bitmap'ed subtitles -- Uses 1 bitmap-subtitle Texture per used textureCount in cache, as one bitmap-subtile can be displayed per frame. Could be potentially reduced to just 2 .. but resources used are relatively low here. - Validating subTexFree + videoFramesFree usage, use blocking get/put ringbuffer due to utilization from different threads. - Receives subtitle content from native getNextPacket0() via callback, creates SubtitleEvent instance and passes it to a SubtitleEventListener - if exists. (See MediaButton example) -- SubBitmapEvent also gets its special SubBitmapEvent.TextureOwner to handle client releasing the event and allowing us to put back the Texture resource to 'subTexFree'. This passing through of the Texture object is probably a weakness of this lifecycle and requires the client to ensure SubtitleEvent.release() gets called. See MediaButton example! - Exposing CodecID, allowing clients like MediaButton to handle SubtitleEvent content according to codec
* Bug 805: Graph/GraphUI TextureSequence Scale: Move ↵Sven Göthel2024-02-0111-38/+266
| | | | | | | | | Region.COLORTEXTURE_LETTERBOX_RENDERING_BIT to TextureSequence and add enabling/disabling of aratio adjustment + letter-box back-color TextureSequence color-texture params fetched from Graph VBORegion* and fed into shader. This allows more flexibility in aspect-ratio adjustment as well as setting a clipping background color for the added letter-box space.
* Vec[234][ifd]: Add toArray(..) methodSven Göthel2024-02-015-0/+39
|