libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.52k stars 1.77k forks source link

Is SDL_Vulkan_LoadLibrary using reference counter? #9541

Open pc-john opened 5 months ago

pc-john commented 5 months ago

The page https://wiki.libsdl.org/SDL3/SDL_CreateWindow writes about the call to SDL_Vulkan_LoadLibrary made upon SDL_WINDOW_VULKAN flag. And that the corresponding SDL_Vulkan_UnloadLibrary is called when the window is destroyed. However, SDL_Vulkan_LoadLibrary and SDL_Vulkan_UnloadLibrary wiki do not mention anything about reference counting, which is probably bug. If there would not be reference counting, first destroyed SDL window would unload Vulkan, making all remaining SDL Vulkan windows unusable. Are SDL_Vulkan_LoadLibrary and SDL_Vulkan_UnloadLibrary doing reference counting?

slouken commented 5 months ago

Yes. Adding to the 3.2 milestone for documentation updates.