cleanup and consolidate glGet