Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
RuntimeMaterialLease.h
1#pragma once
2
3#include "Engine/Asset/AssetHandles.h"
4
5namespace Engine
6{
7 class EngineKern;
8}
9
10namespace Engine::Assets
11{
16 {
17 public:
20
23
26
27 [[nodiscard]] MaterialHandle handle() const { return handle_; }
28 [[nodiscard]] bool isValid() const { return owner_ != nullptr && handle_.isValid(); }
29 explicit operator bool() const { return isValid(); }
30
31 void reset();
32
33 private:
34 friend class ::Engine::EngineKern;
35
37 : owner_( owner ), handle_( handle )
38 {
39 }
40
41 EngineKern * owner_ = nullptr;
43 };
44} // namespace Engine::Assets
RuntimeMaterialLease(const RuntimeMaterialLease &)=delete
RuntimeMaterialLease & operator=(RuntimeMaterialLease &&other) noexcept
RuntimeMaterialLease(RuntimeMaterialLease &&other) noexcept
RuntimeMaterialLease(EngineKern *owner, MaterialHandle handle)
RuntimeMaterialLease & operator=(const RuntimeMaterialLease &)=delete
Owns the engine runtime and provides access to engine subsystems.
Definition Engine.h:67
AssetHandle< MaterialHandleTag > MaterialHandle
Handle to a material payload.