// // Generated by Brutal.Glfw.Generate; do not edit by hand. #nullable enable namespace Brutal.GlfwApi { public static unsafe partial class Glfw { /// /// Returns whether the Vulkan loader and an ICD have been found. /// /// true if Vulkan is minimally available, or false otherwise. /// /// This function returns whether the Vulkan loader and any minimally functional ICD have been found. /// /// The availability of a Vulkan loader and even an ICD does not by itself guarantee that surface creation /// or even instance creation is possible. Call /// GetRequiredInstanceExtensions to check whether the /// extensions necessary for Vulkan surface creation are available and /// GetPhysicalDevicePresentationSupport to check /// whether a queue family of a physical device supports image presentation. /// /// /// /// /// /// /// This function may be called from any thread. /// /// Querying for /// Vulkan support public static bool VulkanSupported() => PInvoke.VulkanSupported() == GLFW_TRUE; /// /// Returns the Vulkan instance extensions required by GLFW. /// /// An array of ASCII encoded extension names, or null if an error occurred. /// /// This function returns an array of names of Vulkan instance extensions required by GLFW for creating Vulkan /// surfaces for GLFW windows. If successful, the list will always contain VK_KHR_surface, so if you /// don't require any additional extensions you can pass this list directly to the VkInstanceCreateInfo /// struct. /// /// If Vulkan is not available on the machine, this function returns null and generates a /// error. Call /// Glfw.VulkanSupported to check whether Vulkan is at least minimally /// available. /// /// /// If Vulkan is available but no set of extensions allowing window surface creation was found, this /// function returns null. You may still use Vulkan for off-screen rendering and compute work. /// /// /// Additional extensions may be required by future versions of GLFW. You should check if any extensions you /// wish to enable are already in the returned array, as it is an error to specify an extension more than /// once in the VkInstanceCreateInfo struct. /// /// /// /// , /// /// /// The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be /// valid only until the library is terminated. /// /// /// This function may be called from any thread. /// /// Querying required /// Vulkan extensions public static byte** GetRequiredInstanceExtensions(out uint count) => PInvoke.GetRequiredInstanceExtensions(out count); /// /// Returns the address of the specified Vulkan instance function. /// /// The address of the function, or null if an error occurred. /// /// This function returns the address of the specified Vulkan core or extension function for the specified /// instance. If instance is set to null it can return any function exported from the Vulkan loader, /// including at least the following functions: /// /// vkEnumerateInstanceExtensionProperties /// vkEnumerateInstanceLayerProperties /// vkCreateInstance /// vkGetInstanceProcAddr /// /// /// If Vulkan is not available on the machine, this function returns null and generates a /// error. Call /// Glfw.VulkanSupported to check whether Vulkan is at least minimally /// available. /// /// /// This function is equivalent to calling vkGetInstanceProcAddr with a platform-specific query of /// the Vulkan loader as a fallback. /// /// /// /// , /// /// /// The returned pointer is valid until the library is terminated. /// /// /// This function may be called from any thread. /// /// Querying Vulkan /// function pointers public static nint GetInstanceProcAddress(nint instance, string procName) => PInvoke.GetInstanceProcAddress(instance, procName); /// /// Returns whether the specified queue family can present images. /// /// /// This function returns whether the specified queue family of the specified physical device supports /// presentation to the specified platform GLFW was built for. /// /// If Vulkan or the required window surface creation instance extensions are not available on the machine, /// or if the specified instance was not created with the required extensions, this function returns /// false and generates a error. Call /// Glfw.VulkanSupported to check whether Vulkan is at least minimally /// available and GetRequiredInstanceExtensions to check /// what instance extensions are required. /// /// /// /// This function currently always returns true, as the VK_MVK_macos_surface and /// VK_EXT_metal_surface extensions do not provide a function to query this. /// /// /// , , /// /// /// /// This function may be called from any thread. /// /// Querying for /// Vulkan presentation support public static bool GetPhysicalDevicePresentationSupport( nint instance, nint physicalDevice, int queueFamilyIndex ) => PInvoke.GetPhysicalDevicePresentationSupport(instance, physicalDevice, (uint)queueFamilyIndex) == GLFW_TRUE; } }