From 657df3d32a291a74e7eb31c8ccef0fde151afcc1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 7 Mar 2023 18:05:15 +0100 Subject: Graph Perf: Region*: Rely on growBuffer(..) per addOutlineShape() and known buffer data-type to directly put[34][sif](..) skipping GLArrayDataClient/Buffers buffer-growth and validations --- src/jogl/classes/com/jogamp/graph/curve/Region.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/jogl/classes/com/jogamp/graph/curve/Region.java') diff --git a/src/jogl/classes/com/jogamp/graph/curve/Region.java b/src/jogl/classes/com/jogamp/graph/curve/Region.java index 70f30a193..252e57e2b 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/Region.java +++ b/src/jogl/classes/com/jogamp/graph/curve/Region.java @@ -330,6 +330,19 @@ public abstract class Region { pushNewVerticesImpl(vertIn1, vertIn2, vertIn3, transform, rgba); } + protected static void put3i(final IntBuffer b, final int v1, final int v2, final int v3) { + b.put(v1); b.put(v2); b.put(v3); + } + protected static void put3s(final ShortBuffer b, final short v1, final short v2, final short v3) { + b.put(v1); b.put(v2); b.put(v3); + } + protected static void put3f(final FloatBuffer b, final float v1, final float v2, final float v3) { + b.put(v1); b.put(v2); b.put(v3); + } + protected static void put4f(final FloatBuffer b, final float v1, final float v2, final float v3, final float v4) { + b.put(v1); b.put(v2); b.put(v3); b.put(v4); + } + private final AABBox tmpBox = new AABBox(); protected static final int GL_UINT16_MAX = 0xffff; // 65,535 -- cgit v1.2.3