Example #1
0
File: xlib.py Project: dee6600/RL
 def set_vsync(self, vsync=True):
     self._vsync = vsync
     interval = vsync and 1 or 0
     if 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)
Example #2
0
 def set_vsync(self, vsync=True):
     self._vsync = vsync
     if not self._use_video_sync:
         interval = vsync and 1 or 0
         if self._have_MESA_swap_control:
             glxext_mesa.glXSwapIntervalMESA(interval)
         elif self._have_SGI_swap_control and interval:
             # SGI_swap_control interval cannot be set to 0
             glxext_arb.glXSwapIntervalSGI(interval)
Example #3
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)
Example #4
0
 def set_vsync(self, vsync):
     if pyglet.options['vsync'] is not None:
         vsync = pyglet.options['vsync']
     self._vsync = vsync
     if not self._use_video_sync:
         interval = vsync and 1 or 0
         if self._have_MESA_swap_control:
             glxext_mesa.glXSwapIntervalMESA(interval)
         elif self._have_SGI_swap_control and interval:
             # SGI_swap_control interval cannot be set to 0
             glxext_arb.glXSwapIntervalSGI(interval)
Example #5
0
 def set_vsync(self, vsync):
     if pyglet.options['vsync'] is not None:
         vsync = pyglet.options['vsync']
     self._vsync = vsync
     if not self._use_video_sync:
         interval = vsync and 1 or 0
         if self._have_MESA_swap_control:
             glxext_mesa.glXSwapIntervalMESA(interval)
         elif self._have_SGI_swap_control and interval:
             # SGI_swap_control interval cannot be set to 0
             glxext_arb.glXSwapIntervalSGI(interval)
Example #6
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))