NAP
Public Member Functions | Public Attributes | List of all members
ImageData Struct Reference

#include <imagedata.h>

Public Member Functions

 ImageData ()=default
 
 ImageData (uint viewCount)
 
VkImageView getView () const
 
VkImageView getSubView (uint index) const
 
uint getSubViewCount () const
 
VkImage getImage () const
 
VkImageLayout getLayout () const
 
void release ()
 

Public Attributes

VkImage mImage = VK_NULL_HANDLE
 Vulkan Image. More...
 
VkImageView mView = VK_NULL_HANDLE
 Vulkan Image view. More...
 
VmaAllocation mAllocation = VK_NULL_HANDLE
 Vulkan single memory allocation. More...
 
VmaAllocationInfo mAllocationInfo
 Vulkan memory allocation information. More...
 
VkImageLayout mCurrentLayout = VK_IMAGE_LAYOUT_UNDEFINED
 Vulkan image layout. More...
 
std::vector< VkImageView > mSubViews
 Vulkan Image views. More...
 

Description

Vulkan Image Data Structure. Binds image data, view and memory allocation information together for easy usage.

Constructor & Destructor Documentation

◆ ImageData() [1/2]

ImageData ( )
default

◆ ImageData() [2/2]

ImageData ( uint  viewCount)

Member Function Documentation

◆ getImage()

VkImage getImage ( ) const
Returns
Handle to Vulkan Image Data

◆ getLayout()

VkImageLayout getLayout ( ) const
Returns
Current Vulkan image layout.

◆ getSubView()

VkImageView getSubView ( uint  index) const
Returns
Handle to Vulkan Image View

◆ getSubViewCount()

uint getSubViewCount ( ) const
Returns
Handle to Vulkan Image View

◆ getView()

VkImageView getView ( ) const
Returns
Handle to Vulkan Image View

◆ release()

void release ( )

Releases the image and view, resetting all the handles to null. Does not delete it.

Member Data Documentation

◆ mAllocation

VmaAllocation mAllocation = VK_NULL_HANDLE

Vulkan single memory allocation.

◆ mAllocationInfo

VmaAllocationInfo mAllocationInfo

Vulkan memory allocation information.

◆ mCurrentLayout

VkImageLayout mCurrentLayout = VK_IMAGE_LAYOUT_UNDEFINED

Vulkan image layout.

◆ mImage

VkImage mImage = VK_NULL_HANDLE

Vulkan Image.

◆ mSubViews

std::vector<VkImageView> mSubViews

Vulkan Image views.

◆ mView

VkImageView mView = VK_NULL_HANDLE

Vulkan Image view.