use vertex array instead of glBegin