summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-08 22:12:48 +0200
committerSven Gothel <[email protected]>2014-07-08 22:12:48 +0200
commita00ee5f8126aeb7deadb3fbd4a7210b8ea0feda1 (patch)
tree84448bc0209aac9203d6116e15df06bb0290c860 /src/test/com/jogamp/opengl
parentcc9361f542d3b8bcbbf5edbd07c8e686b06ce66e (diff)
Findbugs: Use 'float' division instead of integer for float results
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OneTriangle.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES1ImmModeSink.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OneTriangle.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OneTriangle.java
index 80f58d74a..aaa7da3fe 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OneTriangle.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OneTriangle.java
@@ -74,7 +74,7 @@ public class OneTriangle {
immModeSink.glColor3f( 0, 1, 0 );
immModeSink.glVertex2f( width, 0 );
immModeSink.glColor3f( 0, 0, 1 );
- immModeSink.glVertex2f( width / 2, height );
+ immModeSink.glVertex2f( width / 2f, height );
immModeSink.glEnd(gl, true);
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES1ImmModeSink.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES1ImmModeSink.java
index ec3049364..b3f85e879 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES1ImmModeSink.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES1ImmModeSink.java
@@ -111,7 +111,7 @@ class DemoGL2ES1ImmModeSink implements GLEventListener {
ims.glColor3f( 0, 1, 0 );
ims.glVertex2f( drawable.getSurfaceWidth(), 0 );
ims.glColor3f( 0, 0, 1 );
- ims.glVertex2f( drawable.getSurfaceWidth() / 2, drawable.getSurfaceHeight() );
+ ims.glVertex2f( drawable.getSurfaceWidth() / 2f, drawable.getSurfaceHeight() );
ims.glEnd(gl, true);
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java
index f2616d987..3dc29381a 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java
@@ -160,7 +160,7 @@ public class DemoGL2ES2ImmModeSink implements GLEventListener {
ims.glColor3f( 0, 1, 0 );
ims.glVertex2f( drawable.getSurfaceWidth(), 0 );
ims.glColor3f( 0, 0, 1 );
- ims.glVertex2f( drawable.getSurfaceWidth() / 2, drawable.getSurfaceHeight() );
+ ims.glVertex2f( drawable.getSurfaceWidth() / 2f, drawable.getSurfaceHeight() );
ims.glEnd(gl, true);
}