From a00ee5f8126aeb7deadb3fbd4a7210b8ea0feda1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 8 Jul 2014 22:12:48 +0200 Subject: Findbugs: Use 'float' division instead of integer for float results --- src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OneTriangle.java | 2 +- .../com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES1ImmModeSink.java | 2 +- .../com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/com/jogamp/opengl') 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); } -- cgit v1.2.3