Skip to content

SdlVulkanCreateSurface

Create a Vulkan rendering surface for a window.

The AWindow must have been created with the TSdlWindowFlag.Vulkan flag and AInstance must have been created with extensions returned by SdlVulkanGetInstanceExtensions enabled.

If AAllocator is nil, Vulkan will use the system default allocator. This argument is passed directly to Vulkan and isn't used by SDL itself.

Definition

Unit: Neslib.Sdl3.Video

function SdlVulkanCreateSurface(const AWindow: TSdlWindow; 
  const AInstance: VkInstance; const AAllocator: PVkAllocationCallbacks = nil): VkSurfaceKHR; inline

Parameters

AWindow: TSdlWindow : The window to which to attach the Vulkan surface.

AInstance: VkInstance : The Vulkan instance handle.

AAllocator: PVkAllocationCallbacks = nil : (Optional) VkAllocationCallbacks struct, which lets the app set the allocator that creates the surface. Can be nil.

Returns

VkSurfaceKHR: The newly created surface.

Exceptions

ESdlError: Raised on failure.

See Also