diff options
author | Sven Gothel <[email protected]> | 2014-07-08 22:14:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-08 22:14:45 +0200 |
commit | a2b75f52db38be223261cd378a4bc330cc2d3ede (patch) | |
tree | 08d6dc1f5315c00a34ad17229deff66e82b3b6f0 /src/test | |
parent | a00ee5f8126aeb7deadb3fbd4a7210b8ea0feda1 (diff) |
Findbugs: Misc issues (Use private accessors of static fields; Use boolean operator; Avoid NPE
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java | 2 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java index d2f0d89eb..7c4c5106b 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java @@ -75,7 +75,7 @@ public class MultisampleDemoES2 implements GLEventListener { System.err.println(); System.err.println("req. msaa: "+multisample); System.err.println("Requested: " + glad.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities()); - multisample = multisample & glad.getChosenGLCapabilities().getNumSamples() > 0 ; + multisample = multisample && glad.getChosenGLCapabilities().getNumSamples() > 0 ; System.err.println("Chosen : " + glad.getChosenGLCapabilities()); System.err.println("has msaa: "+multisample); System.err.println(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java index 9e643ded6..c87c04f7e 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java @@ -125,8 +125,8 @@ public class TextureDraw01ES2Listener implements GLEventListener, TextureDraw01A @Override public void init(final GLAutoDrawable glad) { - if(null!=textureData) { - this.texture = TextureIO.newTexture(glad.getGL(), textureData); + if( null != textureData ) { + texture = TextureIO.newTexture(glad.getGL(), textureData); } final GL2ES2 gl = glad.getGL().getGL2ES2(); @@ -148,8 +148,10 @@ public class TextureDraw01ES2Listener implements GLEventListener, TextureDraw01A throw new GLException("Error setting mgl_ActiveTexture in shader: "+st); } - // fetch the flipped texture coordinates - texture.getImageTexCoords().getST_LB_RB_LT_RT(s_quadTexCoords, 0, 1f, 1f); + if( null != texture ) { + // fetch the flipped texture coordinates + texture.getImageTexCoords().getST_LB_RB_LT_RT(s_quadTexCoords, 0, 1f, 1f); + } interleavedVBO = GLArrayDataServer.createGLSLInterleaved(3+4+2, GL.GL_FLOAT, false, 3*4, GL.GL_STATIC_DRAW); { |