aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/GPUTextRendererListenerBase01.java16
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT20.java10
2 files changed, 22 insertions, 4 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/GPUTextRendererListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/GPUTextRendererListenerBase01.java
index 8c5abbc2f..13ef8450b 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/GPUTextRendererListenerBase01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/GPUTextRendererListenerBase01.java
@@ -381,6 +381,22 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
dy += ( -headbox.getHeight() - font.getLineHeight() ) * pixelSizeCenter;
{
+ final String mg_s = font.getGlyph('M').toString()+"\n"+font.getGlyph('X').toString();
+ pmv.pushMv();
+ // System.err.printf("Head: [%f %f] -> [%f %f]%n", dx, dy, nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy));
+ pmv.translateMv(nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy), nearPlaneZ0);
+ {
+ final float sxy = nearPlaneS * pixelSizeFName;
+ pmv.scaleMv(sxy, sxy, 1.0f);
+ }
+ // pmv.glTranslatef(x0, y1, z0);
+ final AABBox box = textRegionUtil.drawString3D(gl, renderer, font, mg_s, null);
+ pmv.popMv();
+
+ dy += ( -box.getHeight() - font.getLineHeight() ) * pixelSizeFName;
+ }
+
+ {
pmv.pushMv();
pmv.translateMv(nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy), nearPlaneZ0);
// System.err.printf("Bottom: [%f %f] -> [%f %f]%n", dx, dy, nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy));
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT20.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT20.java
index 7d6a9bff2..5dbdcb5f6 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT20.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT20.java
@@ -76,10 +76,12 @@ public class TestTextRendererNEWT20 extends UITestCase {
@BeforeClass
public static void setup() {
- try {
- fontSet = FontSet01.getSet00();
- } catch (final IOException e) {
- e.printStackTrace();
+ if( fontSet.length == 0 ) {
+ try {
+ fontSet = FontSet01.getSet00();
+ } catch (final IOException e) {
+ e.printStackTrace();
+ }
}
}