sandbox
Loading...
Searching...
No Matches
debug_messenger.hpp
1#ifndef LIBSBX_GRAPHICS_DEVICES_DEBUG_MESSENGER_HPP_
2#define LIBSBX_GRAPHICS_DEVICES_DEBUG_MESSENGER_HPP_
3
4#include <vulkan/vulkan.hpp>
5
6#include <libsbx/graphics/devices/instance.hpp>
7
8namespace sbx::graphics {
9
11
12public:
13
14 debug_messenger() = delete;
15
16 ~debug_messenger() = default;
17
18 [[nodiscard]] static auto create(const instance& target, const VkAllocationCallbacks* allocator = nullptr) -> VkResult;
19
20 static auto destroy(const instance& target, const VkAllocationCallbacks* allocator = nullptr) -> void;
21
22 static auto create_info() -> VkDebugUtilsMessengerCreateInfoEXT*;
23
24private:
25
26 static VKAPI_ATTR auto VKAPI_CALL _debug_callback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity, [[maybe_unused]] VkDebugUtilsMessageTypeFlagsEXT message_type, const VkDebugUtilsMessengerCallbackDataEXT* callback_data, [[maybe_unused]] void* user_data) -> VkBool32;
27
28 inline static VkDebugUtilsMessengerEXT _handle{};
29
30}; // class debug_messenger
31
32} // namespace sbx::graphics
33
34#endif // LIBSBX_GRAPHICS_DEVICES_DEBUG_MESSENGER_HPP_
Definition: debug_messenger.hpp:10
Definition: instance.hpp:10