public static Texture loadTexture(final String textureLocation)
			throws IOException
	{
		if (!FILE_NAME_TO_TEXTURE.containsKey(textureLocation))
		{
			final BufferedImage bufferedImage = ImageIO.read(new File(
					textureLocation));
			final int[] pixels = new int[bufferedImage.getWidth()
					* bufferedImage.getHeight()];

			bufferedImage.getRGB(0, 0, bufferedImage.getWidth(),
					bufferedImage.getHeight(), pixels, 0,
					bufferedImage.getWidth());
			final ByteBuffer byteBuffer = BufferUtils
					.createByteBuffer(bufferedImage.getWidth()
							* bufferedImage.getHeight() * BYTES_PER_PIXEL);

			for (int y = 0; y < bufferedImage.getHeight(); y++)
			{
				for (int x = 0; x < bufferedImage.getWidth(); x++)
				{
					final int pixel = pixels[y * bufferedImage.getWidth() + x];
					// RGBA pixels in order
					byteBuffer.put((byte) ((pixel >> 16) & 0xFF));
					byteBuffer.put((byte) ((pixel >> 8) & 0xFF));
					byteBuffer.put((byte) (pixel & 0xFF));
					byteBuffer.put((byte) ((pixel >> 24) & 0xFF));
				}
			}

			byteBuffer.flip();

			final int textureID = GL11.glGenTextures();
			glBindTexture(GL_TEXTURE_2D, textureID);
			// TODO Need a way to set custom texture properties here. Perhaps
			// only do this in a bind method in Texture?
			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE);
			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE);
			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

			glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, bufferedImage.getWidth(),
					bufferedImage.getHeight(), 0, GL_RGBA, GL_UNSIGNED_BYTE,
					byteBuffer);
			glBindTexture(GL_TEXTURE_2D, 0);

			FILE_NAME_TO_TEXTURE
					.put(textureLocation,
							new Texture(byteBuffer, textureID, bufferedImage
									.getWidth(), bufferedImage.getHeight()));
		}

		return FILE_NAME_TO_TEXTURE.get(textureLocation);
	}