summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-14 01:09:45 +0200
committerSven Gothel <[email protected]>2014-09-14 01:09:45 +0200
commit46a2de9a202c6c5e37bbf40fe2fde9b675f5e34e (patch)
tree9ab5f0f697b4ada0012394f42d62f433c27414ff /src
parent6afc739fc2d5e4378508f2fcdac8f3951eee879c (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')
-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 89f69e000..58aa8cd23 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
@@ -190,6 +190,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;