public void run() { final FileStream file = GlobalFileSystem.getFile(texturePath); if (file.exists() == false) { Logger.println("Failed to create Texture: " + texturePath, Logger.Verbosity.NORMAL); return; } try { final DesktopByteIn in = (DesktopByteIn) file.getByteInStream(); final InputStream stream = in.getInputStream(); final BufferedImage image = ImageIO.read(stream); in.close(); synchronized (toBind) { // We don't want to bind the BufferedImage now // as that will take control of the OpenGL context. toBind.add(new Tuple<String, BufferedImage>(texturePath, image)); } } catch (IOException ex) { ex.printStackTrace(); } }