summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/curve
Commit message (Collapse)AuthorAgeFilesLines
* Graph TextRegionUtil.drawString3D(..): Allow null `rgbaColor` w/o ↵Sven Gothel2023-08-121-6/+12
| | | | color-channel again, was enforced to be set in commit bb6ee81bc5514663bb7b22224fcdd5ba34a51ac6
* Graph TextRegionUtil.drawString3D(..): Redefine 'rgbaColor' semantics: ↵Sven Gothel2023-08-021-3/+24
| | | | | | | | | | Either fill color-channel with value if used and set static-color to white - or just set static color channel with value. Have the given rgbaColor to definitely setting the text color regardless whether a color channel is used or not. Note: Using a color-channel is more expensive (color value per vertex) and should only be required if mixing colors within one region! Also removes potential side-effects if color-channel is used but user forgets to set the static value properly.
* Graph RenderState: Initialize colorStatic w/ all white (1,1,1,1) if ↵Sven Gothel2023-08-021-1/+1
| | | | | | | | | | | | color-channel is used and no static-color set Commit a973324a75b55b722caa755a7a573be849d997e4 was setting the alpha to 1, which avoids the 'discard' in the shader. This at least gave us a black color ;-) However, the shader modulates the color, i.e. color-channel * color-static, therefor we need an all-white color-static as default if user only sets the color-channel.
* Graph RegionRenderer.destroy(): Detach RenderState from GL instanceSven Gothel2023-08-021-0/+1
| | | | Remove potential leak
* Graph: Simplify RegionRenderer API by exposing common RenderState methods ↵Sven Gothel2023-08-021-16/+34
| | | | (and fwd 'em to RenderState aggregate)
* Graph Add {GLRegion, GraphShape}.setTextureUnit(int): Allowing to set ↵Sven Gothel2023-08-011-0/+3
| | | | texture unit after ctor
* Graph RegionRendered.init(..): Disable renderer (and shader programs etc) to ↵Sven Gothel2023-08-011-5/+3
| | | | avoid side-effects. Usually called @ GLEventListener.init(..)
* Graph RenderState: Initialize colorStatic w/ alpha=1 to avoid invisible ↵Sven Gothel2023-08-011-1/+1
| | | | | | rendering if no static color has been set Shader either uses just colorStatic or multiplies it w/ the color-stream value
* Graph GLRegion.create(..): Expose variant with custom pass2TexUnit for VBAA ↵Sven Gothel2023-08-011-5/+23
| | | | (default texture unit is 0)
* Graph: Minor cleanup: TextRegionUtil: Fix API doc references; ↵Sven Gothel2023-08-012-7/+6
| | | | RegionRenderer.enable(..) merge '!enable' branch, fix API doc
* Graph GLRegion: DEBUG_BUFFER (growth) 'jogl.debug.graph.curve.Buffer'Sven Gothel2023-05-051-19/+35
|
* Graph GLRegion.growBuffer(..): Disable debug output (static final flag)Sven Gothel2023-05-041-3/+9
|
* Graph GLRegion/TextRegionUtil: Enhance pre-determination of buffer-size, ↵Sven Gothel2023-04-203-33/+93
| | | | | | | | | | 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 -
* Graph OutlineShape.get{Outline->}VectexCount() renamedSven Gothel2023-04-201-1/+1
|
* Graph GLRegion*: Utilize interleaved GLSL buffers for vertices, curveParams ↵Sven Gothel2023-04-203-68/+105
| | | | | | | | | | | 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.
* Graph [GL]Region: Use small initial indices/vertices count (640 -> 16), ↵Sven Gothel2023-04-192-6/+9
| | | | | | since (huge) text glyph gets always pre-calculated. Region.countOutlineShape() indices ceiling raised from 60% to 90% of vertices, otherwise gets exceeded too often later on.
* Graph GLRegion: Consolidate pass-1 common data (indices, vertices, ..) and ↵Sven Gothel2023-04-192-14/+184
| | | | all related methods. Add growCount stat.
* Graph Region.addOutlineShape(): Fix DEBUG_INSTANCE path, enable perf counter ↵Sven Gothel2023-04-191-0/+3
| | | | if disabled.
* Graph: Region.countOutlineShape(..) -> static, allow usage w/o instance; ↵Sven Gothel2023-04-193-33/+40
| | | | | | | | TextRegionUtil.addStringToRegion() grow region buffer w/ counting (as well); GLRegion.create(..) count + reuse create(.., size) static-ctor All supported string -> region method utilize pre-calc of size and growth! Before, GraphUI's Label0 used TextRegionUtil.addStringToRegion() and hence missed this optimization path.
* Graph OutlineShape.checkOverlaps(): Test overlap first to drop ↵Sven Gothel2023-04-181-1/+1
| | | | overlaps.contains(..) test
* Graph + GraphUI: Consolidate Vertex: Drop SVertex and factory, use Vec[234]f ↵Sven Gothel2023-04-184-87/+65
| | | | | | | | | | | 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()
* Graph OutlineShape: Add getOutlineVectexCount(), i.e. total vertex count of ↵Sven Gothel2023-04-141-0/+10
| | | | all Outlines
* Graph Region: Add NORM_RENDERING_BIT (0) for better documented usage; Add ↵Sven Gothel2023-04-141-0/+31
| | | | getRenderModeString(renderModes, graphSampleCount, fsaaSampleCount) for unified tech representation
* PMVMatrix rewrite using Matrix4f, providing SyncMatrix4f* for GLUniformData; ↵Sven Gothel2023-04-072-13/+11
| | | | | | | | | | | | | | | | | 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
* Graph GLSL: Enable 'discard' in fragment shader w/o ↵Sven Gothel2023-03-301-5/+11
| | | | | | | | | 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.
* Graph*: API doc refinementSven Gothel2023-03-301-1/+1
|
* Graph RenderState: Add setColorStatic(float[]) variantSven Gothel2023-03-281-0/+3
|
* Graph Font.GlyphVisitor*: Pass 'char symbol' to visitor, passing full ↵Sven Gothel2023-03-282-3/+4
| | | | text-processing information
* Graph: Remove OutlineShape.Visitor* as being replaced by Font.GlyphVisitorSven Gothel2023-03-222-24/+1
| | | | (We may ressurect them if needed for a future use case)
* Graph Font Processing: Use Font.GlyphVisitor instead of ↵Sven Gothel2023-03-222-10/+15
| | | | OutlineShape.Visitor, allowing to use the Glyph (information).
* Graph: Cleanup Vertex.Factory referencing: Only bind to OutlineShape and use ↵Sven Gothel2023-03-213-43/+21
| | | | | | | 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'.
* Graph: Add RegionRenderer.enable(..) variant w/ passing enable + disable ↵Sven Gothel2023-03-191-4/+15
| | | | GLCallback
* Graph: GLRegion.draw(): Mod curRenderModes by sampleCount { 0 = no-sampling, ↵Sven Gothel2023-03-191-1/+19
| | | | -1 = glSelect } (Experimental not working fully)
* Graph: GLRegion: Pass curRenderModes to updateImpl() + drawImpl(), prepare ↵Sven Gothel2023-03-192-8/+12
| | | | switch by sampleCount; Don't use any resource not requested by curRenderModes
* Graph : Misc API docSven Gothel2023-03-192-2/+5
|
* Graph: Add RenderState API doc; RegionRenderer: Remove unused shell method, ↵Sven Gothel2023-03-192-6/+8
| | | | left over from f8584748e33aab56780eca5cf7009a5a0d11991d
* Graph: Make RenderState a composition of RegionRenderer, which also creates ↵Sven Gothel2023-03-153-33/+120
| | | | and destroys it. Dropping this also from user (complexity).
* Fix ShaderProgram ownership bug, introduced in commit ↵Sven Gothel2023-03-153-35/+36
| | | | | | | | | 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.
* Graph: Have RegionRenderer.reshapeNotify(..) track x/y as well (vieport); ↵Sven Gothel2023-03-141-5/+7
| | | | GraphUI.Scene using RegionRenderer's viewport (no duplicate)
* Graph: RegionRenderer: Adopt to TextureSequence API Change: Use ↵Sven Gothel2023-03-141-9/+8
| | | | setTextureLookupFunctionName(..) before using hash and/or code.
* Graph: Region: Add API doc on markStateDirty() and markShapeDirty()Sven Gothel2023-03-141-5/+13
|
* GLRegion + RegionRenderer: Add clearShader(..) to delete all ShaderPrograms ↵Sven Gothel2023-03-133-7/+27
| | | | and is references.
* Graph: Add GLRegion creation w/ pre-calculating its buffer sizes; ↵Sven Gothel2023-03-132-2/+60
| | | | | | TextRegionUtil: Use pre-calc'ing buffer sizes for GLRegion; TextRendererGLELBase: Fix temp AffineTransform usage
* Misc: Add MonitorDevice.perMMToPerInch(..); Drop unused ↵Sven Gothel2023-03-091-3/+2
| | | | RegionRenderer.init(..) renderModes argument
* Graph: Region: Enhance API doc, fix typo .. (brace close left open during ↵Sven Gothel2023-03-071-12/+34
| | | | selected commits)
* Graph Perf: Add Region.countOutlineShape(), Font.processString(Visitor2,..), ↵Sven Gothel2023-03-073-0/+69
| | | | TextRegionUtil.countStringRegion() allowing to use Region.setBufferCapacity()
* Graph Perf: OutlineShape: Uncomment all debug code to keep it smallerSven Gothel2023-03-071-7/+7
|
* Graph Perf: Region*: Add setBufferCapacity(..) and cut-off growBuffer() ↵Sven Gothel2023-03-072-3/+21
| | | | early if not needed (track capacity); Align all VBORegion* buffer init/set/grow impl.
* Graph Perf: Region: split addOutlineShape() -> addOutlineShape0() (fast) and ↵Sven Gothel2023-03-071-54/+81
| | | | addOutlineShape1() (slow perf+debug), rename growBufferSize() -> growBuffer()
* Graph Perf: Region*: Rely on growBuffer(..) per addOutlineShape() and known ↵Sven Gothel2023-03-071-0/+13
| | | | buffer data-type to directly put[34][sif](..) skipping GLArrayDataClient/Buffers buffer-growth and validations