示例#1
0
 def func():
     with _self.lockcm:
         if swap_buffers:
             r = _cmd.refresh_now(_self._COb)
         else:
             r = _cmd.refresh(_self._COb)
         return r
示例#2
0
def _refresh(swap_buffers=1, _self=cmd):  # Only call with GLUT thread!
    # WARNING: internal routine, subject to change
    r = None
    try:
        _self.lock(_self)
        if _self.is_gui_thread():
            if swap_buffers:
                r = _cmd.refresh_now(_self._COb)
            else:
                r = _cmd.refresh(_self._COb)
        else:
            r = _cmd.refresh_later(_self._COb)
    finally:
        _self.unlock(-1, _self)
    return r
示例#3
0
def _refresh(swap_buffers=1,_self=cmd):  # Only call with GLUT thread!
    # WARNING: internal routine, subject to change
    r = None
    try:
        _self.lock(_self)
        if hasattr(_self._pymol,'glutThread'):
            if thread.get_ident() == _self._pymol.glutThread:
                if swap_buffers:
                    r = _cmd.refresh_now(_self._COb)
                else:
                    r = _cmd.refresh(_self._COb)
            else:
                r = _cmd.refresh_later(_self._COb)                
        else:
            r = _cmd.refresh_later(_self._COb)
    finally:
        _self.unlock(-1,_self)
    return r
示例#4
0
文件: internal.py 项目: evonove/pymol
def _refresh(swap_buffers=1,_self=cmd):  # Only call with GLUT thread!
    # WARNING: internal routine, subject to change
    r = None
    try:
        _self.lock(_self)
        if hasattr(_self._pymol,'glutThread'):
            if thread.get_ident() == _self._pymol.glutThread:
                if swap_buffers:
                    r = _cmd.refresh_now(_self._COb)
                else:
                    r = _cmd.refresh(_self._COb)
            else:
                r = _cmd.refresh_later(_self._COb)                
        else:
            r = _cmd.refresh_later(_self._COb)
    finally:
        _self.unlock(-1,_self)
    return r