[−][src]Function sdl2_sys::SDL_Vulkan_CreateSurface
pub unsafe extern "C" fn SDL_Vulkan_CreateSurface(
window: *mut SDL_Window,
instance: VkInstance,
surface: *mut VkSurfaceKHR
) -> SDL_bool
\brief Create a Vulkan rendering surface for a window.
\param [in] window SDL_Window to which to attach the rendering surface. \param [in] instance handle to the Vulkan instance to use. \param [out] surface pointer to a VkSurfaceKHR handle to receive the handle of the newly created surface.
\return \c SDL_TRUE on success, \c SDL_FALSE on error.
\code VkInstance instance; SDL_Window *window;
// create instance and window
// create the Vulkan surface VkSurfaceKHR surface; if(!SDL_Vulkan_CreateSurface(window, instance, &surface)) handle_error(); \endcode
\note \a window should have been created with the \c SDL_WINDOW_VULKAN flag.
\note \a instance should have been created with the extensions returned by \c SDL_Vulkan_CreateSurface() enabled.
\sa SDL_Vulkan_GetInstanceExtensions()