public static void screenshot()
	{
		glReadBuffer(GL_FRONT);
		ByteBuffer buffer = BufferUtils.createByteBuffer(WIDTH * HEIGHT * 4);
		glReadPixels(0, 0, WIDTH, HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
		
		BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);
		
		for(int x = 0; x < WIDTH; x++)
			for(int y = 0; y < HEIGHT; y++)
			{
				int pixel = 4 * (x + WIDTH * y);
				int red = buffer.get(pixel) & 0xFF;
				int green = buffer.get(pixel+1) & 0xFF;
				int blue = buffer.get(pixel+2) & 0xFF;
				image.setRGB(x, HEIGHT-y-1, ((red << 16) | (green << 8) | blue));
			}
		
		try
		{
			String date = getDate();
			date = "[" + date.substring(DATE_PREFIX.length(), date.length() - SUFFIX.length()) + "]_";
			String time = getTime();
			time = "[" + time.substring(TIME_PREFIX.length(), time.length() - SUFFIX.length()) + "]";
			
			new File("screenshots" + File.separator).mkdirs();
			
			String type = ".png";
			String name = "screenshots" + File.separator + date + time + type;
			File file = new File(name);
			
			int i = 1;
			while(file.exists())
			{
				file = new File(name.substring(0, name.length() - type.length()) + String.valueOf(i) + type);
				i++;
			}
			
			file.createNewFile();
			
			BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
			ImageIO.write(image, "PNG", out);
			
			System.out.println("Screenshot saved as: " + file.getName());
			
			out.close();
		}
		catch(IOException e)
		{
			System.err.println("Screenshot failed to save!");
			e.printStackTrace();
		}
	}