VOX
A little voxel engine
Loading...
Searching...
No Matches
vk_define.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <vulkan/vulkan.h>
4#include <vulkan/vk_enum_string_helper.h>
5
6#include <string>
7#include <stdexcept>
8
9#define VK_ERR_STR(result) (std::string(string_VkResult(result)))
10
11#define VK_CHECK(function, message) \
12 { \
13 VkResult result = function; \
14 if (result != VK_SUCCESS) \
15 { \
16 throw std::runtime_error( \
17 __PRETTY_FUNCTION__ + std::string(": ") \
18 + std::string(message) + " (" + std::string(string_VkResult(result)) + ")" \
19 ); \
20 } \
21 }