aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-04-18 05:15:16 +0200
committerSven Gothel <[email protected]>2023-04-18 05:15:16 +0200
commitc65c750e032118f229050ff8e834961264ed0591 (patch)
tree8500286ca6086eb21a9b275ccd586185090b1500 /src/test/com/jogamp/opengl
parentcd845589eea6c7773007e013bd5f2f37242cbe1a (diff)
Graph + GraphUI: Consolidate Vertex: Drop SVertex and factory, use Vec[234]f 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()
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener01.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener01.java
index 2dacdec68..fd4ec47b1 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener01.java
@@ -32,7 +32,7 @@ import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2ES2;
import com.jogamp.opengl.GLAutoDrawable;
import com.jogamp.opengl.fixedfunc.GLMatrixFunc;
-
+import com.jogamp.opengl.math.Vec4f;
import com.jogamp.graph.curve.OutlineShape;
import com.jogamp.graph.curve.opengl.GLRegion;
import com.jogamp.graph.curve.opengl.RenderState;
@@ -273,7 +273,7 @@ public class GPURegionGLListener01 extends GPURendererListenerBase01 {
break;
}
region = GLRegion.create(gl.getGLProfile(), getRenderModes(), null);
- region.addOutlineShape(outlineShape, null, region.hasColorChannel() ? getRenderer().getRenderState().getColorStatic(new float[4]) : null);
+ region.addOutlineShape(outlineShape, null, region.hasColorChannel() ? getRenderer().getRenderState().getColorStatic(new Vec4f()) : null);
}
@Override
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java b/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java
index 4d4d31027..8719fea27 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java
@@ -55,6 +55,7 @@ import com.jogamp.graph.curve.opengl.TextRegionUtil;
import com.jogamp.graph.font.Font;
import com.jogamp.graph.font.FontFactory;
import com.jogamp.graph.geom.plane.AffineTransform;
+import com.jogamp.opengl.math.Vec4f;
import com.jogamp.opengl.math.geom.AABBox;
import com.jogamp.opengl.test.junit.util.MiscUtils;
import com.jogamp.opengl.test.junit.util.NEWTGLContext;
@@ -87,7 +88,7 @@ public class PerfTextRendererNEWT00 {
static boolean do_vsync = false;
static Font font;
- private final float[] fg_color = new float[] { 0, 0, 0, 1 };
+ private final Vec4f fg_color = new Vec4f( 0, 0, 0, 1 );
static {
try {