Nameless Engine
Loading...
Searching...
No Matches
FrameResource.h
1#pragma once
2
3// Standard.
4#include <memory>
5#include <optional>
6
7// Custom.
8#include "misc/Error.h"
9#include "render/general/resource/UploadBuffer.h"
10
11namespace ne {
12 class Renderer;
13
16 // Only frame resource manager can initialize us.
17 friend class FrameResourceManager;
18
19 virtual ~FrameResource() = default;
20
22 std::unique_ptr<UploadBuffer> pFrameConstantBuffer;
23
24 private:
32 [[nodiscard]] virtual std::optional<Error> initialize(Renderer* pRenderer) = 0;
33 };
34} // namespace ne
Definition: FrameResourceManager.h:46
Definition: Renderer.h:43
Definition: FrameResource.h:15
std::unique_ptr< UploadBuffer > pFrameConstantBuffer
Definition: FrameResource.h:22
virtual std::optional< Error > initialize(Renderer *pRenderer)=0