.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL's wiki page for SDL_Vulkan_LoadLibrary: .\" https://wiki.libsdl.org/SDL_Vulkan_LoadLibrary .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision SDL-3.1.0 .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_Vulkan_LoadLibrary .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_Vulkan_LoadLibrary 3 "SDL 3.1.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_Vulkan_LoadLibrary \- Dynamically load the Vulkan loader library\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "int SDL_Vulkan_LoadLibrary(const char *path); .fi .SH DESCRIPTION This should be called after initializing the video driver, but before creating any Vulkan windows\[char46] If no Vulkan loader library is loaded, the default library will be loaded upon creation of the first Vulkan window\[char46] It is fairly common for Vulkan applications to link with libvulkan instead of explicitly loading it at run time\[char46] This will work with SDL provided the application links to a dynamic library and both it and SDL use the same search path\[char46] If you specify a non-NULL .BR path , an application should retrieve all of the Vulkan functions it uses from the dynamic library using .BR SDL_Vulkan_GetVkGetInstanceProcAddr unless you can guarantee .BR path points to the same vulkan loader library the application linked to\[char46] On Apple devices, if .BR path is NULL, SDL will attempt to find the .BR vkGetInstanceProcAddr address within all the Mach-O images of the current process\[char46] This is because it is fairly common for Vulkan applications to link with libvulkan (and historically MoltenVK was provided as a static library)\[char46] If it is not found, on macOS, SDL will attempt to load .BR vulkan\[char46]framework/vulkan , .BR libvulkan\[char46]1\[char46]dylib , .BR MoltenVK\[char46]framework/MoltenVK , and .BR libMoltenVK\[char46]dylib , in that order\[char46] On iOS, SDL will attempt to load .BR libMoltenVK\[char46]dylib \[char46] Applications using a dynamic framework or \[char46]dylib must ensure it is included in its application bundle\[char46] On non-Apple devices, application linking with a static libvulkan is not supported\[char46] Either do not link to the Vulkan loader or link to a dynamic library version\[char46] .SH FUNCTION PARAMETERS .TP .I path The platform dependent Vulkan loader library name or NULL .SH RETURN VALUE Returns 0 on success or a negative error code on failure; call .BR SDL_GetError () for more information\[char46] .SH AVAILABILITY This function is available since SDL 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR SDL_Vulkan_GetVkInstanceProcAddr (3), .BR SDL_Vulkan_UnloadLibrary (3)