From cb38b392ed47d3994251858fac6a2e4abe851eda Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 17 Jul 2003 20:35:08 +0000 Subject: Worked around 4764639/4892246 git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@15 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/vertexProgRefract/VertexProgRefract.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/demos/vertexProgRefract') 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); } -- cgit v1.2.3