public static int glLoadLinearPNG(String location) {
	    int texture = glGenTextures();
	    glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texture);
	    InputStream in = null;
	    try {
	        in = ClassLoader.getSystemResourceAsStream(location);
	        PNGDecoder decoder = new PNGDecoder(in);
	        ByteBuffer buffer = BufferUtils.createByteBuffer(4 * decoder.getWidth() * decoder.getHeight());
	        decoder.decode(buffer, decoder.getWidth() * 4, PNGDecoder.RGBA);
	        buffer.flip();
	        glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
	        glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
	        glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, decoder.getWidth(), decoder.getHeight(), 0, GL_RGBA,
	                GL_UNSIGNED_BYTE, buffer);
	    } catch (FileNotFoundException e) {
	        System.err.println("Texture file could not be found.");
	        return -1;
	    } catch (IOException e) {
	        System.err.print("Failed to load the texture file.");
	        return -1;
	    } finally {
	        if (in != null) {
	            try {
	                in.close();
	            } catch (IOException e) {
	                e.printStackTrace();
	            }
	        }
	    }
	    glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0);
	    return texture;
	}