コード例 #1
0
    def destroy(self):
        """Release the context.

        The context will not be useable after being destroyed.  Each platform
        has its own convention for releasing the context and the buffer(s)
        that depend on it in the correct order; this should never be called
        by an application.
        """
        self.detach()

        if gl.current_context is self:
            gl.current_context = None
            gl_info.remove_active_context()
コード例 #2
0
ファイル: __init__.py プロジェクト: KevinGoodsell/sympy
    def destroy(self):
        '''Release the context.

        The context will not be useable after being destroyed.  Each platform
        has its own convention for releasing the context and the buffer(s)
        that depend on it in the correct order; this should never be called
        by an application.
        '''
        global _current_context
        if _current_context is self:
            _current_context = None
            gl_info.remove_active_context()
        _contexts.remove(self)
コード例 #3
0
    def destroy(self):
        '''Release the context.

        The context will not be useable after being destroyed.  Each platform
        has its own convention for releasing the context and the buffer(s)
        that depend on it in the correct order; this should never be called
        by an application.
        '''
        global current_context
        if current_context is self:
            current_context = None
            gl_info.remove_active_context()

            # Switch back to shadow context.
            if _shadow_window is not None:
                _shadow_window.switch_to()
        _contexts.remove(self)
コード例 #4
0
    def destroy(self):
        '''Release the context.

        The context will not be useable after being destroyed.  Each platform
        has its own convention for releasing the context and the buffer(s)
        that depend on it in the correct order; this should never be called
        by an application.
        '''
        self.detach()

        if gl.current_context is self:
            gl.current_context = None
            gl_info.remove_active_context()

            # Switch back to shadow context.
            if gl._shadow_window is not None:
                gl._shadow_window.switch_to()
コード例 #5
0
ファイル: __init__.py プロジェクト: tyler-elric/pypk
    def destroy(self):
        """Release the context.

        The context will not be usable after being destroyed.  Each platform
        has its own convention for releasing the context and the buffer(s)
        that depend on it in the correct order; this should never be called
        by an application.
        """
        global current_context
        if current_context is self:
            current_context = None
            gl_info.remove_active_context()

            # Switch back to shadow context.
            if _shadow_window is not None:
                _shadow_window.switch_to()
        _contexts.remove(self)