diff options
-rw-r--r-- | src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java | 3 | ||||
-rw-r--r-- | src/demos/vertexProgRefract/VertexProgRefract.java | 3 | ||||
-rw-r--r-- | www/webstart/jogl-demos.jar | bin | 104920 -> 104891 bytes |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java index e917ca2..74ecbdd 100644 --- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java +++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java @@ -478,7 +478,8 @@ public class HWShadowmapsSimple { private BufferedImage readPNGImage(String resourceName) { try { - BufferedImage img = ImageIO.read(getClass().getClassLoader().getResourceAsStream(resourceName)); + // Note: use of BufferedInputStream works around 4764639/4892246 + BufferedImage img = ImageIO.read(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(resourceName))); if (img == null) { throw new RuntimeException("Error reading resource " + resourceName); } diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java index c14f204..0670898 100644 --- a/src/demos/vertexProgRefract/VertexProgRefract.java +++ b/src/demos/vertexProgRefract/VertexProgRefract.java @@ -468,7 +468,8 @@ public class VertexProgRefract { private void loadPNGCubemap(GL gl, GLU glu, String baseName, boolean mipmapped) throws IOException { for (int i = 0; i < suffixes.length; i++) { String resourceName = baseName + "_" + suffixes[i] + ".png"; - BufferedImage img = ImageIO.read(getClass().getClassLoader().getResourceAsStream(resourceName)); + // Note: use of BufferedInputStream works around 4764639/4892246 + BufferedImage img = ImageIO.read(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(resourceName))); if (img == null) { throw new RuntimeException("Error reading PNG image " + resourceName); } diff --git a/www/webstart/jogl-demos.jar b/www/webstart/jogl-demos.jar Binary files differindex 7746a16..1b1803f 100644 --- a/www/webstart/jogl-demos.jar +++ b/www/webstart/jogl-demos.jar |