aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-13 06:02:33 +0100
committerSven Gothel <[email protected]>2023-03-13 06:02:33 +0100
commite9a0f5cdc2bca9ca97175d2fa3c1b722a574b267 (patch)
treef492f20550cbac29b2072930b576e4e668c6e143 /src/test/com/jogamp
parent913b00f8b876e29af91677ef61b3eb35d6853e6e (diff)
Graph: Add GLRegion creation w/ pre-calculating its buffer sizes; TextRegionUtil: Use pre-calc'ing buffer sizes for GLRegion;
TextRendererGLELBase: Fix temp AffineTransform usage
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java20
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java4
2 files changed, 4 insertions, 20 deletions
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 e31ed7ae3..1b6109af7 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java
@@ -245,24 +245,8 @@ public class PerfTextRendererNEWT00 {
final RegionRenderer renderer = RegionRenderer.create(rs, RegionRenderer.defaultBlendEnable, RegionRenderer.defaultBlendDisable);
rs.setHintMask(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED);
- // Since we know about the size ...
- // final GLRegion region = GLRegion.create(gl.getGLProfile(), renderModes, null);
- // region.growBufferSize(123000, 62000); // hack-me
- // FreeSans ~ vertices 68/char, indices 36/char
- // Ubuntu Light ~ vertices 100/char, indices 50/char
- // FreeSerif ~ vertices 115/char, indices 61/char
- // final int vertices_per_char = 68; // 100;
- // final int indices_per_char = 36; // 50;
- // final GLRegion region = GLRegion.create(gl.getGLProfile(), renderModes, null, text.length()*vertices_per_char, text.length()*indices_per_char);
- final GLRegion region = GLRegion.create(gl.getGLProfile(), renderModes, null);
- System.err.println("Region post ctor w/ default initial buffer size");
- region.printBufferStats(System.err);
-
- final int[] verticesIndicesCount = new int[] { 0, 0 };
- TextRegionUtil.countStringRegion(region, font, text, verticesIndicesCount);
- System.err.println("Region count: text "+text.length()+" chars -> vertices "+verticesIndicesCount[0]+", indices "+verticesIndicesCount[1]);
- region.setBufferCapacity(verticesIndicesCount[0], verticesIndicesCount[1]);
- System.err.println("Region post set-buffer-size w/ matching vertices "+verticesIndicesCount[0]+", indices "+verticesIndicesCount[1]);
+ final GLRegion region = GLRegion.create(gl.getGLProfile(), renderModes, null, font, text);
+ System.err.println("Region post ctor w/ pre-calculated buffer size");
region.printBufferStats(System.err);
final Perf perf = new Perf();
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java b/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java
index 7a83501c6..b867c054e 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java
@@ -276,9 +276,9 @@ public abstract class TextRendererGLELBase implements GLEventListener {
if( cacheRegion ) {
textRenderUtil.drawString3D(gl, renderer, font, text, null, vbaaSampleCount);
} else if( null != region ) {
- TextRegionUtil.drawString3D(gl, region, renderer, font, text, null, vbaaSampleCount, tempT1, tempT1);
+ TextRegionUtil.drawString3D(gl, region, renderer, font, text, null, vbaaSampleCount, tempT1, tempT2);
} else {
- TextRegionUtil.drawString3D(gl, renderModes, renderer, font, text, null, vbaaSampleCount, tempT1, tempT1);
+ TextRegionUtil.drawString3D(gl, renderModes, renderer, font, text, null, vbaaSampleCount, tempT1, tempT2);
}
renderer.enable(gl, false);