diff --git a/src/VkBootstrap.cpp b/src/VkBootstrap.cpp index 7468426..71f2135 100644 --- a/src/VkBootstrap.cpp +++ b/src/VkBootstrap.cpp @@ -584,7 +584,7 @@ Result InstanceBuilder::build() const { for (auto& ext : info.extensions) extensions.push_back(ext); - if (info.debug_callback != nullptr && system.debug_utils_available) { + if (info.debug_callback != nullptr && info.use_debug_messenger && system.debug_utils_available) { extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME); } bool properties2_ext_enabled = @@ -795,12 +795,6 @@ InstanceBuilder& InstanceBuilder::request_validation_layers(bool enable_validati return *this; } -InstanceBuilder & InstanceBuilder::disable_debug_messenger() { - info.use_debug_messenger = false; - info.debug_callback = nullptr; - return *this; -} - InstanceBuilder& InstanceBuilder::use_default_debug_messenger() { info.use_debug_messenger = true; info.debug_callback = default_debug_callback; diff --git a/src/VkBootstrap.h b/src/VkBootstrap.h index 4a1620d..fe74adf 100644 --- a/src/VkBootstrap.h +++ b/src/VkBootstrap.h @@ -380,9 +380,7 @@ class InstanceBuilder { InstanceBuilder& enable_validation_layers(bool require_validation = true); // Checks if the validation layers are available and loads them if they are. InstanceBuilder& request_validation_layers(bool enable_validation = true); - - // Disables the debug messenger and clears the debug callback - InstanceBuilder& disable_debug_messenger(); + // Use a default debug callback that prints to standard out. InstanceBuilder& use_default_debug_messenger(); // Provide a user defined debug callback.