SimpleGL  1.1.0
A framework for platform independent rendering
debug_report.hpp
Go to the documentation of this file.
1 
8 #ifndef DEBUG_REPORT_HPP
9 #define DEBUG_REPORT_HPP
10 
11 #include <SimpleGL_vk/SimpleGL_vk_Export.h>
12 
13 #include <string>
14 
15 #include <vulkan/vulkan.h>
16 
17 namespace sgl {
18 
24  class SIMPLEGL_VK_EXPORT DebugReportCallback {
25 
26  protected:
29 
31  VkDebugReportCallbackEXT handle;
32 
33  public:
39  static DebugReportCallback* getCurrent();
40 
46  static void setCurrent(DebugReportCallback* callback);
47 
62  static VkBool32 dispatch(VkDebugReportFlagsEXT flags,
63  VkDebugReportObjectTypeEXT objectType,
64  uint64_t object,
65  size_t location,
66  int32_t messageCode,
67  const char* pLayerPrefix,
68  const char* pMessage,
69  void* pUserData);
70 
72  DebugReportCallback(void);
73 
75  ~DebugReportCallback(void);
76 
82  VkDebugReportCallbackEXT getHandle();
83 
91  virtual void invoke(std::string messageType, int messageCode, std::string message);
92  };
93 }
94 
95 #endif /* DEBUG_REPORT_HPP */
VkDebugReportCallbackEXT handle
The handle of the debug report callback.
Generic namespace for the SimpleGL framework.
Definition: application.hpp:18
static DebugReportCallback * current
Stores the current instance of the debug report callback.
This class wraps a Vulkan debug report callback.