Use Vulkan result check macro, removed unused functionality from tools and base class

This commit is contained in:
saschawillems 2016-05-30 20:57:38 +02:00
parent a85dca7a15
commit 75a6f46c4a
10 changed files with 52 additions and 63 deletions

View file

@ -208,8 +208,10 @@ public:
xcb_intern_atom_reply_t *atom_wm_delete_window;
#endif
// Default ctor
VulkanExampleBase(bool enableValidation);
VulkanExampleBase() : VulkanExampleBase(false) {};
// dtor
~VulkanExampleBase();
// Setup the vulkan instance, enable required extensions and connect to the physical device (GPU)

View file

@ -79,17 +79,6 @@ namespace vkTools
}
}
VkResult checkResult(VkResult result)
{
if (result != VK_SUCCESS)
{
std::string errorMsg = "Fatal : VkResult returned " + errorString(result) + "!";
std::cout << errorMsg << std::endl;
assert(result == VK_SUCCESS);
}
return result;
}
VkBool32 getSupportedDepthFormat(VkPhysicalDevice physicalDevice, VkFormat *depthFormat)
{
// Since all depth formats may be optional, we need to find a suitable depth format to use

View file

@ -53,8 +53,6 @@ namespace vkTools
VkBool32 checkDeviceExtensionPresent(VkPhysicalDevice physicalDevice, const char* extensionName);
// Return string representation of a vulkan error string
std::string errorString(VkResult errorCode);
// Asserts and outputs the error message if the result is not VK_SUCCESS
VkResult checkResult(VkResult result);
// Selected a suitable supported depth format starting with 32 bit down to 16 bit
// Returns false if none of the depth formats in the list is supported by the device