pleascach/Memory/Image.hpp
connellpaxton e077eeaf5d Added class to handle allocation and creation of Buffers and Image, as well as Timers.
No memory leaks detected yet.
(Fingers crossed).
2024-01-23 16:00:15 -05:00

21 lines
651 B
C++

#pragma once
#define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS
#include <vulkan/vulkan.hpp>
#include <util/log.hpp>
struct Image {
vk::Device dev;
vk::Extent3D extent;
vk::Format format;
vk::Image image;
vk::DeviceMemory memory;
Image(vk::PhysicalDevice phys_dev, vk::Device dev, vk::Image image, vk::MemoryPropertyFlags memory_flags);
Image(vk::PhysicalDevice phys_dev, vk::Device dev, vk::ImageCreateInfo info, vk::MemoryPropertyFlags memory_flags);
Image(vk::PhysicalDevice phys_dev, vk::Device dev, vk::Extent3D extent, vk::Format format, vk::ImageTiling, vk::ImageUsageFlags usage, vk::MemoryPropertyFlags memory_flags);
void cleanup();
};