// // Generated by Brutal.Glfw.Generate; do not edit by hand. #nullable enable namespace Brutal.GlfwApi { public static unsafe partial class Glfw { /// /// Sets the swap interval for the current context. /// /// The minimum number of screen updates to wait for until the buffers are /// swapped by . /// /// 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 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 WGL_EXT_swap_control_tear and /// 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 glfwExtensionSupported. /// /// /// A context must be current on the calling thread. Calling this function without a current context will /// cause a error. /// /// /// This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your /// swapchain instead. /// /// /// This function is not called during context creation, leaving the swap interval set to whatever is the /// default on that platform. This is done because some swap interval extensions used by GLFW do not allow /// the swap interval to be reset to zero once it has been set to a non-zero value. /// /// /// Some GPU drivers do not honor the requested swap interval, either because of a user setting that /// overrides the application's request or due to bugs in the driver. /// /// /// /// , , /// /// /// /// This function may be called from any thread. /// /// Buffer swapping public static void SwapInterval(int interval) => PInvoke.SwapInterval(interval); /// /// Returns whether the specified extension is available. /// /// /// This function returns whether the specified API extension is supported by the current OpenGL or OpenGL ES /// context. It searches both for client API extension and context creation API extensions. /// /// A context must be current on the calling thread. Calling this function without a current context will /// cause a error. /// /// /// As this functions retrieves and searches one or more extension strings each call, it is recommended that /// you cache its results if it is going to be used frequently. The extension strings will not change during /// the lifetime of a context, so there is no danger in doing this. /// /// /// This function does not apply to Vulkan. If you are using Vulkan, see /// , /// and instead. /// /// /// /// , , /// , /// /// /// This function may be called from any thread. /// /// OpenGL and /// OpenGL ES extensions public static bool ExtensionSupported(string extension) => PInvoke.ExtensionSupported(extension) == GLFW_TRUE; } }