glfwGetPhysicalDevicePresentationSupport function

int glfwGetPhysicalDevicePresentationSupport(
  1. Pointer<Void> instance,
  2. Pointer<Void> device,
  3. int queuefamily
)

! @brief 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 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 GLFW_FALSE and generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported to check whether Vulkan is at least minimally available and @ref glfwGetRequiredInstanceExtensions to check what instance extensions are required.

@paramin instance The instance that the physical device belongs to. @paramin device The physical device that the queue family belongs to. @paramin queuefamily The index of the queue family to query. @return GLFW_TRUE if the queue family supports presentation, or GLFW_FALSE otherwise.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.

@remark @macos This function currently always returns GLFW_TRUE, as the VK_MVK_macos_surface and VK_EXT_metal_surface extensions do not provide a vkGetPhysicalDevice*PresentationSupport type function.

@thread_safety This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.

@sa @ref vulkan_present

@since Added in version 3.2.

@ingroup vulkan

GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)

Implementation

int glfwGetPhysicalDevicePresentationSupport(
    Pointer<Void> instance, Pointer<Void> device, int queuefamily) {
  final glfwGetPhysicalDevicePresentationSupportLookupFunction =
      libglfw.lookupFunction<
          Int32 Function(
              Pointer<Void> instance, Pointer<Void> device, Uint32 queuefamily),
          int Function(Pointer<Void> instance, Pointer<Void> device,
              int queuefamily)>('glfwGetPhysicalDevicePresentationSupport');
  return glfwGetPhysicalDevicePresentationSupportLookupFunction(
      instance, device, queuefamily);
}