Nameless Engine
Loading...
Searching...
No Matches
ne::DirectXDescriptor Class Reference

#include <DirectXDescriptor.h>

Public Member Functions

 ~DirectXDescriptor ()
 
 DirectXDescriptor (const DirectXDescriptor &other)=delete
 
DirectXDescriptoroperator= (const DirectXDescriptor &other)=delete
 
 DirectXDescriptor (DirectXDescriptor &&other) noexcept=delete
 
DirectXDescriptoroperator= (DirectXDescriptor &&other) noexcept=delete
 
int getDescriptorOffsetInDescriptors () const
 
DirectXDescriptorHeapgetDescriptorHeap () const
 
DirectXResourcegetOwnerResource () const
 

Protected Member Functions

 DirectXDescriptor (DirectXDescriptorHeap *pHeap, DirectXDescriptorType descriptorType, DirectXResource *pResource, int iDescriptorOffsetInDescriptors, std::optional< size_t > referencedCubemapFaceIndex, ContinuousDirectXDescriptorRange *pRange=nullptr)
 

Private Attributes

int iDescriptorOffsetInDescriptors
 
DirectXResourcepResource = nullptr
 
DirectXDescriptorHeap *const pHeap = nullptr
 
ContinuousDirectXDescriptorRange *const pRange = nullptr
 
const std::optional< size_t > referencedCubemapFaceIndex
 
const DirectXDescriptorType descriptorType
 

Friends

class DirectXDescriptorHeap
 

Detailed Description

Represents a descriptor (to a resource) that is stored in a descriptor heap. Automatically marked as unused in destructor.

Constructor & Destructor Documentation

◆ ~DirectXDescriptor()

ne::DirectXDescriptor::~DirectXDescriptor ( )

Notifies the heap.

◆ DirectXDescriptor()

ne::DirectXDescriptor::DirectXDescriptor ( DirectXDescriptorHeap pHeap,
DirectXDescriptorType  descriptorType,
DirectXResource pResource,
int  iDescriptorOffsetInDescriptors,
std::optional< size_t >  referencedCubemapFaceIndex,
ContinuousDirectXDescriptorRange pRange = nullptr 
)
protected

Constructor.

Parameters
pHeapHeap of this descriptor.
descriptorTypeType of this descriptor.
pResourceOwner resource of this descriptor.
iDescriptorOffsetInDescriptorsOffset of this descriptor from the heap start (offset is specified in descriptors, not an actual index).
referencedCubemapFaceIndexSpecify empty if this descriptor does not reference a cubemap, otherwise index of cubemap's face that it references.
pRangeRange that this descriptor was allocated from. nullptr if allocated as a single descriptor (not part of some range).

Member Function Documentation

◆ getDescriptorHeap()

DirectXDescriptorHeap * ne::DirectXDescriptor::getDescriptorHeap ( ) const
inline

Returns heap that this descriptor uses.

Returns
Descriptor heap.

◆ getDescriptorOffsetInDescriptors()

int ne::DirectXDescriptor::getDescriptorOffsetInDescriptors ( ) const
inline

Returns offset of this descriptor from the heap start (offset is specified in descriptors, not an actual index).

Returns
Descriptor offset.

◆ getOwnerResource()

DirectXResource * ne::DirectXDescriptor::getOwnerResource ( ) const

Returns resource that owns this descriptor.

Returns
Owner resource.

Member Data Documentation

◆ descriptorType

const DirectXDescriptorType ne::DirectXDescriptor::descriptorType
private

Type of this descriptor.

◆ iDescriptorOffsetInDescriptors

int ne::DirectXDescriptor::iDescriptorOffsetInDescriptors
private

Offset of this descriptor from the heap start (offset is specified in descriptors, not an actual index).

◆ pHeap

DirectXDescriptorHeap* const ne::DirectXDescriptor::pHeap = nullptr
private

Do not delete. Heap of this descriptor.

◆ pRange

ContinuousDirectXDescriptorRange* const ne::DirectXDescriptor::pRange = nullptr
private

Do not delete. Range that allocated this descriptor (nullptr if allocated as a single descriptor).

◆ pResource

DirectXResource* ne::DirectXDescriptor::pResource = nullptr
private

Do not delete. Owner resource of this descriptor.

◆ referencedCubemapFaceIndex

const std::optional<size_t> ne::DirectXDescriptor::referencedCubemapFaceIndex
private

Not empty if this descriptor references a cubemap's face.


The documentation for this class was generated from the following files: