Support UNDO in openGL