summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-03-25 15:49:42 +0100
committerSven Gothel <[email protected]>2014-03-25 15:49:42 +0100
commitec5724493bb9398134553a7354e08497e778a9cb (patch)
tree4c0619b262ac1eb6f2cfff22aac62106ba87af52 /src
parentdcb4a911a7df6caa0da71ebf8f77edc8d83b0c24 (diff)
Bug 801: Use allsamples 'brute force' for VBAA (best quality) ; Demos: Reduce text contrast by 1/10th allowing better AA ; GPUUISceneGLListener0A uses proportional window height font size and one label w/ 10pt
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa-weight.fp8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa.fp8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allsamples_equal.glsl (renamed from src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_wholeedge_equalweight.glsl)4
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allsamples_prop01.glsl (renamed from src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_wholeedge_propweight1.glsl)0
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java54
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java68
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00Base.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java6
13 files changed, 101 insertions, 69 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa-weight.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa-weight.fp
index bc443061e..795215285 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa-weight.fp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa-weight.fp
@@ -28,9 +28,10 @@ void main (void)
if( 0 < gcu_TextureSize.z ) {
-// Quality: wholeedge > [flipquad,rgss, quincunx] > poles
-#include curverenderer01-pass2-vbaa_flipquad3.glsl
+// Quality: allsamples > [flipquad,rgss, quincunx] > poles
+#include curverenderer01-pass2-vbaa_allsamples_equal.glsl
+// #include curverenderer01-pass2-vbaa_flipquad3.glsl
// #include curverenderer01-pass2-vbaa_flipquad2.glsl
// #include curverenderer01-pass2-vbaa_flipquad.glsl
// #include curverenderer01-pass2-vbaa_rgss.glsl
@@ -39,8 +40,7 @@ void main (void)
// #include curverenderer01-pass2-vbaa_poles_equalweight.glsl
// #include curverenderer01-pass2-vbaa_poles_bilin1.glsl
// #include curverenderer01-pass2-vbaa_poles_propweight1.glsl
-// #include curverenderer01-pass2-vbaa_wholeedge_propweight1.glsl
-// #include curverenderer01-pass2-vbaa_wholeedge_equalweight.glsl
+// #include curverenderer01-pass2-vbaa_allsamples_prop01.glsl
// #include curverenderer01-pass2-vbaa_fxaa3.glsl
} else {
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa.fp
index 6836b3ee0..e303f5c1b 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa.fp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass_vbaa.fp
@@ -28,9 +28,10 @@ void main (void)
if( 0 < gcu_TextureSize.z ) {
-// Quality: wholeedge > [flipquad,rgss, quincunx] > poles
-#include curverenderer01-pass2-vbaa_flipquad3.glsl
+// Quality: allsamples > [flipquad,rgss, quincunx] > poles
+#include curverenderer01-pass2-vbaa_allsamples_equal.glsl
+// #include curverenderer01-pass2-vbaa_flipquad3.glsl
// #include curverenderer01-pass2-vbaa_flipquad2.glsl
// #include curverenderer01-pass2-vbaa_flipquad.glsl
// #include curverenderer01-pass2-vbaa_rgss.glsl
@@ -39,8 +40,7 @@ void main (void)
// #include curverenderer01-pass2-vbaa_poles_equalweight.glsl
// #include curverenderer01-pass2-vbaa_poles_bilin1.glsl
// #include curverenderer01-pass2-vbaa_poles_propweight1.glsl
-// #include curverenderer01-pass2-vbaa_wholeedge_propweight1.glsl
-// #include curverenderer01-pass2-vbaa_wholeedge_equalweight.glsl
+// #include curverenderer01-pass2-vbaa_allsamples_prop01.glsl
// #include curverenderer01-pass2-vbaa_fxaa3.glsl
} else {
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_wholeedge_equalweight.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allsamples_equal.glsl
index 3c787b46e..068341b25 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_wholeedge_equalweight.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allsamples_equal.glsl
@@ -11,10 +11,10 @@
const vec2 texCoord = gcv_TexCoord.st;
- vec4 t = vec4(0);
+ vec4 t;
// SampleCount 2 -> 4x
- t += texture2D(gcu_TextureUnit, texCoord + psize*(vec2(-0.5, -0.5)))*sample_weight; // NW
+ t = texture2D(gcu_TextureUnit, texCoord + psize*(vec2(-0.5, -0.5)))*sample_weight; // NW
t += texture2D(gcu_TextureUnit, texCoord + psize*(vec2(-0.5, 0.5)))*sample_weight; // SW
t += texture2D(gcu_TextureUnit, texCoord + psize*(vec2( 0.5, 0.5)))*sample_weight; // SE
t += texture2D(gcu_TextureUnit, texCoord + psize*(vec2( 0.5, -0.5)))*sample_weight; // NE
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_wholeedge_propweight1.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allsamples_prop01.glsl
index 76227eba3..76227eba3 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_wholeedge_propweight1.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allsamples_prop01.glsl
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
index d7696f36b..d00e1c5ee 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
@@ -70,9 +70,10 @@ public class TestTextRendererNEWT00 extends UITestCase {
static long Duration = 2000; // ms
static boolean WaitStartEnd = false;
static boolean TextAnim = false;
- static int SceneMSAASamples = 4;
- static int GraphVBAASamples = 4;
- static int GraphMSAASamples = 4;
+ static int SceneMSAASamples = 0;
+ static int GraphVBAASamples = 0;
+ static int GraphMSAASamples = 0;
+ static boolean ManualTest = false;
static int SwapInterval = 0;
static String fontFileName = null;
@@ -88,6 +89,7 @@ public class TestTextRendererNEWT00 extends UITestCase {
}
public static void main(String args[]) throws IOException {
+ ManualTest = args.length > 0;
for(int i=0; i<args.length; i++) {
if(args[i].equals("-time")) {
i++;
@@ -110,17 +112,11 @@ public class TestTextRendererNEWT00 extends UITestCase {
} else if(args[i].equals("-smsaa")) {
i++;
SceneMSAASamples = atoi(args[i]);
- GraphMSAASamples = 0;
- GraphVBAASamples = 0;
} else if(args[i].equals("-gmsaa")) {
i++;
- SceneMSAASamples = 0;
GraphMSAASamples = atoi(args[i]);
- GraphVBAASamples = 0;
} else if(args[i].equals("-gvbaa")) {
i++;
- SceneMSAASamples = 0;
- GraphMSAASamples = 0;
GraphVBAASamples = atoi(args[i]);
} else if(args[i].equals("-textAnim")) {
TextAnim = true;
@@ -167,25 +163,33 @@ public class TestTextRendererNEWT00 extends UITestCase {
}
@Test
+ public void test00Manual() throws InterruptedException {
+ if( ManualTest ) {
+ testImpl(SceneMSAASamples, GraphMSAASamples, GraphVBAASamples);
+ }
+ }
+ @Test
public void test00SceneNoAA() throws InterruptedException {
- testImpl(0, 0, 0);
+ if( !ManualTest ) {
+ testImpl(0, 0, 0);
+ }
}
@Test
- public void test01SceneMSAA01() throws InterruptedException {
- if( SceneMSAASamples > 0 ) {
- testImpl(SceneMSAASamples, 0, 0);
+ public void test01SceneMSAA04() throws InterruptedException {
+ if( !ManualTest ) {
+ testImpl(4, 0, 0);
}
}
@Test
- public void test02GraphMSAA01() throws InterruptedException {
- if( GraphMSAASamples > 0 ) {
- testImpl(0, GraphMSAASamples, 0);
+ public void test02GraphMSAA04() throws InterruptedException {
+ if( !ManualTest ) {
+ testImpl(0, 4, 0);
}
}
@Test
- public void test03GraphVBAA01() throws InterruptedException {
- if( GraphVBAASamples > 0 ) {
- testImpl(0, 0, GraphVBAASamples);
+ public void test03GraphVBAA04() throws InterruptedException {
+ if( !ManualTest ) {
+ testImpl(0, 0, 4);
}
}
@@ -286,9 +290,9 @@ public class TestTextRendererNEWT00 extends UITestCase {
font = getFont(fontSet, fontFamily, fontStylebits);
}
- staticRGBAColor[0] = 0.0f;
- staticRGBAColor[1] = 0.0f;
- staticRGBAColor[2] = 0.0f;
+ staticRGBAColor[0] = 0.1f;
+ staticRGBAColor[1] = 0.1f;
+ staticRGBAColor[2] = 0.1f;
staticRGBAColor[3] = 1.0f;
this.screenshot = new GLReadBufferUtil(false, false);
@@ -377,9 +381,9 @@ public class TestTextRendererNEWT00 extends UITestCase {
lfps, tfps, gl.getSwapInterval(), (t1-t0)/1000.0, fontSizeAnim,
drawable.getChosenGLCapabilities().getNumSamples(), modeS, vbaaSampleCount[0]);
- if( true ) {
- renderString(drawable, font, pixelSize, "I - / H P 7 0", 0, 0, 0, 0, -1000f, true);
- // renderString(drawable, font, pixelSize, "I/- 0", 0, 0, 0, 0, -1000f, true);
+ if( false ) {
+ // renderString(drawable, font, pixelSize, "I - / H P 7 0", 0, 0, 0, 0, -1000f, true);
+ renderString(drawable, font, pixelSize, "A M > } ] ", 0, 0, 0, 0, -1000f, true);
// renderString(drawable, font, pixelSize, "012345678901234567890123456789", 0, 0, 0, -1000, true);
// renderString(drawable, font, pixelSize, textX2, 0, 0, 0, 0, -1000f, true);
// renderString(drawable, font, pixelSize, text1, 0, 0, 0, -1000f, regionFPS); // no-cache
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
index a8044463d..8121fc03f 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
@@ -230,7 +230,7 @@ public class TestTextRendererNEWT01 extends UITestCase {
final RegionRenderer renderer = getRenderer();
renderer.setAlpha(gl, 1.0f);
- renderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+ renderer.setColorStatic(gl, 0.1f, 0.1f, 0.1f);
}
public void display(GLAutoDrawable drawable) {
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
index f89ce101c..a23a50db7 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
@@ -148,7 +148,7 @@ public class TestTextRendererNEWT10 extends UITestCase {
gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
renderer.init(gl);
renderer.setAlpha(gl, 1.0f);
- renderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+ renderer.setColorStatic(gl, 0.1f, 0.1f, 0.1f);
// reshape
gl.glViewport(0, 0, drawable.getWidth(), drawable.getHeight());
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java
index 29b897d0e..05b833470 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java
@@ -56,7 +56,7 @@ public class GPUTextGLListener0A extends GPUTextRendererListenerBase01 {
gl.glEnable(GL2ES2.GL_DEPTH_TEST);
gl.glEnable(GL2ES2.GL_BLEND);
renderer.setAlpha(gl, 1.0f);
- renderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+ renderer.setColorStatic(gl, 0.1f, 0.1f, 0.1f);
}
public void dispose(GLAutoDrawable drawable) {
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java
index 0bd4d45a4..f187dcc6b 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java
@@ -216,7 +216,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
final PMVMatrix pmv = renderer.getMatrix();
pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
pmv.glLoadIdentity();
- renderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+ renderer.setColorStatic(gl, 0.1f, 0.1f, 0.1f);
if( renderer.getRenderState().isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED) ) {
gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
}
@@ -283,7 +283,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
pmv.glTranslatef(getXTran(), getYTran(), getZTran());
pmv.glRotatef(getAngle(), 0, 1, 0);
renderer.updateMatrix(gl);
- renderer.setColorStatic(gl, 1.0f, 0.0f, 0.0f);
+ renderer.setColorStatic(gl, 0.9f, 0.0f, 0.0f);
if( renderer.getRenderState().isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED) ) {
gl.glClearColor(1.0f, 0.0f, 0.0f, 0.0f);
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
index f22a5c56c..b6936dc0e 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
@@ -19,6 +19,7 @@ import com.jogamp.graph.curve.opengl.RenderState;
import com.jogamp.graph.font.Font;
import com.jogamp.graph.font.FontFactory;
import com.jogamp.graph.geom.SVertex;
+import com.jogamp.newt.MonitorDevice;
import com.jogamp.newt.Window;
import com.jogamp.newt.event.InputEvent;
import com.jogamp.newt.event.MouseAdapter;
@@ -54,8 +55,11 @@ public class GPUUISceneGLListener0A implements GLEventListener {
final float buttonXSize = 84f;
final float buttonYSize = buttonXSize/2.5f;
- final float fontSizeFixed = 12f;
- final float fontSizeFPS = 10f;
+ final float fontSizePt = 10f;
+ /** Proportional Window Height Font Size for Main Text, per-vertical-pixels [PVP] */
+ final float fontSizeFixedPVP = 0.046f;
+ /** Proportional Window Height Font Size for FPS Status Line, per-vertical-pixels [PVP] */
+ final float fontSizeFpsPVP = 0.038f;
float dpiH = 96;
private int currentText = 0;
@@ -64,6 +68,7 @@ public class GPUUISceneGLListener0A implements GLEventListener {
private Label[] labels = null;
private String[] strings = null;
private final List<RIButton> buttons = new ArrayList<RIButton>();
+ private Label truePtSizeLabel = null;
private Label jogampLabel = null;
private Label fpsLabel = null;
private CrossHair crossHairCtr = null;
@@ -74,6 +79,7 @@ public class GPUUISceneGLListener0A implements GLEventListener {
private final GLReadBufferUtil screenshot;
private final String jogamp = "JogAmp - Jogl Graph Module Demo";
+ private final String truePtSize = fontSizePt+" pt font size label - true scale!";
public GPUUISceneGLListener0A() {
this(0);
@@ -430,10 +436,9 @@ public class GPUUISceneGLListener0A implements GLEventListener {
"\n"+
"- Mouse Drag On Object\n"+
" - Click on Object and drag mouse\n"+
- " - Notice current postion in status line at buttom\n"+
+ " - Notice current postion in status line at bottom\n"+
"\n"+
- "- Tilt Button Rotate Whole Button Group\n"+
- "- Window Resize Shall Maintain Layout\n";
+ "- Tilt Button Rotate Whole Button Group\n";
strings[i++] = "abcdefghijklmn\nopqrstuvwxyz\n"+
"ABCDEFGHIJKL\n"+
@@ -443,13 +448,13 @@ public class GPUUISceneGLListener0A implements GLEventListener {
strings[i++] = "The quick brown fox\njumps over the lazy\ndog";
strings[i++] =
- "Lorem ipsum dolor sit amet, consectetur\n"+
- "Ut purus odio, rhoncus sit amet com\n"+
- "quam iaculis urna cursus ornare. Nullam\n"+
- "In hac habitasse platea dictumst. Vivam\n"+
- "Morbi quis bibendum nibh. Donec lectus\n"+
- "Donec ut dolor et nulla tristique variu\n"+
- "in lorem. Maecenas in ipsum ac justo sc\n";
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec \n"+
+ "Ut purus odio, rhoncus sit amet commodo eget, ullamcorper vel\n"+
+ "quam iaculis urna cursus ornare. Nullam ut felis a ante ultrices\n"+
+ "In hac habitasse platea dictumst. Vivamus et mi a quam lacinia\n"+
+ "Morbi quis bibendum nibh. Donec lectus orci, sagittis in consequat\n"+
+ "Donec ut dolor et nulla tristique varius. In nulla magna, fermentum\n"+
+ "in lorem. Maecenas in ipsum ac justo scelerisque sollicitudin.\n";
labels = new Label[i];
}
@@ -462,8 +467,13 @@ public class GPUUISceneGLListener0A implements GLEventListener {
final Object upObj = drawable.getUpstreamWidget();
if( upObj instanceof Window ) {
final float[] pixelsPerMM = new float[2];
- ((Window)upObj).getMainMonitor().getPixelsPerMM(pixelsPerMM);
+ final MonitorDevice mm = ((Window)upObj).getMainMonitor();
+ mm.getPixelsPerMM(pixelsPerMM);
dpiH = pixelsPerMM[1]*25.4f;
+ System.err.println("Monitor detected: "+mm);
+ System.err.println("Using monitor's DPI of "+(pixelsPerMM[0]*25.4f)+" x "+dpiH+" -> "+dpiH);
+ } else {
+ System.err.println("Using default DPI of "+dpiH);
}
if(drawable instanceof GLWindow) {
System.err.println("GPUUISceneGLListener0A: init (1)");
@@ -503,22 +513,37 @@ public class GPUUISceneGLListener0A implements GLEventListener {
sceneUIController.setRenderer(renderer);
- final float pixelSizeFixed = font.getPixelSize(fontSizeFixed, dpiH);
+ final float pixelSizeFixed = fontSizeFixedPVP * drawable.getHeight();
jogampLabel = new Label(SVertex.factory(), font, pixelSizeFixed, jogamp);
jogampLabel.addMouseListener(dragZoomRotateListener);
sceneUIController.addShape(jogampLabel);
jogampLabel.setEnabled(enableOthers);
- final float pixelSizeFPS = font.getPixelSize(fontSizeFPS, dpiH);
+ final float pixelSize10Pt = font.getPixelSize(fontSizePt, dpiH);
+ System.err.println("10Pt PixelSize: Display "+dpiH+" dpi, fontSize "+fontSizePt+" ppi -> "+pixelSize10Pt+" pixel-size");
+ truePtSizeLabel = new Label(SVertex.factory(), font, pixelSize10Pt, truePtSize);
+ sceneUIController.addShape(truePtSizeLabel);
+ truePtSizeLabel.setEnabled(enableOthers);
+ truePtSizeLabel.translate(0, - 1.5f * jogampLabel.getLineHeight(), 0f);
+ truePtSizeLabel.setColor(0.1f, 0.1f, 0.1f);
+
+ /**
+ *
+ * [Label] Display 112.88889 dpi, fontSize 12.0 ppi -> pixelSize 18.814816
+ * [FPS] Display 112.88889 dpi, fontSize 12.0 ppi -> pixelSize 15.679012
+ */
+ final float pixelSizeFPS = fontSizeFpsPVP * drawable.getHeight();
fpsLabel = new Label(renderer.getRenderState().getVertexFactory(), font, pixelSizeFPS, "Nothing there yet");
fpsLabel.addMouseListener(dragZoomRotateListener);
sceneUIController.addShape(fpsLabel);
fpsLabel.setEnabled(enableOthers);
+ fpsLabel.setColor(0.3f, 0.3f, 0.3f);
crossHairCtr = new CrossHair(renderer.getRenderState().getVertexFactory(), 100f, 100f, 2f);
crossHairCtr.addMouseListener(dragZoomRotateListener);
sceneUIController.addShape(crossHairCtr);
crossHairCtr.setEnabled(true);
+ crossHairCtr.translate(0f, 0f, -1f);
initButtons(gl, renderer);
for(int i=0; i<buttons.size(); i++) {
@@ -570,13 +595,15 @@ public class GPUUISceneGLListener0A implements GLEventListener {
final GL2ES2 gl = drawable.getGL().getGL2ES2();
if(null == labels[currentText]) {
- final float pixelSizeFixed = font.getPixelSize(fontSizeFixed, dpiH);
+ final float pixelSizeFixed = fontSizeFixedPVP * drawable.getHeight();
final float dyTop = drawable.getHeight() * relTop;
final float dxRight = drawable.getWidth() * relRight;
labels[currentText] = new Label(SVertex.factory(), font, pixelSizeFixed, strings[currentText]);
- labels[currentText].setColor(0, 0, 0);
+ labels[currentText].setColor(0.1f, 0.1f, 0.1f);
labels[currentText].setEnabled(enableOthers);
- labels[currentText].translate(dxRight, dyTop - 1.5f * jogampLabel.getLineHeight(), 0f);
+ labels[currentText].translate(dxRight,
+ dyTop - 1.5f * jogampLabel.getLineHeight()
+ - 1.5f * truePtSizeLabel.getLineHeight(), 0f);
labels[currentText].addMouseListener(dragZoomRotateListener);
sceneUIController.addShape(labels[currentText]);
}
@@ -596,13 +623,13 @@ public class GPUUISceneGLListener0A implements GLEventListener {
final String text;
if( null == actionText ) {
text = String.format("%03.1f/%03.1f fps, v-sync %d, fontSize %.1f, %s-samples %d, td %4.1f, blend %b, alpha-bits %d, msaa-bits %d",
- lfps, tfps, gl.getSwapInterval(), fontSizeFixed, modeS, sceneUIController.getSampleCount(), td,
+ lfps, tfps, gl.getSwapInterval(), fontSizeFixedPVP, modeS, sceneUIController.getSampleCount(), td,
renderer.getRenderState().isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED),
drawable.getChosenGLCapabilities().getAlphaBits(),
drawable.getChosenGLCapabilities().getNumSamples());
} else {
text = String.format("%03.1f/%03.1f fps, v-sync %d, fontSize %.1f, %s",
- lfps, tfps, gl.getSwapInterval(), fontSizeFixed, actionText);
+ lfps, tfps, gl.getSwapInterval(), fontSizeFixedPVP, actionText);
}
fpsLabel.setText(text);
}
@@ -631,6 +658,7 @@ public class GPUUISceneGLListener0A implements GLEventListener {
buttons.get(i).translate(dxLeft, dyTop, dz);
}
jogampLabel.translate(dxRight, dyTop, dz);
+ truePtSizeLabel.translate(dxRight, dyTop, dz);
fpsLabel.translate(0f, 0f, 0f);
if( null != labels[currentText] ) {
labels[currentText].translate(dxRight, dyTop, 0f);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00Base.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00Base.java
index d556f2963..2e13f22e2 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00Base.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00Base.java
@@ -65,9 +65,9 @@ public abstract class GLReadBuffer00Base extends UITestCase {
this.setRendererCallbacks(RegionRenderer.defaultBlendEnable, RegionRenderer.defaultBlendDisable);
regionFPS = GLRegion.create(usrRenderModes);
- staticRGBAColor[0] = 1.0f;
- staticRGBAColor[1] = 1.0f;
- staticRGBAColor[2] = 1.0f;
+ staticRGBAColor[0] = 0.9f;
+ staticRGBAColor[1] = 0.9f;
+ staticRGBAColor[2] = 0.9f;
staticRGBAColor[3] = 0.99f;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java
index 3aa400232..5ee0fc058 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java
@@ -174,9 +174,9 @@ public class MovieCube implements GLEventListener {
regionFPS = GLRegion.create(usrRenderModes);
System.err.println("RegionFPS "+Region.getRenderModeString(usrRenderModes)+", sampleCount "+textSampleCount[0]+", class "+regionFPS.getClass().getName());
- staticRGBAColor[0] = 0.0f;
- staticRGBAColor[1] = 0.0f;
- staticRGBAColor[2] = 0.0f;
+ staticRGBAColor[0] = 0.1f;
+ staticRGBAColor[1] = 0.1f;
+ staticRGBAColor[2] = 0.1f;
staticRGBAColor[3] = 1.0f;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java
index cb78165be..f0e9c4bde 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java
@@ -147,9 +147,9 @@ public class MovieSimple implements GLEventListener {
regionFPS = GLRegion.create(usrRenderModes);
System.err.println("RegionFPS "+Region.getRenderModeString(usrRenderModes)+", sampleCount "+textSampleCount[0]+", class "+regionFPS.getClass().getName());
- staticRGBAColor[0] = 1.0f;
- staticRGBAColor[1] = 1.0f;
- staticRGBAColor[2] = 1.0f;
+ staticRGBAColor[0] = 0.9f;
+ staticRGBAColor[1] = 0.9f;
+ staticRGBAColor[2] = 0.9f;
staticRGBAColor[3] = 1.0f;
}