learn-vulkan/vk_types.h

39 lines
735 B
C++

// or project specific include files.
//we will add our main reusable types here
#pragma once
#include <vulkan/vulkan.h>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include <span>
#include <array>
#include <functional>
#include <deque>
// #include <vulkan/vk_enum_string_helper.h>
#include <vk_mem_alloc.h>
#include <print>
#include <glm/mat4x4.hpp>
#include <glm/vec4.hpp>
#define VK_CHECK(x)\
do {\
VkResult err = x;\
if (err) {\
std::println("Detected Vulkan error: {}", int(err));\
}\
} while (0)
struct AllocatedImage {
VkImage image;
VkImageView imageView;
VmaAllocation allocation;
VkExtent3D imageExtent;
VkFormat imageFormat;
};