@Override
	public void display(GLAutoDrawable a) 
	{
		GL2 device = a.getGL().getGL2();
		//Set projection.
		this.setProjection(device);
		//Set GL up for rendering a new scene.
		this.setUpGL(device);
		//Execute asynchronously requested updates.
		this.checkForAsyncUpdates();
		
		/*
		device.glBegin(GL2.GL_QUADS);
		device.glColor3b((byte)46, (byte)46, (byte)66);
		device.glVertex3d(1, 1, 0);
		device.glVertex3d(1, 2, 0);
		device.glVertex3d(2, 2, 0);
		device.glVertex3d(2, 1, 0);
		device.glEnd();
		*/
		
		//Render everything in the render list.
		for(int i = 0; i < batch.numberOfTextures(); i++) {
			batch.getTexture(i).enable(device);
			device.glBegin(GL2.GL_QUADS);
			ArrayList<Renderable> renderList = this.getRenderListForTexture(batch.getTexture(i));
			for(int obj = 0; obj < renderList.size(); obj++)
				renderList.get(obj).render(device); //Render all objects.
			device.glEnd();
			batch.getTexture(i).disable(device);
		}
	}