vulkan topic

CategoryVulkan

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

sdlVulkanCreateSurface(Pointer<SdlWindow> window, VkInstance instance, Pointer<VkAllocationCallbacks> allocator, Pointer<VkSurfaceKHR> surface) bool vulkan
Create a Vulkan rendering surface for a window.
sdlVulkanDestroySurface(VkInstance instance, VkSurfaceKHR surface, Pointer<VkAllocationCallbacks> allocator) → void vulkan
Destroy the Vulkan rendering surface of a window.
sdlVulkanGetInstanceExtensions(Pointer<Uint32> count) Pointer<Pointer<Int8>> vulkan
Get the Vulkan instance extensions needed for vkCreateInstance.
sdlVulkanGetPresentationSupport(VkInstance instance, VkPhysicalDevice physicalDevice, int queueFamilyIndex) bool vulkan
Query support for presentation via a given physical device and queue family.
sdlVulkanGetVkGetInstanceProcAddr() PfnXrGetInstanceProcAddr vulkan
Get the address of the vkGetInstanceProcAddr function.
sdlVulkanLoadLibrary(String? path) bool vulkan
Dynamically load the Vulkan loader library.
sdlVulkanUnloadLibrary() → void vulkan
Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary().
sdlxVulkanGetInstanceExtensions() List<String> vulkan
Get the Vulkan instance extensions needed for vkCreateInstance.