sdlVulkanGetPresentationSupport function

bool sdlVulkanGetPresentationSupport(
  1. Pointer<NativeType> instance,
  2. Pointer<NativeType> physicalDevice,
  3. int queueFamilyIndex
)

Query support for presentation via a given physical device and queue family.

The instance must have been created with extensions returned by SDL_Vulkan_GetInstanceExtensions() enabled.

\param instance the Vulkan instance handle. \param physicalDevice a valid Vulkan physical device handle. \param queueFamilyIndex a valid queue family index for the given physical device. \returns true if supported, false if unsupported or an error occurred.

\since This function is available since SDL 3.1.3.

\sa SDL_Vulkan_GetInstanceExtensions

extern SDL_DECLSPEC bool SDLCALL SDL_Vulkan_GetPresentationSupport(VkInstance instance, VkPhysicalDevice physicalDevice, Uint32 queueFamilyIndex)

Implementation

bool sdlVulkanGetPresentationSupport(Pointer<NativeType> instance,
    Pointer<NativeType> physicalDevice, int queueFamilyIndex) {
  final sdlVulkanGetPresentationSupportLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<NativeType> instance,
          Pointer<NativeType> physicalDevice, Uint32 queueFamilyIndex),
      int Function(
          Pointer<NativeType> instance,
          Pointer<NativeType> physicalDevice,
          int queueFamilyIndex)>('SDL_Vulkan_GetPresentationSupport');
  return sdlVulkanGetPresentationSupportLookupFunction(
          instance, physicalDevice, queueFamilyIndex) ==
      1;
}