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()
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)
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)
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()
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)