9.0.0.11
26 Vulkan
This section covers Vulkan surface creation for use with external Vulkan libraries.
Note: This module provides SDL-Vulkan integration only. For actual Vulkan rendering, use a separate Vulkan binding library.
26.1 Window Flag
Window flag for Vulkan support. Use when creating a window for Vulkan rendering.
(define win (make-window "Vulkan" 800 600 #:flags (list SDL_WINDOW_VULKAN)))
26.2 Instance Extensions
procedure
Returns the list of Vulkan instance extensions required by SDL.
Call this to get the extensions needed when creating your Vulkan instance.
(define extensions (vulkan-instance-extensions)) ;; Pass these to vkCreateInstance
26.3 Surface Creation
procedure
(create-vulkan-surface window instance [ #:custodian cust]) → vulkan-surface? window : window? instance : cpointer? cust : custodian? = (current-custodian)
Creates a Vulkan surface for a window.
instance is your VkInstance handle.
The window must have been created with the SDL_WINDOW_VULKAN flag.
;; After creating your Vulkan instance... (define surface (create-vulkan-surface win vk-instance))
procedure
(vulkan-surface? v) → boolean?
v : any/c
Returns #t if v is a Vulkan surface.
procedure
(vulkan-surface-ptr surf) → cpointer?
surf : vulkan-surface?
Returns the underlying VkSurfaceKHR handle.
procedure
(vulkan-surface-destroy! surf) → void?
surf : vulkan-surface?
Destroys a Vulkan surface.
Note: Surfaces are automatically destroyed when their custodian shuts down.