Nameless Engine
|
#include <ShaderCpuWriteResourceBindingUniquePtr.h>
Public Member Functions | |
ShaderCpuWriteResourceBindingUniquePtr (const ShaderCpuWriteResourceBindingUniquePtr &)=delete | |
ShaderCpuWriteResourceBindingUniquePtr & | operator= (const ShaderCpuWriteResourceBindingUniquePtr &)=delete |
ShaderCpuWriteResourceBindingUniquePtr (ShaderCpuWriteResourceBindingUniquePtr &&other) noexcept | |
ShaderCpuWriteResourceBindingUniquePtr & | operator= (ShaderCpuWriteResourceBindingUniquePtr &&other) noexcept |
void | markAsNeedsUpdate () |
ShaderCpuWriteResourceBinding * | getResource () const |
Private Member Functions | |
ShaderCpuWriteResourceBindingUniquePtr (ShaderCpuWriteResourceBindingManager *pManager, ShaderCpuWriteResourceBinding *pResource) | |
Private Attributes | |
ShaderCpuWriteResourceBindingManager * | pManager = nullptr |
ShaderCpuWriteResourceBinding * | pResource = nullptr |
Friends | |
class | ShaderCpuWriteResourceBindingManager |
Small raw pointer wrapper that acts like std::unique_ptr
for shader CPU write resource bindings to do some extra work when started/stopped referencing a resource.
When deleted causes the resource to be also deleted.
|
noexcept |
Move constructor.
other | Other object. |
|
private |
Constructs a new unique pointer.
pManager | Manager that owns the resource. |
pResource | Resource to point to. |
|
inline |
Returns the underlying resource.
nullptr
if moved or not initialized, otherwise valid pointer to resource. void ne::ShaderCpuWriteResourceBindingUniquePtr::markAsNeedsUpdate | ( | ) |
Marks shader resource as "needs update", this will cause resource's update callback to be called multiple times.
|
noexcept |
Move assignment.
other | Other object. |
|
private |
Manager that owns the resource we are pointing to.
|
private |
Resource we are pointing to.