You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
784 B

4 months ago
#pragma once
#include <vulkan/vulkan.h>
#include "vk_mem_alloc.h"
4 months ago
class Instance;
class Image {
public:
4 months ago
Image(uint32_t width, uint32_t height, VkFormat format, VkImageTiling tiling,
VkImageUsageFlags usage);
Image(void* initialData, VkDeviceSize size, uint32_t width, uint32_t height, VkFormat format, VkImageTiling tiling,
VkImageUsageFlags usage);
4 months ago
~Image();
VkImageView createView(VkImageAspectFlags aspectFlags);
3 months ago
VkSampler createSampler();
4 months ago
VkImage handle = VK_NULL_HANDLE;
VkImageView view = VK_NULL_HANDLE;
3 months ago
VkSampler sampler = VK_NULL_HANDLE;
uint32_t width;
uint32_t height;
4 months ago
private:
VkFormat format;
void transitionLayout(VkImageLayout oldLayout, VkImageLayout newLayout);
4 months ago
VmaAllocation allocation = nullptr;
VmaAllocationInfo allocationInfo {};
4 months ago
};