// SetSwapInterval selects the minimum number of monitor vertical retraces that // should occur between two buffer swaps. If the selected swap interval is one, // the rate of buffer swaps will never be higher than the vertical refresh rate // of the monitor. If the selected swap interval is zero, the rate of buffer // swaps is only limited by the speed of the software and the hardware. func SetSwapInterval(interval int) { C.glfwSwapInterval(C.int(interval)) }
// SwapInterval sets the swap interval for the current context, i.e. the number // of screen updates to wait before swapping the buffers of a window and // returning from SwapBuffers. This is sometimes called // 'vertical synchronization', 'vertical retrace synchronization' or 'vsync'. // // Contexts that support either of the WGL_EXT_swap_control_tear and // GLX_EXT_swap_control_tear extensions also accept negative swap intervals, // which allow the driver to swap even if a frame arrives a little bit late. // You can check for the presence of these extensions using // ExtensionSupported. For more information about swap tearing, // see the extension specifications. // // Some GPU drivers do not honor the requested swap interval, either because of // user settings that override the request or due to bugs in the driver. func SwapInterval(interval int) { C.glfwSwapInterval(C.int(interval)) panicError() }