def idlefunc(self): global _thread_running,_app,_vis,_quit,_showdialog,_showwindow,_old_glut_window global _custom_run_method,_custom_run_retval,_globalLock _globalLock.acquire() if _quit: if bool(glutLeaveMainLoop): glutLeaveMainLoop() else: print "Not compiled with freeglut, can't exit main loop safely. Press Ctrl+C instead" raw_input() if not self.inDialog: if _showwindow: glutShowWindow() elif _showdialog: self.inDialog = True glutShowWindow() else: glutIconifyWindow() if _old_glut_window is not None: glutSetWindow(_old_glut_window) #need to refresh all appearances of objects for changed opengl context _vis.clearDisplayLists() if _custom_run_method: pass _globalLock.release() GLPluginProgram.idlefunc(self)
def idlefunc(self): global _thread_running,_app,_vis,_quit,_showdialog,_showwindow global _custom_run_method,_custom_run_retval if not self.inDialog: if _showwindow: glutShowWindow() else: glutIconifyWindow() if _showdialog: self.inDialog = True glutShowWindow() if _custom_run_method: pass GLPluginProgram.idlefunc(self)