updated for glNext
TODO migrate the lines commented out with //BL