ya2 · news · projects · code · about

end frame
[pmachines.git] / pmachines / app.py
index f87bee384159904d193e4a82d8551250886db4e4..82208b2d351a9f384585ed5ae6387a2e013f8d39 100755 (executable)
@@ -100,17 +100,22 @@ class PmachinesApp:
         self._scene = cls(
             self.world, self.on_home,
             self._options['development']['auto_close_instructions'],
-            self._options['development']['debug_items'])
+            self._options['development']['debug_items'],
+            self.reload)
 
     def on_scene_exit(self):
         self._unset_physics()
         self._scene.destroy()
 
+    def reload(self, cls):
+        self._fsm.demand('Scene', cls)
+
     def _configure(self, args):
         load_prc_file_data('', 'window-title pmachines')
         load_prc_file_data('', 'framebuffer-srgb true')
         load_prc_file_data('', 'sync-video true')
-        load_prc_file_data('', 'threading-model Cull/Draw')
+        # load_prc_file_data('', 'threading-model Cull/Draw')
+        # it freezes when you go to the next scene
         if args.screenshots:
             load_prc_file_data('', 'window-type offscreen')
             load_prc_file_data('', 'audio-library-name null')