SDL_Vulkan_G...tanceProcAddr(3)
π SDL_Vulkan_GetVkGetInstanceProcAddr π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_Vulkan_GetVkGetInstanceProcAddr. yes the name is long. no we are not shortening it. she earned every character. π
β¨ NAME β¨
SDL_Vulkan_GetVkGetInstanceProcAddr β get the address of the vkGetInstanceProcAddr function. that's it, that's the whole job. fetch the pointer. slay. π¦
β¨ SYNOPSIS β¨
#include <SDL3/SDL_vulkan.h>
SDL_FunctionPointer SDL_Vulkan_GetVkGetInstanceProcAddr(void);
look at her. no arguments. takes absolutely nothing from you, gives you a function pointer back. queen behavior. π
β¨ DESCRIPTION β¨
so here's the tea: you gotta call this after you've either called SDL_Vulkan_LoadLibrary() or created an SDL_Window with the SDL_WINDOW_VULKAN flag. do it before that and, like, no. π
the actual type of the returned function pointer is PFN_vkGetInstanceProcAddr, but β and this is the part that trips people up β that type isn't available here, because the Vulkan headers are not included in this header. so you have to cast the return value yourself. for example:
vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)SDL_Vulkan_GetVkGetInstanceProcAddr();
cast it. don't forget to cast it. i'm literally begging you to cast it. π
β¨ RETURN VALUE β¨
returns the function pointer for vkGetInstanceProcAddr, or NULL on failure. if you get NULL, call SDL_GetError() for more info β she will tell you what went wrong, no cap. π
β¨ AVAILABILITY β¨
this function has been available since SDL 3.2.0. so if you're on anything older, bestie, that's a vibe check fail. π
and that's the whole page!! stay hydrated, cast your pointers, and go build something iconic ππ
β with love from the Simple Directmedia Layer girlies, SDL 3.4.18 edition π«Άβ¨π
π¦ 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