Exemplo n.º 1
0
 def set_vsync(self, vsync=True):
     self._vsync = vsync
     interval = vsync and 1 or 0
     if not self._use_video_sync and self._have_EXT_swap_control:
         glxext_arb.glXSwapIntervalEXT(self.x_display, glx.glXGetCurrentDrawable(), interval)
     elif not self._use_video_sync and self._have_MESA_swap_control:
         glxext_mesa.glXSwapIntervalMESA(interval)
     elif self._have_SGI_swap_control:
         glxext_arb.glXSwapIntervalSGI(interval)
Exemplo n.º 2
0
 def set_vsync(self, vsync=True):
     self._vsync = vsync
     interval = vsync and 1 or 0
     try:
         if not self._use_video_sync and self._have_EXT_swap_control:
             glxext_arb.glXSwapIntervalEXT(self.x_display, glx.glXGetCurrentDrawable(), interval)
         elif not self._use_video_sync and self._have_MESA_swap_control:
             glxext_mesa.glXSwapIntervalMESA(interval)
         elif self._have_SGI_swap_control:
             glxext_arb.glXSwapIntervalSGI(interval)
     except lib.MissingFunctionException as e:
         warnings.warn(str(e))