SDL_VULKAN_GETINSTANCEEXTENSIONS(3)
π SDL_Vulkan_GetInstanceExtensions π
okay bestie, welcome to the SDL3 functions corner of the manual, this one's a total baddie. β¨
πΈ NAME πΈ
SDL_Vulkan_GetInstanceExtensions β grab the Vulkan instance extensions you need for vkCreateInstance.
π¦ SYNOPSIS π¦
#include <SDL3/SDL_vulkan.h>
char const * const * SDL_Vulkan_GetInstanceExtensions(Uint32 *count);
β¨ DESCRIPTION β¨
so like, timing matters here, okay? π«Ά You call this after either calling SDL_Vulkan_LoadLibrary() or creating an SDL_Window with the SDL_WINDOW_VULKAN flag. Do it in that order or it's giving chaos. π
On return, the variable that count points to gets filled in with the number of elements returned β and that number is exactly what you want for VkInstanceCreateInfo::enabledExtensionCount. Meanwhile the returned array itself is the vibe for VkInstanceCreateInfo::ppEnabledExtensionNames, so you can go call Vulkan's vkCreateInstance API. iconic, honestly. π₯
β οΈ and this is the important part: do NOT free the returned array. It is owned by SDL, it is not yours, hands off, we do not touch. π
π FUNCTION PARAMETERS π
countβ a pointer that gets filled in with the number of extensions returned. yes queen, that many. π
π RETURN VALUE π
Returns an array of extension name strings on success π, and NULL on failure π β if that happens, call SDL_GetError() for more info, she'll tell you everything.
β AVAILABILITY β
This function has been available since SDL 3.2.0. no cap.
π SEE ALSO π
and that's the whole page, bestie!! this lil' manual page is brought to you by Simple Directmedia Layer π shipping with SDL 3.4.18 πΈ go forth and create your instance, mwah π«Άβ¨π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms