aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-14 01:09:45 +0200
committerSven Gothel <[email protected]>2014-09-14 01:21:01 +0200
commitb084083a3d61f4e7a6a33c0c12ac529f0464f4a8 (patch)
tree496e9936cf213b475adbad1c590db710eb054b28 /src/test/com/jogamp/opengl
parenta69cca1d238615590a1d2d6da5d2533c46b3abf5 (diff)
Gears* Demos: Spin at same speed (0.5f tan per frame) ; GearsES2: Bring back default Z values, allow Z customization (StereoDemo01)
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java1
4 files changed, 12 insertions, 5 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java
index b1df926dc..3fdafdfd8 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java
@@ -248,7 +248,7 @@ public class GearsES1 implements GLEventListener {
public void display(final GLAutoDrawable drawable) {
// Turn the gears' teeth
- angle += 2.0f;
+ angle += 0.5f;
// Get the GL corresponding to the drawable we are animating
final GL2ES1 gl = drawable.getGL().getGL2ES1();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
index 84cd8936e..b3da5a53a 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
@@ -352,9 +352,15 @@ public class GearsES2 implements StereoGLEventListener, TileRendererBase.TileRen
reshapeImpl(gl, tileX, tileY, tileWidth, tileHeight, imageWidth, imageHeight);
}
- private final float zNear = 2f;
- private final float zFar = 10000f;
- private final float zViewDist = 20.0f;
+ private float zNear = 5f;
+ private float zFar = 10000f;
+ private float zViewDist = 40.0f;
+
+ public void setZ(final float zNear, final float zFar, final float zViewDist) {
+ this.zNear = zNear;
+ this.zFar = zFar;
+ this.zViewDist = zViewDist;
+ }
void reshapeImpl(final GL2ES2 gl, final int tileX, final int tileY, final int tileWidth, final int tileHeight, final int imageWidth, final int imageHeight) {
final boolean msaa = gl.getContext().getGLDrawable().getChosenGLCapabilities().getSampleBuffers();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java
index dbc760d15..deee8a7aa 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java
@@ -314,7 +314,7 @@ public class Gears implements GLEventListener, TileRendererBase.TileRendererList
private void displayImpl(final GL2 gl) {
if( doRotate ) {
// Turn the gears' teeth
- angle += 2.0f;
+ angle += 0.5f;
}
// Rotate the entire assembly of gears based on how the user
// dragged the mouse around
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java
index 142c941a5..a256124b0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java
@@ -191,6 +191,7 @@ public class StereoDemo01 {
upstream = movieSimple;
} else {
final GearsES2 demo = new GearsES2(0);
+ demo.setZ(2f, 10000f, 20f); // start closer to eye
demo.setVerbose(false);
upstream = demo;
movieSimple = null;