[Vulkan v2] VkSurface

This commit is contained in:
Triang3l
2019-08-10 00:23:31 +03:00
parent 30ba2619f3
commit af93986c8f
4 changed files with 56 additions and 13 deletions

View File

@@ -27,11 +27,10 @@ inline bool DestroyAndNullHandle(F* destroy_function, T& handle) {
return false;
}
template <typename F, typename T>
inline bool DestroyAndNullHandle(F* destroy_function, VkDevice device,
T& handle) {
template <typename F, typename P, typename T>
inline bool DestroyAndNullHandle(F* destroy_function, P parent, T& handle) {
if (handle != VK_NULL_HANDLE) {
destroy_function(device, handle, nullptr);
destroy_function(parent, handle, nullptr);
handle = VK_NULL_HANDLE;
return true;
}