Sets the swap interval for the current context.
This function sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of screen updates to wait from the time @ref glfwSwapBuffers was called before swapping the buffers and returning. This is sometimes called vertical synchronization, vertical retrace synchronization or just vsync.
A context that supports either of the
GLX_EXT_swap_control_tear extensions also accepts negative swap
intervals, which allows the driver to swap immediately even if a frame
arrives a little bit late. You can check for these extensions with @ref
A context must be current on the calling thread. Calling this function
without a current context will cause a
This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your swapchain instead.
$intervalThe minimum number of screen updates to wait for until the buffers are swapped by