Function ash_window::create_surface
source · [−]pub unsafe fn create_surface(
entry: &Entry,
instance: &Instance,
display_handle: RawDisplayHandle,
window_handle: RawWindowHandle,
allocation_callbacks: Option<&AllocationCallbacks>
) -> VkResult<SurfaceKHR>
Expand description
Create a surface from a raw surface handle.
instance
must have created with platform specific surface extensions enabled, acquired
through enumerate_required_extensions()
.
Safety
In order for the created vk::SurfaceKHR
to be valid for the duration of its
usage, the Instance
this was called on must be dropped later than the
resulting vk::SurfaceKHR
.
The window represented by window_handle
must be associated with the display connection
in display_handle
.
window_handle
and display_handle
must be associated with a valid window and display
connection, which must not be destroyed for the lifetime of the returned vk::SurfaceKHR
.