17 MANDRILL_NON_COPYABLE(
Image)
32 MANDRILL_API
Image(ptr<Device> pDevice, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipLevels,
33 VkSampleCountFlagBits samples, VkFormat format, VkImageTiling tiling,
34 VkImageUsageFlags usage, VkMemoryPropertyFlags properties);
50 MANDRILL_API
Image(ptr<Device> pDevice, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipLevels,
51 VkSampleCountFlagBits samples, VkFormat format, VkImageTiling tiling,
52 VkImageUsageFlags usage, VkDeviceMemory memory, VkDeviceSize offset);
80 mImageView = imageView;
125 if (!(mProperties & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) {
126 Log::Error(
"Unable to access host map of buffer that is not host coherent.");
178 ptr<Device> mpDevice;
181 VkImageView mImageView;
183 VkImageUsageFlags mUsage;
184 VkMemoryPropertyFlags mProperties;
186 VkDeviceMemory mMemory;
196 VkImageTiling mTiling;
Image class for managing Vulkan images. This class handles the creation and destruction of images,...
Definition Image.h:15
MANDRILL_API ~Image()
Destructor for image.
Definition Image.cpp:78
MANDRILL_API VkImageView getImageView() const
Get the VkImageView handle.
Definition Image.h:87
MANDRILL_API VkDeviceMemory getMemory() const
Get the device memory.
Definition Image.h:96
MANDRILL_API VkFormat getFormat() const
Get the format of the image.
Definition Image.h:136
MANDRILL_API uint32_t getDepth() const
Get the depth of the image.
Definition Image.h:163
MANDRILL_API void * getHostMap() const
If the buffer memory is host-coherent, this returns the pointor to the memory.
Definition Image.h:123
MANDRILL_API VkMemoryPropertyFlags getProperties() const
Get the memory property flags.
Definition Image.h:114
MANDRILL_API VkImageUsageFlags getUsage() const
Get the image usage flags.
Definition Image.h:105
MANDRILL_API void setImageView(VkImageView imageView)
Use this function if image view is created externally.
Definition Image.h:78
MANDRILL_API void createImageView(VkImageAspectFlags aspectFlags)
Create a default image view for Image object.
Definition Image.cpp:97
MANDRILL_API VkImage getImage() const
Get the VkImage handle.
Definition Image.h:69
MANDRILL_API uint32_t getHeight() const
Get the height of the image.
Definition Image.h:154
MANDRILL_API uint32_t getWidth() const
Get the width of the image.
Definition Image.h:145
MANDRILL_API uint32_t getMipLevels() const
Get the mipmap levels of the image.
Definition Image.h:172