updated for glNext branch