Commit e4a200a810de355f0653e95feb6a7fb171c7f619

  • avatar
  • MichaƂ Januszewski <spock @gen…oo.org>
  • Wed Feb 10 00:02:54 CET 2010
Make it possible to change the OpenGL polygon mode with the 'w' key.
  
6060 self.mesh_y = self.mesh_y.astype(numpy.float32)
6161 self.mesh_n = (self.lat_nx-1) * (self.lat_ny-1) * 4
6262
63 self._polygon_mode = 0
6364 self._show_info = True
6465 self._velocity = False
6566 self._paused = False
196196 self._maxv /= 1.1
197197 elif event.key == pygame.K_PERIOD:
198198 self._maxv *= 1.1
199 elif event.key == pygame.K_w:
200 modes = [GL_FILL, GL_LINE, GL_POINT]
201 self._polygon_mode += 1
202 self._polygon_mode %= 3
203 glPolygonMode(GL_FRONT_AND_BACK, modes[self._polygon_mode]);
199204
200205 def main(self):
201206 t_prev = time.time()