LiteFX 0.5.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::Rendering::ResourceAllocationInfo Struct Referencefinal

Contains the parameters for a resource allocation. More...

#include <rendering_api.hpp>

Classes

struct  BufferInfo
 Stores information about a buffer resource allocation. More...
 
struct  ImageInfo
 Stores information about an image resource allocation. More...
 

Public Member Functions

 ResourceAllocationInfo ()=default
 Creates a new resource allocation info instance.
 
 ResourceAllocationInfo (const BufferInfo &bufferInfo, ResourceUsage usage=ResourceUsage::Default, String name="", size_t aliasingOffset=0u)
 Creates a new resource allocation info instance for a buffer resource.
 
 ResourceAllocationInfo (const ImageInfo &imageInfo, ResourceUsage usage=ResourceUsage::Default, String name="", size_t aliasingOffset=0u)
 Creates a new resource allocation info instance for an image resource.
 
 ResourceAllocationInfo (const ResourceAllocationInfo &)=default
 
 ResourceAllocationInfo (ResourceAllocationInfo &&) noexcept=default
 
ResourceAllocationInfooperator= (const ResourceAllocationInfo &)=default
 
ResourceAllocationInfooperator= (ResourceAllocationInfo &&) noexcept=default
 
 ~ResourceAllocationInfo () noexcept=default
 

Public Attributes

Variant< BufferInfo, ImageInfoResourceInfo {}
 Stores the buffer or image info associated with the allocation info.
 
ResourceUsage Usage { ResourceUsage::Default }
 Stores the resource usage flags for the allocation info.
 
String Name { }
 Stores the desired name of the allocated resource.
 
size_t AliasingOffset { 0u }
 An optional offset that is used to place the resource in a block of allocated memory when allocating overlapping resources.
 

Detailed Description

Contains the parameters for a resource allocation.

See also
IGraphicsFactory, ResourceAllocationResult

Constructor & Destructor Documentation

◆ ResourceAllocationInfo() [1/5]

LiteFX::Rendering::ResourceAllocationInfo::ResourceAllocationInfo ( )
default

Creates a new resource allocation info instance.

◆ ResourceAllocationInfo() [2/5]

LiteFX::Rendering::ResourceAllocationInfo::ResourceAllocationInfo ( const BufferInfo & bufferInfo,
ResourceUsage usage = ResourceUsage::Default,
String name = "",
size_t aliasingOffset = 0u )
inlineexplicit

Creates a new resource allocation info instance for a buffer resource.

Parameters
bufferInfoThe details about the buffer.
usageThe usage flags for the buffer.
nameThe name of the buffer resource.
aliasingOffsetAn optional offset that is used to place the resource in a block of allocated memory when allocating overlapping resources.

◆ ResourceAllocationInfo() [3/5]

LiteFX::Rendering::ResourceAllocationInfo::ResourceAllocationInfo ( const ImageInfo & imageInfo,
ResourceUsage usage = ResourceUsage::Default,
String name = "",
size_t aliasingOffset = 0u )
inlineexplicit

Creates a new resource allocation info instance for an image resource.

Parameters
imageInfoThe details about the image.
usageThe usage flags for the image.
nameThe name of the image resource.
aliasingOffsetAn optional offset that is used to place the resource in a block of allocated memory when allocating overlapping resources.

◆ ResourceAllocationInfo() [4/5]

LiteFX::Rendering::ResourceAllocationInfo::ResourceAllocationInfo ( const ResourceAllocationInfo & )
default

◆ ResourceAllocationInfo() [5/5]

LiteFX::Rendering::ResourceAllocationInfo::ResourceAllocationInfo ( ResourceAllocationInfo && )
defaultnoexcept

◆ ~ResourceAllocationInfo()

LiteFX::Rendering::ResourceAllocationInfo::~ResourceAllocationInfo ( )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

ResourceAllocationInfo & LiteFX::Rendering::ResourceAllocationInfo::operator= ( const ResourceAllocationInfo & )
default

◆ operator=() [2/2]

ResourceAllocationInfo & LiteFX::Rendering::ResourceAllocationInfo::operator= ( ResourceAllocationInfo && )
defaultnoexcept

Member Data Documentation

◆ AliasingOffset

size_t LiteFX::Rendering::ResourceAllocationInfo::AliasingOffset { 0u }

An optional offset that is used to place the resource in a block of allocated memory when allocating overlapping resources.

See also
IGraphicsFactory::allocate

◆ Name

String LiteFX::Rendering::ResourceAllocationInfo::Name { }

Stores the desired name of the allocated resource.

◆ ResourceInfo

Variant<BufferInfo, ImageInfo> LiteFX::Rendering::ResourceAllocationInfo::ResourceInfo {}

Stores the buffer or image info associated with the allocation info.

◆ Usage

ResourceUsage LiteFX::Rendering::ResourceAllocationInfo::Usage { ResourceUsage::Default }

Stores the resource usage flags for the allocation info.