gl3n: port from the old vector code to gl3n