LiteFX  0.1.1.2021
Computer Graphics Engine
LiteFX::Rendering::ITexture< TDescriptorLayout, TBufferInterface, TCommandBuffer > Class Template Referenceabstract

Describes a texture. More...

#include <rendering.hpp>

Inherits LiteFX::Rendering::IImage, LiteFX::Rendering::IDescriptor< TDescriptorLayout >, and LiteFX::Rendering::ITransferable< TBufferInterface, TCommandBuffer >.

Public Member Functions

virtual ~ITexture () noexcept=default
 
virtual const MultiSamplingLevel & samples () const noexcept=0
 Gets the number of samples of the texture. More...
 
virtual const UInt32levels () const noexcept=0
 Gets the number of mip-map levels of the texture. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IImage
virtual ~IImage () noexcept=default
 
virtual const Size2dextent () const noexcept=0
 Gets the extent of the image. More...
 
virtual const Format & format () const noexcept=0
 Gets the internal format of the image. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IDeviceMemory
virtual ~IDeviceMemory () noexcept=default
 
virtual const UInt32elements () const noexcept=0
 Gets the number of array elements 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...
 
- Public Member Functions inherited from LiteFX::Rendering::IDescriptor< TDescriptorLayout >
virtual ~IDescriptor () noexcept=default
 
virtual const TDescriptorLayout & layout () const noexcept=0
 Gets the layout of the descriptor. More...
 
- Public Member Functions inherited from LiteFX::Rendering::IBindable
virtual ~IBindable () noexcept=default
 
virtual const UInt32binding () const noexcept=0
 Gets the binding point, this object will be bound to. More...
 
- Public Member Functions inherited from LiteFX::Rendering::ITransferable< TBufferInterface, TCommandBuffer >
virtual ~ITransferable () noexcept=default
 
virtual void transferFrom (const TCommandBuffer &commandBuffer, const TBufferInterface &source, const UInt32 &sourceElement=0, const UInt32 &targetElement=0, const UInt32 &elements=1) const =0
 Transfers data from the source buffer into the objects local memory. More...
 
virtual void transferTo (const TCommandBuffer &commandBuffer, const TBufferInterface &target, const UInt32 &sourceElement=0, const UInt32 &targetElement=0, const UInt32 &elements=1) const =0
 Transfers data from the objects local memory into the target buffer. More...
 

Additional Inherited Members

- Public Types inherited from LiteFX::Rendering::IDescriptor< TDescriptorLayout >
using descriptor_layout_type = TDescriptorLayout
 
- Public Types inherited from LiteFX::Rendering::ITransferable< TBufferInterface, TCommandBuffer >
using command_buffer_type = TCommandBuffer
 
using buffer_type = TBufferInterface
 

Detailed Description

template<typename TDescriptorLayout, typename TBufferInterface, typename TCommandBuffer>
class LiteFX::Rendering::ITexture< TDescriptorLayout, TBufferInterface, TCommandBuffer >

Describes a texture.

A texture can be seen as an IImage, that can be bound to a descriptor.

Template Parameters
TDescriptorLayoutThe type of the descriptor layout. Must inherit from IDescriptorLayout.
TBufferInterfaceThe type of the buffer interface. Must inherit from ITransferableBuffer.

Constructor & Destructor Documentation

◆ ~ITexture()

template<typename TDescriptorLayout , typename TBufferInterface , typename TCommandBuffer >
virtual LiteFX::Rendering::ITexture< TDescriptorLayout, TBufferInterface, TCommandBuffer >::~ITexture ( )
virtualdefaultnoexcept

Member Function Documentation

◆ levels()

template<typename TDescriptorLayout , typename TBufferInterface , typename TCommandBuffer >
virtual const UInt32& LiteFX::Rendering::ITexture< TDescriptorLayout, TBufferInterface, TCommandBuffer >::levels ( ) const
pure virtualnoexcept

Gets the number of mip-map levels of the texture.

Returns
The number of mip-map levels of the texture.

Implemented in LiteFX::Rendering::Backends::VulkanTexture, and LiteFX::Rendering::Backends::DirectX12Texture.

◆ samples()

template<typename TDescriptorLayout , typename TBufferInterface , typename TCommandBuffer >
virtual const MultiSamplingLevel& LiteFX::Rendering::ITexture< TDescriptorLayout, TBufferInterface, TCommandBuffer >::samples ( ) const
pure virtualnoexcept

Gets the number of samples of the texture.

Returns
The number of samples of the texture.

Implemented in LiteFX::Rendering::Backends::VulkanTexture, and LiteFX::Rendering::Backends::DirectX12Texture.