def _switch_to_impl(self): if not self._window: return if self._glx_1_3: glx.glXMakeContextCurrent(self._x_display, self._glx_window, self._glx_window, self._glx_context) else: glx.glXMakeCurrent(self._x_display, self._window, self._glx_context)
def detach(self): if not self.canvas: return self.set_current() gl.glFlush() # needs to be in try/except? super(XlibContext13, self).detach() glx.glXMakeContextCurrent(self.x_display, 0, 0, None) if self.glx_window: glx.glXDestroyWindow(self.x_display, self.glx_window) self.glx_window = None
def switch_to(self): if self._glx_1_3: if not self._glx_window: self._glx_window = glx.glXCreateWindow(self._x_display, self._config._fbconfig, self._window, None) glx.glXMakeContextCurrent(self._x_display, self._glx_window, self._glx_window, self._glx_context) else: glx.glXMakeCurrent(self._x_display, self._window, self._glx_context) self.set_vsync(self._vsync) self._context.set_current() gl_info.set_active_context() glu_info.set_active_context()
def set_current(self): glx.glXMakeContextCurrent(self.x_display, self.glx_window, self.glx_window, self.glx_context) super(XlibContext13, self).set_current()
def set_current(self): glx.glXMakeContextCurrent( self.x_display, self.glx_window, self.glx_window, self.glx_context) super(XlibContext13, self).set_current()