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§
- VkAllocation
Callbacks - (
sdl3-sys
) Enable ause-ash-*
feature to alias this tovk::AllocationCallbacks::<'static>
from theash
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 forsdl3-sys
to set the correct lifetime.
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
vkGetInstanceProcAddr
function. - 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§
- VkInstance
- (
sdl3-sys
) Enable ause-ash-*
feature to alias this tovk::Instance
from theash
crate. Otherwise it’s a pointer to an opaque struct. - VkPhysical
Device - (
sdl3-sys
) Enable ause-ash-*
feature to alias this tovk::PhysicalDevice
from theash
crate. Otherwise it’s a pointer to an opaque struct. - VkSurfaceKHR