Nameless Engine
|
#include <DirectXDescriptor.h>
Public Member Functions | |
~DirectXDescriptor () | |
DirectXDescriptor (const DirectXDescriptor &other)=delete | |
DirectXDescriptor & | operator= (const DirectXDescriptor &other)=delete |
DirectXDescriptor (DirectXDescriptor &&other) noexcept=delete | |
DirectXDescriptor & | operator= (DirectXDescriptor &&other) noexcept=delete |
int | getOffsetInDescriptorsOnCurrentFrame () const |
std::variant< unsigned int, Error > | getOffsetFromRangeStartOnCurrentFrame () |
DirectXDescriptorHeap * | getDescriptorHeap () const |
std::shared_ptr< ContinuousDirectXDescriptorRange > | getDescriptorRange () const |
DirectXResource * | getOwnerResource () const |
Protected Member Functions | |
DirectXDescriptor (DirectXDescriptorHeap *pHeap, DirectXDescriptorType descriptorType, DirectXResource *pResource, int iDescriptorOffsetInDescriptors, std::optional< size_t > referencedCubemapFaceIndex, const std::shared_ptr< ContinuousDirectXDescriptorRange > &pRange=nullptr) | |
Private Attributes | |
int | iDescriptorOffsetInDescriptors |
DirectXResource * | pResource = nullptr |
DirectXDescriptorHeap *const | pHeap = nullptr |
std::shared_ptr< ContinuousDirectXDescriptorRange > const | pRange = nullptr |
const std::optional< size_t > | referencedCubemapFaceIndex |
const DirectXDescriptorType | descriptorType |
Friends | |
class | DirectXDescriptorHeap |
Represents a descriptor (to a resource) that is stored in a descriptor heap. Automatically marked as unused in destructor.
ne::DirectXDescriptor::~DirectXDescriptor | ( | ) |
Notifies the heap.
|
protected |
Constructor.
pHeap | Heap of this descriptor. |
descriptorType | Type of this descriptor. |
pResource | Owner resource of this descriptor. |
iDescriptorOffsetInDescriptors | Offset of this descriptor from the heap start (offset is specified in descriptors, not an actual index). |
referencedCubemapFaceIndex | Specify empty if this descriptor does not reference a cubemap, otherwise index of cubemap's face that it references. |
pRange | Range that this descriptor was allocated from. nullptr if allocated not from a range. |
|
inline |
Returns heap that this descriptor uses.
|
inline |
Returns descriptor range that this descriptor was allocated from.
nullptr
if this descriptor was not allocated from a range, otherwise a valid pointer. std::variant< unsigned int, Error > ne::DirectXDescriptor::getOffsetFromRangeStartOnCurrentFrame | ( | ) |
Calculates an offset of the descriptor from the start of the range (see getDescriptorRange) that this descriptor was allocated from.
|
inline |
Returns offset of this descriptor from the heap start (offset is specified in descriptors, not an actual index).
DirectXResource * ne::DirectXDescriptor::getOwnerResource | ( | ) | const |
Returns resource that owns this descriptor.
nullptr
if this descriptor is being destroyed, otherwise owner resource.
|
private |
Type of this descriptor.
|
private |
Offset of this descriptor from the heap start (offset is specified in descriptors, not an actual index).
|
private |
Do not delete. Heap of this descriptor.
|
private |
Range that allocated this descriptor (nullptr
if allocated not from a range).
|
private |
Do not delete. Always valid unless we are in the destructor. Owner resource of this descriptor.
|
private |
Not empty if this descriptor references a cubemap's face.