Module vulkan

Available on crate feature dep_sdl3 only.
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.

Structs§

VkAllocationCallbacks
(sdl3-sys) Enable a use-ash-* feature to alias this to vk::AllocationCallbacks::<'static> from the ash crate. Otherwise it’s an opaque type.
The 'static lifetime is too long. ash requires a lifetime for this, but as it’s a C ffi type there’s no way for sdl3-sys to set the correct lifetime.

Functions§

SDL_Vulkan_CreateSurface
Create a Vulkan rendering surface for a window.
SDL_Vulkan_DestroySurface
Destroy the Vulkan rendering surface of a window.
SDL_Vulkan_GetInstanceExtensions
Get the Vulkan instance extensions needed for vkCreateInstance.
SDL_Vulkan_GetPresentationSupport
Query support for presentation via a given physical device and queue family.
SDL_Vulkan_GetVkGetInstanceProcAddr
Get the address of the vkGetInstanceProcAddr function.
SDL_Vulkan_LoadLibrary
Dynamically load the Vulkan loader library.
SDL_Vulkan_UnloadLibrary
Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary().

Type Aliases§

VkInstance
(sdl3-sys) Enable a use-ash-* feature to alias this to vk::Instance from the ash crate. Otherwise it’s a pointer to an opaque struct.
VkPhysicalDevice
(sdl3-sys) Enable a use-ash-* feature to alias this to vk::PhysicalDevice from the ash crate. Otherwise it’s a pointer to an opaque struct.
VkSurfaceKHR