// Store enabled state and disable lighting, texture mapping and the depth buffer
gl.glPushAttrib(GL.GL_ENABLE_BIT);
gl.glDisable(GL.GL_BLEND);
gl.glDisable(GL.GL_LIGHTING);
gl.glDisable(GL.GL_TEXTURE_2D);
gl.glDisable(GL.GL_DEPTH_TEST);
// Retrieve the current viewport and switch to orthographic mode
IntBuffer viewPort = BufferUtil.newIntBuffer(4);
gl.glGetIntegerv(GL.GL_VIEWPORT, viewPort);
glu.gluOrtho2D(0, viewPort.get(2), viewPort.get(3), 0);