Move Vulkan debug callback to module

This commit is contained in:
Lynix
2020-04-13 15:12:58 +02:00
parent 7447875753
commit e905c3a004
11 changed files with 366 additions and 95 deletions

View File

@@ -0,0 +1,29 @@
// Copyright (C) 2020 Jérôme Leclercq
// This file is part of the "Nazara Engine - Vulkan Renderer"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/VulkanRenderer/Wrapper/DebugUtilsMessengerEXT.hpp>
#include <Nazara/VulkanRenderer/Debug.hpp>
namespace Nz
{
namespace Vk
{
inline bool DebugUtilsMessengerEXT::IsSupported(Instance& instance)
{
return instance.vkCreateDebugUtilsMessengerEXT != nullptr;
}
inline VkResult DebugUtilsMessengerEXT::CreateHelper(Instance& instance, const VkDebugUtilsMessengerCreateInfoEXT* createInfo, const VkAllocationCallbacks* allocator, VkDebugUtilsMessengerEXT* handle)
{
return instance.vkCreateDebugUtilsMessengerEXT(instance, createInfo, allocator, handle);
}
inline void DebugUtilsMessengerEXT::DestroyHelper(Instance& instance, VkDebugUtilsMessengerEXT handle, const VkAllocationCallbacks* allocator)
{
return instance.vkDestroyDebugUtilsMessengerEXT(instance, handle, allocator);
}
}
}
#include <Nazara/VulkanRenderer/DebugOff.hpp>