From 277ad1ba1453b7e2e0164f1a609482a36469b2ea Mon Sep 17 00:00:00 2001 From: Sven Göthel Date: Mon, 12 Feb 2024 02:31:13 +0100 Subject: Bug 1501: Graph Delaunay: Add double triAreaVec2() and isInCircleVec2() 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 --- src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java') diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java index a406bfb82..478931531 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java @@ -202,11 +202,11 @@ public final class VBORegionSPES2 extends GLRegion { gl.glUniform(gcu_ColorTexBBox); // Always update, since program maybe used by multiple regions gl.glUniform(gcu_ColorTexClearCol); // Always update, since program maybe used by multiple regions gl.glDrawElements(GL.GL_TRIANGLES, indicesBuffer.getElemCount() * indicesBuffer.getCompsPerElem(), glIdxType(), 0); - // gl.glDrawElements(GL.GL_LINE_STRIP, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), gl_idx_type, 0); + // gl.glDrawElements(GL.GL_LINE_STRIP, indicesBuffer.getElemCount() * indicesBuffer.getCompsPerElem(), glIdxType(), 0); tex.disable(gl); // nop on core } else { gl.glDrawElements(GL.GL_TRIANGLES, indicesBuffer.getElemCount() * indicesBuffer.getCompsPerElem(), glIdxType(), 0); - // gl.glDrawElements(GL.GL_LINE_STRIP, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), gl_idx_type, 0); + // gl.glDrawElements(GL.GL_LINE_STRIP, indicesBuffer.getElemCount() * indicesBuffer.getCompsPerElem(), glIdxType(), 0); } indicesBuffer.bindBuffer(gl, false); -- cgit v1.2.3