public void render() {
		BufferStrategy bs = getBufferStrategy();
		if (bs == null) {
			createBufferStrategy(3);
			return;
		}
		
		if(image == null || pixels == null || width != getWidth() || height != getHeight()) {
			resize();
		}
		
		Graphics2D g2d = (Graphics2D)image.getGraphics();
		g2d.setFont(Util.getFont(40));
		g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
		g2d.setColor(Color.BLACK);
		g2d.fillRect(0, 0, width, height);
		
		if(gameRenderer != null)
			if(currentScreen == null || currentScreen.renderGame())
				gameRenderer.render(this, g2d, width, height);
		
		if(currentScreen != null)
			currentScreen.render(this, g2d, width, height);
		
		Graphics g = bs.getDrawGraphics();
		g.fillRect(0, 0, getWidth(), getHeight());
		g.drawImage(image, 0, 0, getWidth(), getHeight(), 0, 0, image.getWidth(), image.getHeight(), null);
		g.dispose();
		bs.show();
	}