Changed polygonmode bool to viewmode enum.