change to use glPolygonMode funciton to control display type