Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
Storage.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <Common/primitive_type.h>
6
7#include <cstddef>
8#include <variant>
9
10namespace ph::editor::ghi
11{
12
14{
15public:
16 using NativeHandle = std::variant<
17 std::monostate,
18 uint64>;
19
20 explicit Storage(EStorageUsage usage);
21 virtual ~Storage();
22
23 virtual void upload(
24 const std::byte* rawData,
25 std::size_t numBytes) = 0;
26
28
29 EStorageUsage getUsage() const;
30
31private:
32 EStorageUsage m_usage;
33};
34
37{
38 return std::monostate();
39}
40
42{
43 return m_usage;
44}
45
46}// end namespace ph::editor::ghi
Definition Storage.h:14
std::variant< std::monostate, uint64 > NativeHandle
Definition Storage.h:16
Storage(EStorageUsage usage)
Definition Storage.cpp:6
virtual void upload(const std::byte *rawData, std::size_t numBytes)=0
virtual NativeHandle getNativeHandle()
Definition Storage.h:35
EStorageUsage getUsage() const
Definition Storage.h:41
Definition PlatformDisplay.h:13
EStorageUsage
Definition ghi_enums.h:86