mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-02 06:12:08 +02: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:
@@ -137,6 +137,7 @@ static SDL_VideoDevice *Android_CreateDevice(void)
|
||||
device->Vulkan_UnloadLibrary = Android_Vulkan_UnloadLibrary;
|
||||
device->Vulkan_GetInstanceExtensions = Android_Vulkan_GetInstanceExtensions;
|
||||
device->Vulkan_CreateSurface = Android_Vulkan_CreateSurface;
|
||||
device->Vulkan_DestroySurface = Android_Vulkan_DestroySurface;
|
||||
#endif
|
||||
|
||||
/* Screensaver */
|
||||
|
||||
@@ -162,4 +162,14 @@ SDL_bool Android_Vulkan_CreateSurface(SDL_VideoDevice *_this,
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
void Android_Vulkan_DestroySurface(SDL_VideoDevice *_this,
|
||||
VkInstance instance,
|
||||
VkSurfaceKHR surface,
|
||||
const struct VkAllocationCallbacks *allocator)
|
||||
{
|
||||
if (_this->vulkan_config.loader_handle) {
|
||||
SDL_Vulkan_DestroySurface_Internal(_this->vulkan_config.vkGetInstanceProcAddr, instance, surface, allocator);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,12 +37,16 @@
|
||||
int Android_Vulkan_LoadLibrary(SDL_VideoDevice *_this, const char *path);
|
||||
void Android_Vulkan_UnloadLibrary(SDL_VideoDevice *_this);
|
||||
char const* const* Android_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this,
|
||||
Uint32 *count);
|
||||
Uint32 *count);
|
||||
SDL_bool Android_Vulkan_CreateSurface(SDL_VideoDevice *_this,
|
||||
SDL_Window *window,
|
||||
VkInstance instance,
|
||||
const struct VkAllocationCallbacks *allocator,
|
||||
VkSurfaceKHR *surface);
|
||||
void Android_Vulkan_DestroySurface(SDL_VideoDevice *_this,
|
||||
VkInstance instance,
|
||||
VkSurfaceKHR surface,
|
||||
const struct VkAllocationCallbacks *allocator);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user