コード例 #1
0
ファイル: xlib.py プロジェクト: odyaka341/pyglet
    def attach(self, canvas):
        if canvas is self.canvas:  # XXX do this for carbon too?
            return

        super(XlibContext13, self).attach(canvas)

        self.glx_window = glx.glXCreateWindow(self.x_display, self.config._fbconfig, canvas.x_window, None)
        self.set_current()
コード例 #2
0
ファイル: xlib.py プロジェクト: dee6600/RL
    def attach(self, canvas):
        if canvas is self.canvas:
            return

        super(XlibContext13, self).attach(canvas)

        self.glx_window = glx.glXCreateWindow(
            self.x_display, self.config._fbconfig, canvas.x_window, None)
        self.set_current()
コード例 #3
0
ファイル: o3dconverter.py プロジェクト: khongtuong/flyffsf
    def _OnPaint(self, event):
        if not self._window:
            self._window = self.GetHandle()

            # Can also get the GDK window... (not used yet)
            gdk_window = gdk.gdk_window_lookup(self._window)

            if self._glx_1_3:
                self._glx_window = glx.glXCreateWindow(self._x_display, self._config._fbconfig, self._window, None)
            self.switch_to()
        super(GTKWxCanvas, self)._OnPaint(event)
コード例 #4
0
    def _OnPaint(self, event):
        if not self._window:
            self._window = self.GetHandle()

            # Can also get the GDK window... (not used yet)
            gdk_window = gdk.gdk_window_lookup(self._window)

            if self._glx_1_3:
                self._glx_window = glx.glXCreateWindow(self._x_display,
                                                       self._config._fbconfig,
                                                       self._window, None)
            self.switch_to()
        super(GTKWxCanvas, self)._OnPaint(event)
コード例 #5
0
ファイル: __init__.py プロジェクト: KevinGoodsell/sympy
    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()
コード例 #6
0
ファイル: __init__.py プロジェクト: KevinGoodsell/sympy
    def flip(self):
        self.draw_mouse_cursor()

        if self._vsync and self._have_SGI_video_sync and self._use_video_sync:
            count = c_uint()
            glxext_arb.glXGetVideoSyncSGI(byref(count))
            glxext_arb.glXWaitVideoSyncSGI(
                2, (count.value + 1) % 2, byref(count))

        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.glXSwapBuffers(self._x_display, self._glx_window)
        else:
            glx.glXSwapBuffers(self._x_display, self._window)
コード例 #7
0
    def flip(self):
        self.draw_mouse_cursor()

        if self._vsync and self._have_SGI_video_sync and self._use_video_sync:
            count = c_uint()
            glxext_arb.glXGetVideoSyncSGI(byref(count))
            glxext_arb.glXWaitVideoSyncSGI(2, (count.value + 1) % 2,
                                           byref(count))

        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.glXSwapBuffers(self._x_display, self._glx_window)
        else:
            glx.glXSwapBuffers(self._x_display, self._window)
コード例 #8
0
    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()