SDL_LoadFunction(3)
π SDL_LoadFunction(3) π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, we're doing SDL_LoadFunction today and honestly? she's iconic. she finds stuff. π¦
β¨ NAME β¨
SDL_LoadFunction β look up the address of the named function in a shared object. literally her whole job, no notes. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_loadso.h>
SDL_FunctionPointer SDL_LoadFunction(SDL_SharedObject *handle, const char *name);
π DESCRIPTION π
okay so, a few things you NEED to know before you go pointing at functions all willy-nilly:
- This function pointer is no longer valid after calling
SDL_UnloadObject(). like, gone gone. do not touch it. it's giving expired milk. π - this function can only look up C function names. other languages may have name mangling and intrinsic language support that varies from compiler to compiler. so if you're out here looking for your fancy C++ overloaded thing, bestie, that's not the vibe she serves. π
- make sure you declare your function pointers with the same calling convention as the actual library function. fr fr. your code will crash mysteriously if you do not do this. mysterious crashes are NOT main character energy, they're just chaos. π
- if the requested function doesn't exist,
NULLis returned. simple as that. π
π FUNCTION PARAMETERS π
handleβ a valid shared object handle returned bySDL_LoadObject(). gotta be valid, bestie, we're not doing vibes-based handles here. β¨nameβ the name of the function to look up. yes, the actual name. as a string. πΈ
β RETURN VALUE β
returns a pointer to the function, or NULL on failure. and if you get NULL? call SDL_GetError() for more information, she'll tell you what went wrong. π«Ά
π§ THREAD SAFETY π§
it is safe to call this function from any thread. periodt. go wild, queen. π
π AVAILABILITY π
this function is available since SDL 3.2.0. if you're on something older, sorry babe. π
π₯ SEE ALSO π₯
and that's the whole page!! π¦β¨ this one came to you from Simple Directmedia Layer, straight out of SDL 3.4.18, and she's the SDL_LoadFunction(3) girlie we all know and love. 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