Provide a way to disable the debug callback

This commit is contained in:
David Dubois 2023-02-28 14:57:15 -08:00 committed by Charles Giessen
parent 2d7315eadf
commit 683d014241

View File

@ -794,6 +794,13 @@ InstanceBuilder& InstanceBuilder::request_validation_layers(bool enable_validati
info.request_validation_layers = enable_validation; info.request_validation_layers = enable_validation;
return *this; return *this;
} }
InstanceBuilder & InstanceBuilder::disable_debug_messenger() {
info.use_debug_messenger = false;
info.debug_callback = nullptr;
return *this;
}
InstanceBuilder& InstanceBuilder::use_default_debug_messenger() { InstanceBuilder& InstanceBuilder::use_default_debug_messenger() {
info.use_debug_messenger = true; info.use_debug_messenger = true;
info.debug_callback = default_debug_callback; info.debug_callback = default_debug_callback;