SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::render::vk::IVulkanImage Class Referenceabstract

Represents a Vulkan image. More...

#include <VulkanImage.h>

Inheritance diagram for spark::render::vk::IVulkanImage:
spark::render::IImage spark::render::IResource< VkImage > spark::render::IStateResource spark::render::IDeviceMemory spark::render::vk::VulkanImage

Public Member Functions

virtual VkImageAspectFlags aspectMask () const noexcept=0
 Gets the image aspect mask for all sub-resources.
 
virtual VkImageAspectFlags aspectMask (unsigned int plane=0) const =0
 Gets the image aspect mask for the given sub-resource.
 
virtual const VkImageView & imageView (unsigned int plane=0) const =0
 Gets an image view for the given sub-resource.
 
- Public Member Functions inherited from spark::render::IImage
virtual std::size_t size (unsigned int level) const =0
 Get the size of the image (in bytes) at the specified mip-map level.
 
virtual math::Vector3< unsigned > extent (unsigned level=0) const noexcept=0
 Get the extent of the image at the specified mip-map level.
 
virtual Format format () const noexcept=0
 Gets the internal format of the image.
 
virtual ImageDimensions dimensions () const noexcept=0
 Gets the dimensions of the image. (1D, 2D, 3D, Cube)
 
virtual unsigned int levels () const noexcept=0
 Gets the number of mip-map levels of the image.
 
virtual unsigned int layers () const noexcept=0
 Gets the number of layers of the image.
 
virtual unsigned int planes () const noexcept=0
 Returns the number of planes of the image.
 
virtual MultiSamplingLevel samples () const noexcept=0
 Gets the number of samples with which the image is sampled.
 
virtual ImageLayout layout (unsigned int sub_resource=0) const =0
 Gets the layout of the image.
 
virtual unsigned int subResourceId (unsigned &level, unsigned &layer, unsigned &plane) const noexcept
 Returns the sub-resource ID for a combination of mip-map level, array layer and plane.
 
std::tuple< unsigned, unsigned, unsigned > resolveSubresource (const unsigned subresource) const noexcept
 Returns the sub-resource ID for a combination of mip-map level, array layer and plane.
 
virtual std::size_t size () const noexcept=0
 Gets the size (in bytes) of the memory chunk.
 
- Public Member Functions inherited from spark::render::IStateResource
virtual const std::string & name () const noexcept=0
 Gets the name of the state resource.
 
- Public Member Functions inherited from spark::render::IDeviceMemory
virtual unsigned int elements () const noexcept=0
 Get the number of sub-resources in the memory chunk.
 
virtual std::size_t elementSize () const noexcept=0
 Gets the size (in bytes) of one element in the memory chunk. If there is only one element, this equals the result of IDeviceMemory::size().
 
virtual std::size_t elementAlignment () const =0
 Gets the alignment of one element in the memory chunk.
 
virtual std::size_t alignedElementSize () const noexcept=0
 Gets the real size (in bytes) of the memory chunk.
 
virtual bool writable () const noexcept=0
 Checks if the resource can be bound to a read/write descriptor.
 
- Public Member Functions inherited from spark::render::IResource< VkImage >
virtual const VkImage & handle () const=0
 Gets the managed resource handle.
 

Additional Inherited Members

- Public Types inherited from spark::render::IResource< VkImage >
using handle_type
 
- Protected Member Functions inherited from spark::render::IResource< VkImage >
virtual VkImage & handle ()=0
 Gets the managed resource handle.
 

Detailed Description

Represents a Vulkan image.

Member Function Documentation

◆ aspectMask() [1/2]

virtual VkImageAspectFlags spark::render::vk::IVulkanImage::aspectMask ( ) const
nodiscardpure virtualnoexcept

Gets the image aspect mask for all sub-resources.

Returns
A VkImageAspectFlags representing the image aspect mask.

Implemented in spark::render::vk::VulkanImage.

◆ aspectMask() [2/2]

virtual VkImageAspectFlags spark::render::vk::IVulkanImage::aspectMask ( unsigned int plane = 0) const
nodiscardpure virtual

Gets the image aspect mask for the given sub-resource.

Parameters
planeThe sub-resource index to get the aspect mask for.
Returns
A VkImageAspectFlags representing the aspect mask for the given sub-resource.

◆ imageView()

virtual const VkImageView & spark::render::vk::IVulkanImage::imageView ( unsigned int plane = 0) const
nodiscardpure virtual

Gets an image view for the given sub-resource.

Parameters
planeThe sub-resource index to get the image view for.
Returns
A VkImageView representing the image view for the given sub-resource.