Exemplo n.º 1
0
    def DrawGLScene(self):
        if self.exiting:
            glutDestroyWindow(glutGetWindow())
            return

        try:
            self._draw_gl_scene_error_handled()
        except Exception as error:
            traceback_printer.print_traceback()
            self.exiting = True
            raise error
Exemplo n.º 2
0
    def DrawGLScene(self):
        if self.exiting:
            self.logger.debug("total number of rendered frames: %s" % self._frame_count)
            self.logger.debug("total FPS: %s" % (float(self._frame_count) / self.stopwatch.get_elapsed_time()))
            if self.args.profile:
                import yappi
                yappi.print_stats(sys.stdout, yappi.SORTTYPE_TTOT)
            glutDestroyWindow(glutGetWindow())
            return

        try:
            self._draw_gl_scene_error_handled()
        except Exception as error:
            traceback_printer.print_traceback()
            self.exiting = True
            raise error
Exemplo n.º 3
0
 def _fire_callback_with_exception_handler(self, path, args, types, src, callback, user_data):
     try:
         callback(path, args, types, src, user_data)
     except Exception as err:
         traceback_printer.print_traceback()
         raise err