LiteFX 0.3.1.2022
Computer Graphics Engine
|
Describes a generic image. More...
#include <rendering_api.hpp>
Inherits LiteFX::Rendering::IDeviceMemory, and LiteFX::Rendering::IStateResource.
Inherited by LiteFX::Rendering::Backends::IDirectX12Image [virtual]
, and LiteFX::Rendering::Backends::IVulkanImage [virtual]
.
Public Member Functions | |
virtual | ~IImage () noexcept=default |
virtual size_t | size (const UInt32 &level) const noexcept=0 |
Returns the size (in bytes) of an image at a specified mip map level. If the image does not contain the provided mip map level, the method returns 0 . More... | |
virtual Size3d | extent (const UInt32 &level=0) const noexcept=0 |
Gets the extent of the image at a certain mip-map level. More... | |
virtual const Format & | format () const noexcept=0 |
Gets the internal format of the image. More... | |
virtual const ImageDimensions & | dimensions () const noexcept=0 |
Gets the images dimensionality. More... | |
virtual const UInt32 & | levels () const noexcept=0 |
Gets the number of mip-map levels of the image. More... | |
virtual const UInt32 & | layers () const noexcept=0 |
Gets the number of layers (slices) of the image. More... | |
virtual const UInt32 & | planes () const noexcept=0 |
Returns the number of planes of the image resource. More... | |
virtual const MultiSamplingLevel & | samples () const noexcept=0 |
Gets the number of samples of the texture. More... | |
virtual UInt32 | subresourceId (const UInt32 &level, const UInt32 &layer, const UInt32 &plane) const noexcept |
Public Member Functions inherited from LiteFX::Rendering::IDeviceMemory | |
virtual | ~IDeviceMemory () noexcept=default |
virtual const UInt32 & | elements () const noexcept=0 |
Gets the number of sub-resources inside the memory chunk. More... | |
virtual size_t | size () const noexcept=0 |
Gets the size (in bytes) of the aligned memory chunk. More... | |
virtual size_t | elementSize () const noexcept=0 |
Returns the size of a single element within the buffer. If there is only one element, this is equal to size. More... | |
virtual size_t | elementAlignment () const noexcept=0 |
Returns the alignment of a single element. More... | |
virtual size_t | alignedElementSize () const noexcept=0 |
Returns the actual size of the element in device memory. More... | |
virtual const bool & | writable () const noexcept=0 |
Returns true , if the resource can be bound to a read/write descriptor. More... | |
virtual const ResourceState & | state (const UInt32 &subresource=0) const =0 |
Returns the current state of the resource. More... | |
virtual ResourceState & | state (const UInt32 &subresource=0)=0 |
Returns a reference of the current state of the resource. More... | |
Public Member Functions inherited from LiteFX::Rendering::IStateResource | |
virtual | ~IStateResource () noexcept=default |
virtual const String & | name () const noexcept=0 |
Returns the name of the resource. More... | |
Describes a generic image.
|
virtualdefaultnoexcept |
|
pure virtualnoexcept |
Gets the images dimensionality.
The dimensions imply various things, most importantly, which components of the extent are used. Note that cube maps behave like 2D images when the extent is used.
Implemented in LiteFX::Rendering::Backends::DirectX12Image, and LiteFX::Rendering::Backends::VulkanImage.
|
pure virtualnoexcept |
Gets the extent of the image at a certain mip-map level.
Not all components of the extent are actually used. Check the dimensions to see, which components are required. The extent will be 0 for invalid mip-map levels and 1 or more for valid mip map levels.
Implemented in LiteFX::Rendering::Backends::DirectX12Image, and LiteFX::Rendering::Backends::VulkanImage.
|
pure virtualnoexcept |
Gets the internal format of the image.
Implemented in LiteFX::Rendering::Backends::DirectX12Image, and LiteFX::Rendering::Backends::VulkanImage.
|
pure virtualnoexcept |
Gets the number of layers (slices) of the image.
Implemented in LiteFX::Rendering::Backends::DirectX12Image, and LiteFX::Rendering::Backends::VulkanImage.
|
pure virtualnoexcept |
Gets the number of mip-map levels of the image.
Implemented in LiteFX::Rendering::Backends::DirectX12Image, and LiteFX::Rendering::Backends::VulkanImage.
|
pure virtualnoexcept |
Returns the number of planes of the image resource.
The number of planes is dictated by the image format.
Implemented in LiteFX::Rendering::Backends::DirectX12Image, and LiteFX::Rendering::Backends::VulkanImage.
|
pure virtualnoexcept |
Gets the number of samples of the texture.
Implemented in LiteFX::Rendering::Backends::DirectX12Image, and LiteFX::Rendering::Backends::VulkanImage.
|
pure virtualnoexcept |
Returns the size (in bytes) of an image at a specified mip map level. If the image does not contain the provided mip map level, the method returns 0
.
Note that the size will only be returned for one layer. You have to multiply this value by the number of layers, if you want to receive the size of all layers of a certain mip-map level. This is especially important, if you use cube mapping, because this method will only return the size of one face.
level | The mip map level to return the size for. |
Implemented in LiteFX::Rendering::Backends::DirectX12Image, and LiteFX::Rendering::Backends::VulkanImage.