Would be better to include the code snippet of the VK_CHECK() function inside the modern guide as well, since there are no references or links to where to find the definition of this function. Can lead users to think they did something wrong, or that there is a missing dependency.
A suggested alternative would be to scratch the custom macro, and define the functions inside vk_init.hpp where we have helper functions.
VkResult vkInit::VK_CHECK(VkResult x) {
if (x != VK_SUCCESS) {
std::cerr << "Error occurred: " << x << "\n";
abort();
}
return x;
}
and then:
namespace vkInit {
VkCommandPoolCreateInfo poolInfo(VkCommandPoolCreateFlagBits flags);
VkCommandBufferAllocateInfo commandBufferInfo();
VkResult VK_CHECK(VkResult x);
// other helper functions
};