more code moved to GLUtils, partially solving #32