I may want to know what video driver my app is running on after I give it to a user. How do I get that information? SDL_GetCurrentVideoDriver() is giving me “x11” which isn’t helpful. Using SDL_GetGPUDriver and SDL_GetRenderDriver I can see vulkan/opengl are the first entries but I can’t tell which is used. What the heck is “gpu”? Does that mean vulkan (my only gpu driver) using the gpu api instead of vulkan using the render api?
“gpu” means it’s using SDL3 GPU as the SDL_Renderer
backend instead of vulkan
or opengl
or whatever.
If you’re passing NULL
as the name
parameter when creating the renderer, you get whatever renderer backend is first in the list (which you can see yourself by calling SDL_GetNumRenderDrivers()
and SDL_GetRenderDriver()
).
You can specifically query which one you got by calling SDL_GetRendererName()
Note that SDL differentiate between video drivers (e.g. x11, wayland) and render drivers (e.g. opengl, vulkan).
Thanks guys. Consider this solved.
I accidentally looked at sdlwiki/SDL3/CategoryVideo.html instead of CategoryVideo. I use the offline wiki and had my browser autocomplete to index. I just bookmarked APIByCategory.html so maybe next time I’ll look at the right category /skillissue