示例#1
0
文件: xlib.py 项目: arokem/Fos
    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
示例#2
0
文件: xlib.py 项目: fos/fos-pyglet
    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
示例#3
0
文件: xlib.py 项目: arokem/Fos
 def set_current(self):
     glx.glXMakeContextCurrent(
         self.x_display, self.glx_window, self.glx_window, self.glx_context)
     super(XlibContext13, self).set_current()
示例#4
0
文件: xlib.py 项目: fos/fos-pyglet
 def set_current(self):
     glx.glXMakeContextCurrent(self.x_display, self.glx_window,
                               self.glx_window, self.glx_context)
     super(XlibContext13, self).set_current()