diff options
author | Sven Gothel <[email protected]> | 2014-07-08 10:48:58 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-08 10:48:58 +0200 |
commit | 73d2a436f92e360126167d9ce09b3d9637204921 (patch) | |
tree | 56859d65e5793306949f989d83bf5a0306faa75c /src/jogl/classes/com/jogamp | |
parent | 96d530e7127c89db9991080e6268c6e8430d0619 (diff) |
Findbugs.switch-case: GLBuffers.bytesPerPixel(..) throw GLException for type BITMAP && format !COLOR_INDEX || !STENCIL_INDEX
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java index 67dc08450..44be29957 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java @@ -588,7 +588,10 @@ public class GLBuffers extends Buffers { case GL2.GL_BITMAP: if (GL2.GL_COLOR_INDEX == format || GL2ES2.GL_STENCIL_INDEX == format) { compSize = 1; + } else { + throw new GLException("BITMAP type only supported for format COLOR_INDEX and STENCIL_INDEX, not 0x"+Integer.toHexString(format)); } + break; case GL.GL_BYTE: case GL.GL_UNSIGNED_BYTE: compSize = 1; |