sdlVulkanGetVkGetInstanceProcAddr function

Pointer<NativeType> sdlVulkanGetVkGetInstanceProcAddr()

Get the address of the vkGetInstanceProcAddr function.

This should be called after either calling SDL_Vulkan_LoadLibrary() or creating an SDL_Window with the SDL_WINDOW_VULKAN flag.

The actual type of the returned function pointer is PFN_vkGetInstanceProcAddr, but that isn't available because the Vulkan headers are not included here. You should cast the return value of this function to that type, e.g.

vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)SDL_Vulkan_GetVkGetInstanceProcAddr();

\returns the function pointer for vkGetInstanceProcAddr or NULL on failure; call SDL_GetError() for more information.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC SDL_FunctionPointer SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void)

Implementation

Pointer<NativeType> sdlVulkanGetVkGetInstanceProcAddr() {
  final sdlVulkanGetVkGetInstanceProcAddrLookupFunction =
      libSdl3.lookupFunction<
          Pointer<NativeType> Function(),
          Pointer<NativeType>
              Function()>('SDL_Vulkan_GetVkGetInstanceProcAddr');
  return sdlVulkanGetVkGetInstanceProcAddrLookupFunction();
}