Expand description
Functions for creating Vulkan surfaces on SDL windows.
For the most part, Vulkan operates independent of SDL, but it benefits from a little support during setup.
Use SDL_Vulkan_GetInstanceExtensions() to get platform-specific bits for
creating a VkInstance, then SDL_Vulkan_GetVkGetInstanceProcAddr() to get
the appropriate function for querying Vulkan entry points. Then
SDL_Vulkan_CreateSurface() will get you the final pieces you need to
prepare for rendering into an SDL_Window with Vulkan.
Unlike OpenGL, most of the details of “context” creation and window buffer
swapping are handled by the Vulkan API directly, so SDL doesn’t provide
Vulkan equivalents of SDL_GL_SwapWindow(), etc; they aren’t necessary.
Functions§
- SDL_
Vulkan_ ⚠Create Surface - Create a Vulkan rendering surface for a window.
- SDL_
Vulkan_ ⚠Destroy Surface - Destroy the Vulkan rendering surface of a window.
- SDL_
Vulkan_ ⚠GetInstance Extensions - Get the Vulkan instance extensions needed for vkCreateInstance.
- SDL_
Vulkan_ ⚠GetPresentation Support - Query support for presentation via a given physical device and queue family.
- SDL_
Vulkan_ ⚠GetVk GetInstance Proc Addr - Get the address of the
vkGetInstanceProcAddrfunction. - SDL_
Vulkan_ ⚠Load Library - Dynamically load the Vulkan loader library.
- SDL_
Vulkan_ ⚠Unload Library - Unload the Vulkan library previously loaded by
SDL_Vulkan_LoadLibrary().
Type Aliases§
- VkAllocation
Callbacks - (
sdl3-sys) Enable ause-ash-*feature to alias this tovk::AllocationCallbacks::<'static>from theashcrate. Otherwise it’s an opaque type.The'staticlifetime is too long.ashrequires a lifetime for this, but as it’s a C ffi type there’s no way forsdl3-systo set the correct lifetime. - VkGet
Instance Proc Addr - (
sdl3-sys) The definition of theVkInstanceargument type can change based on enabled features. SeeVkInstance. - VkInstance
- (
sdl3-sys) Enable ause-ash-*feature to alias this tovk::Instancefrom theashcrate. Otherwise it’s a pointer to an opaque struct. - VkPhysical
Device - (
sdl3-sys) Enable ause-ash-*feature to alias this tovk::PhysicalDevicefrom theashcrate. Otherwise it’s a pointer to an opaque struct. - VkSurfaceKHR
- (
sdl3-sys) Enable ause-ash-*feature to alias this tovk::SurfaceKHRfrom theashcrate. Otherwise it’s a target dependent opaque type. - VkVoid
Function - (
sdl3-sys) Generic Vulkan void function. Cast to the appropriate type before use.