mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-03 02:24:33 +00:00
Add SDL_Vulkan_DestroySurface functionality (#9817)
Added SDL_Vulkan_DestroySurface, its documentation and corresponding platform specific implementations. Fixed some header inclusion orders to improve consistency between platforms. Added TODOs regarding MetalView creation and destruction which will benefit from the new functionality.
This commit is contained in:
@@ -177,12 +177,40 @@ extern DECLSPEC char const* const* SDLCALL SDL_Vulkan_GetInstanceExtensions(Uint
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_Vulkan_GetInstanceExtensions
|
||||
* \sa SDL_Vulkan_DestroySurface
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window,
|
||||
VkInstance instance,
|
||||
const struct VkAllocationCallbacks *allocator,
|
||||
VkSurfaceKHR* surface);
|
||||
|
||||
/**
|
||||
* Destroy the Vulkan rendering surface of a window.
|
||||
*
|
||||
* This should be called before SDL_DestroyWindow, if SDL_Vulkan_CreateSurface
|
||||
* was called after SDL_CreateWindow.
|
||||
*
|
||||
* The `instance` must have been created with extensions returned by
|
||||
* SDL_Vulkan_GetInstanceExtensions() enabled and `surface` must have been
|
||||
* created successfully by an SDL_Vulkan_CreateSurface() call.
|
||||
*
|
||||
* If `allocator` is NULL, Vulkan will use the system default allocator. This
|
||||
* argument is passed directly to Vulkan and isn't used by SDL itself.
|
||||
*
|
||||
* \param instance The Vulkan instance handle
|
||||
* \param surface VkSurfaceKHR handle to destroy
|
||||
* \param allocator A VkAllocationCallbacks struct, which lets the app set the
|
||||
* allocator that destroys the surface. Can be NULL.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_Vulkan_GetInstanceExtensions
|
||||
* \sa SDL_Vulkan_CreateSurface
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Vulkan_DestroySurface(VkInstance instance,
|
||||
VkSurfaceKHR surface,
|
||||
const struct VkAllocationCallbacks *allocator);
|
||||
|
||||
/* @} *//* Vulkan support functions */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
|
||||
Reference in New Issue
Block a user