aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java3
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java69
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java10
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java6
8 files changed, 53 insertions, 51 deletions
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 f675e42cd..826c08ed4 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
@@ -66,7 +66,6 @@ public class TestTextRendererNEWT00 extends UITestCase {
static final boolean TRACE = false;
static long duration = 100; // ms
- static final float[] textPosition = new float[] {0,0,0};
static final int[] texSize = new int[] { 0 };
static final int fontSize = 24;
static Font font;
@@ -175,7 +174,7 @@ public class TestTextRendererNEWT00 extends UITestCase {
dy -= (int)textBox.getHeight() * ( row + 1 );
renderer.resetModelview(null);
renderer.translate(gl, dx, dy, z0);
- renderer.drawString3D(gl, font, text, textPosition, fontSize, texSize);
+ renderer.drawString3D(gl, font, text, fontSize, texSize);
lastRow = row;
}
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 bfa942cc1..77f562dda 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
@@ -61,7 +61,6 @@ public class TestTextRendererNEWT10 extends UITestCase {
static boolean forceGL3 = false;
static boolean mainRun = false;
- static final float[] textPosition = new float[] {0,0,0};
static final int[] texSize = new int[] { 0 };
static final int fontSize = 24;
static Font font;
@@ -162,7 +161,6 @@ public class TestTextRendererNEWT10 extends UITestCase {
NEWTGLContext.destroyWindow(winctx);
}
- int screenshot_num = 0;
int lastRow = -1;
@@ -179,7 +177,7 @@ public class TestTextRendererNEWT10 extends UITestCase {
dy -= (int)textBox.getHeight() * ( row + 1 );
renderer.resetModelview(null);
renderer.translate(gl, dx, dy, z0);
- renderer.drawString3D(gl, font, text, textPosition, fontSize, texSize);
+ renderer.drawString3D(gl, font, text, fontSize, texSize);
lastRow = row;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
index 46557e8c8..43e5537e9 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
@@ -120,6 +120,6 @@ public class GPURegionGLListener01 extends GPURegionRendererListenerBase01 {
if( weight != regionRenderer.getWeight()) {
regionRenderer.setWeight(gl, weight);
}
- regionRenderer.draw(gl, region, getPosition(), getTexSize());
+ regionRenderer.draw(gl, region, getTexSize());
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java
index 525c5e648..3565dbc48 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java
@@ -28,6 +28,9 @@
package com.jogamp.opengl.test.junit.graph.demos;
+import java.util.ArrayList;
+import java.util.List;
+
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES2;
import javax.media.opengl.GLAutoDrawable;
@@ -42,7 +45,7 @@ import com.jogamp.graph.curve.opengl.RenderState;
*
*/
public class GPURegionGLListener02 extends GPURegionRendererListenerBase01 {
- OutlineShape[] outlineShapes = new OutlineShape[2];
+ List<OutlineShape> outlineShapes = new ArrayList<OutlineShape>();
public GPURegionGLListener02 (RenderState rs, int renderModes, int fbosize, boolean debug, boolean trace) {
super(rs, renderModes, debug, trace);
@@ -51,39 +54,41 @@ public class GPURegionGLListener02 extends GPURegionRendererListenerBase01 {
private void createTestOutline(){
float offset = 0;
- outlineShapes[0] = new OutlineShape(getRenderer().getRenderState().getVertexFactory());
- outlineShapes[0].addVertex(0.0f,-10.0f,true);
- outlineShapes[0].addVertex(15.0f,-10.0f, true);
- outlineShapes[0].addVertex(10.0f,5.0f, false);
- outlineShapes[0].addVertex(15.0f,10.0f, true);
- outlineShapes[0].addVertex(6.0f,15.0f, false);
- outlineShapes[0].addVertex(5.0f,8.0f, false);
- outlineShapes[0].addVertex(0.0f,10.0f,true);
- outlineShapes[0].closeLastOutline();
- outlineShapes[0].addEmptyOutline();
- outlineShapes[0].addVertex(5.0f,-5.0f,true);
- outlineShapes[0].addVertex(10.0f,-5.0f, false);
- outlineShapes[0].addVertex(10.0f,0.0f, true);
- outlineShapes[0].addVertex(5.0f,0.0f, false);
- outlineShapes[0].closeLastOutline();
+ OutlineShape shape = new OutlineShape(getRenderer().getRenderState().getVertexFactory());
+ outlineShapes.add(shape);
+ shape.addVertex(0.0f,-10.0f,true);
+ shape.addVertex(15.0f,-10.0f, true);
+ shape.addVertex(10.0f,5.0f, false);
+ shape.addVertex(15.0f,10.0f, true);
+ shape.addVertex(6.0f,15.0f, false);
+ shape.addVertex(5.0f,8.0f, false);
+ shape.addVertex(0.0f,10.0f,true);
+ shape.closeLastOutline();
+ shape.addEmptyOutline();
+ shape.addVertex(5.0f,-5.0f,true);
+ shape.addVertex(10.0f,-5.0f, false);
+ shape.addVertex(10.0f,0.0f, true);
+ shape.addVertex(5.0f,0.0f, false);
+ shape.closeLastOutline();
/** Same shape as above but without any off-curve vertices */
- outlineShapes[1] = new OutlineShape(getRenderer().getRenderState().getVertexFactory());
+ shape = new OutlineShape(getRenderer().getRenderState().getVertexFactory());
+ outlineShapes.add(shape);
offset = 30;
- outlineShapes[1].addVertex(offset+0.0f,-10.0f, true);
- outlineShapes[1].addVertex(offset+17.0f,-10.0f, true);
- outlineShapes[1].addVertex(offset+11.0f,5.0f, true);
- outlineShapes[1].addVertex(offset+16.0f,10.0f, true);
- outlineShapes[1].addVertex(offset+7.0f,15.0f, true);
- outlineShapes[1].addVertex(offset+6.0f,8.0f, true);
- outlineShapes[1].addVertex(offset+0.0f,10.0f, true);
- outlineShapes[1].closeLastOutline();
- outlineShapes[1].addEmptyOutline();
- outlineShapes[1].addVertex(offset+5.0f,0.0f, true);
- outlineShapes[1].addVertex(offset+5.0f,-5.0f, true);
- outlineShapes[1].addVertex(offset+10.0f,-5.0f, true);
- outlineShapes[1].addVertex(offset+10.0f,0.0f, true);
- outlineShapes[1].closeLastOutline();
+ shape.addVertex(offset+0.0f,-10.0f, true);
+ shape.addVertex(offset+17.0f,-10.0f, true);
+ shape.addVertex(offset+11.0f,5.0f, true);
+ shape.addVertex(offset+16.0f,10.0f, true);
+ shape.addVertex(offset+7.0f,15.0f, true);
+ shape.addVertex(offset+6.0f,8.0f, true);
+ shape.addVertex(offset+0.0f,10.0f, true);
+ shape.closeLastOutline();
+ shape.addEmptyOutline();
+ shape.addVertex(offset+5.0f,0.0f, true);
+ shape.addVertex(offset+5.0f,-5.0f, true);
+ shape.addVertex(offset+10.0f,-5.0f, true);
+ shape.addVertex(offset+10.0f,0.0f, true);
+ shape.closeLastOutline();
region = GLRegion.create(outlineShapes, getRenderModes());
}
@@ -118,7 +123,7 @@ public class GPURegionGLListener02 extends GPURegionRendererListenerBase01 {
if( weight != regionRenderer.getWeight()) {
regionRenderer.setWeight(gl, weight);
}
- regionRenderer.draw(gl, region, getPosition(), getTexSize());
+ regionRenderer.draw(gl, region, getTexSize());
}
}
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 1dc104cbb..2ab0632d3 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
@@ -162,7 +162,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
final int fpsSp = fpsS.indexOf('.');
textRenderer.resetModelview(null);
textRenderer.translate(gl, fontSizeFixed, fontSizeFixed, -6000);
- textRenderer.drawString3D(gl, font, fpsS.substring(0, fpsSp+2)+" fps", getPosition(), fontSizeFixed*3, getTexSize());
+ textRenderer.drawString3D(gl, font, fpsS.substring(0, fpsSp+2)+" fps", fontSizeFixed*3, getTexSize());
}
int dx = width-(int)fontNameBox.getWidth()-2 ;
@@ -170,7 +170,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
textRenderer.resetModelview(null);
textRenderer.translate(gl, dx, dy, -6000);
- textRenderer.drawString3D(gl, font, fontName, getPosition(), fontSizeFixed*2, getTexSize());
+ textRenderer.drawString3D(gl, font, fontName, fontSizeFixed*2, getTexSize());
dx = 10;
dy += -(int)fontNameBox.getHeight() - 10;
@@ -178,7 +178,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
if(null != headtext) {
textRenderer.resetModelview(null);
textRenderer.translate(gl, dx, dy, -6000);
- textRenderer.drawString3D(gl, font, headtext, getPosition(), fontSizeFixed*3, getTexSize());
+ textRenderer.drawString3D(gl, font, headtext, fontSizeFixed*3, getTexSize());
}
textRenderer.reshapePerspective(null, 45.0f, width, height, 0.1f, 7000.0f);
@@ -188,9 +188,9 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB
textRenderer.rotate(gl, getAngle(), 0, 1, 0);
textRenderer.setColorStatic(gl, 1.0f, 0.0f, 0.0f);
if(!userInput) {
- textRenderer.drawString3D(gl, font, text2, getPosition(), fontSize, getTexSize());
+ textRenderer.drawString3D(gl, font, text2, fontSize, getTexSize());
} else {
- textRenderer.drawString3D(gl, font, userString.toString(), getPosition(), fontSize, getTexSize());
+ textRenderer.drawString3D(gl, font, userString.toString(), fontSize, getTexSize());
}
}
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 59ce28408..c9a3f5542 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
@@ -300,7 +300,7 @@ public class GPUUISceneGLListener0A implements GLEventListener {
regionRenderer.scale(gl, 1.5f, 1.5f, 1.0f);
regionRenderer.rotate(gl, angText , 0, 1, 0);
regionRenderer.setColorStatic(gl, 0.0f, 1.0f, 0.0f);
- regionRenderer.draw(gl, jogampRegion.getRegion(gl, rs, 0), new float[]{0,0,0}, null);
+ regionRenderer.draw(gl, jogampRegion.getRegion(gl, rs, 0), null);
if(null == labelRegions[currentText]) {
if( null == labels[currentText]) {
@@ -321,7 +321,7 @@ public class GPUUISceneGLListener0A implements GLEventListener {
regionRenderer.rotate(gl, zoomText, 0, 1, 0);
regionRenderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
- regionRenderer.draw(gl, labelRegions[currentText].getRegion(gl, rs, renderModes2), new float[]{0,0,0}, texSize2);
+ regionRenderer.draw(gl, labelRegions[currentText].getRegion(gl, rs, renderModes2), texSize2);
final GLAnimatorControl animator = drawable.getAnimator();
final boolean _drawFPS = showFPS && null != animator;
@@ -344,7 +344,7 @@ public class GPUUISceneGLListener0A implements GLEventListener {
if(showFPS && null != fpsRegion) {
regionRenderer.translate(gl, 0, -60, 0);
regionRenderer.scale(null, zoomText, zoomText, 1);
- regionRenderer.draw(gl, fpsRegion.getRegion(gl, rs, 0), new float[]{0,0,0}, null);
+ regionRenderer.draw(gl, fpsRegion.getRegion(gl, rs, 0), null);
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java
index 12c90f87d..3060c5657 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java
@@ -215,7 +215,7 @@ public abstract class RIButton extends UIShape {
if(!selection){
renderer.setColorStatic(gl, bColor[0], bColor[1], bColor[2]);
}
- renderer.draw(gl, buttonRegion.getRegion(gl, rs, renderModes), getPosition(), texSize);
+ renderer.draw(gl, buttonRegion.getRegion(gl, rs, renderModes), texSize);
gl.glDisable(GL2ES2.GL_POLYGON_OFFSET_FILL);
float[] lColor = labelColor;
@@ -225,7 +225,7 @@ public abstract class RIButton extends UIShape {
if(!selection){
renderer.setColorStatic(gl, lColor[0], lColor[1], lColor[2]);
}
- renderer.draw(gl, labelRegion.getRegion(gl, rs, renderModes), getPosition(), texSize);
+ renderer.draw(gl, labelRegion.getRegion(gl, rs, renderModes), texSize);
}
public void setPressed(boolean b) {
super.setPressed(b);
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java
index da94f6a7c..0915ea523 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java
@@ -109,10 +109,10 @@ public class UIGLListener01 extends UIListenerBase01 {
}
regionRenderer.setColorStatic(gl, bColor[0], bColor[1], bColor[2]);
- regionRenderer.draw(gl, regionButton.getRegion(gl, rs, 0), getPosition(), null);
-// regionRenderer.translate(gl, button.getPosition()[0], button.getPosition()[1], button.getPosition()[2]);
+ regionRenderer.translate(gl, button.getPosition()[0], button.getPosition()[1], button.getPosition()[2]);
+ regionRenderer.draw(gl, regionButton.getRegion(gl, rs, 0), null);
regionRenderer.setColorStatic(gl, lColor[0], lColor[1], lColor[2]);
- regionRenderer.draw(gl, regionLabel.getRegion(gl, rs, 0), getPosition(), null);
+ regionRenderer.draw(gl, regionLabel.getRegion(gl, rs, 0), null);
}
public void dispose(GLAutoDrawable drawable) {