From 651f3395373d5f890e04dc8567703dad5bf1d417 Mon Sep 17 00:00:00 2001 From: Mars Date: Sun, 29 Sep 2024 23:03:43 -0400 Subject: [PATCH] i prefer this --- src/main.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 684ce2e..bd58509 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,19 +57,15 @@ class HelloTriangleApplication { if (!enableValidationLayers) return; - auto messengerCreateInfo = vk::DebugUtilsMessengerCreateInfoEXT() - .setMessageSeverity( - vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose | - vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning | - vk::DebugUtilsMessageSeverityFlagBitsEXT::eError - ) - .setMessageType( - vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | - vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | - vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation - ) - .setPfnUserCallback(debugCallback) - .setPUserData(nullptr); // Optional + vk::DebugUtilsMessengerCreateInfoEXT messengerCreateInfo { + .messageSeverity = vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose | + vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning | + vk::DebugUtilsMessageSeverityFlagBitsEXT::eError, + .messageType = vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | + vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation | + vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance, + .pfnUserCallback = debugCallback, + }; mDebugMessenger = mInstance->createDebugUtilsMessengerEXTUnique(messengerCreateInfo, nullptr, mLoader); }