SimpleGL
1.1.0
A framework for platform independent rendering
|
This class wraps a Vulkan debug report callback. More...
#include <debug_report.hpp>
Public Member Functions | |
DebugReportCallback (void) | |
Creates a debug report callback. More... | |
~DebugReportCallback (void) | |
Destroys a debug report callback. More... | |
VkDebugReportCallbackEXT | getHandle () |
Returns the handle of the debug report callback. More... | |
virtual void | invoke (std::string messageType, int messageCode, std::string message) |
This function gets called whenever a Vulkan debug report occurs. More... | |
Static Public Member Functions | |
static DebugReportCallback * | getCurrent () |
Returns the current debug report callback. More... | |
static void | setCurrent (DebugReportCallback *callback) |
Sets the current debug report callback. More... | |
static VkBool32 | dispatch (VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char *pLayerPrefix, const char *pMessage, void *pUserData) |
Dispatches the member function. More... | |
Protected Attributes | |
VkDebugReportCallbackEXT | handle |
The handle of the debug report callback. More... | |
Static Protected Attributes | |
static DebugReportCallback * | current = nullptr |
Stores the current instance of the debug report callback. More... | |
This class wraps a Vulkan debug report callback.
Definition at line 24 of file debug_report.hpp.
sgl::DebugReportCallback::DebugReportCallback | ( | void | ) |
Creates a debug report callback.
Definition at line 61 of file debug_report.cpp.
sgl::DebugReportCallback::~DebugReportCallback | ( | void | ) |
Destroys a debug report callback.
Definition at line 77 of file debug_report.cpp.
|
static |
Dispatches the member function.
flags | indicates the VkDebugReportFlagBitsEXT that triggered this callback. |
objectType | is a VkDebugReportObjectTypeEXT value specifying the type of object being used or created at the time the event was triggered. |
object | is the object where the issue was detected. If objectType is VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, object is undefined. |
location | is a component (layer, driver, loader) defined value that indicates the location of the trigger. This is an optional value. |
messageCode | is a layer-defined value indicating what test triggered this callback. |
pLayerPrefix | is a null-terminated string that is an abbreviation of the name of the component making the callback. pLayerPrefix is only valid for the duration of the callback. |
pMessage | is a null-terminated string detailing the trigger conditions. pMessage is only valid for the duration of the callback. |
pUserData | is the user data given when the VkDebugReportCallbackEXT was created. |
Definition at line 33 of file debug_report.cpp.
|
static |
Returns the current debug report callback.
Definition at line 22 of file debug_report.cpp.
VkDebugReportCallbackEXT sgl::DebugReportCallback::getHandle | ( | ) |
Returns the handle of the debug report callback.
Definition at line 90 of file debug_report.cpp.
|
virtual |
This function gets called whenever a Vulkan debug report occurs.
Default implementation of the debug report callback.
messageType | The type of the message. |
messageCode | A message code. |
message | Message of the debug report. |
Definition at line 95 of file debug_report.cpp.
|
static |
Sets the current debug report callback.
callback | The debug report callback to set. |
Definition at line 26 of file debug_report.cpp.
|
staticprotected |
Stores the current instance of the debug report callback.
Definition at line 28 of file debug_report.hpp.
|
protected |
The handle of the debug report callback.
Definition at line 31 of file debug_report.hpp.