def export_loop(): global chrono, frame while chrono < movie_duration: chrono += DT frame += 1 rules.tick(dt) # tick with the constant DT, regardless of real time interval # so that even if refresh is slow no frame should be missing glClear(GL_COLOR_BUFFER_BIT) shapes.paint() save_a_frame(frame) print(frame) print 'done' print 'image dir is : ', os.getcwd() exit(0)
def export_loop(): global chrono, frame while chrono < movie_duration: chrono += DT frame += 1 rules.tick(dt) # tick with the constant DT, regardless of real time interval # so that even if refresh is slow no frame should be missing glClear(GL_COLOR_BUFFER_BIT) shapes.paint() save_a_frame(frame) print(frame) print 'done' print'image dir is : ', os.getcwd() exit(0)
def tick(dt): if paused: pass else: rules.tick(dt)