blob: 6162ebd8343bab7889ef84aaa6329cb23dc8599b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#pragma once
#include "../../WinPreConfig.hpp"
#include "cru/platform/graph/Resource.hpp"
#include <string_view>
namespace cru::platform::graph::win::direct {
class DirectGraphFactory;
class DirectResource : public Object, public virtual INativeResource {
public:
static constexpr std::u16string_view k_platform_id = u"Windows Direct";
protected:
DirectResource() = default;
public:
CRU_DELETE_COPY(DirectResource)
CRU_DELETE_MOVE(DirectResource)
~DirectResource() override = default;
public:
std::u16string_view GetPlatformId() const final { return k_platform_id; }
};
class DirectGraphResource : public DirectResource,
public virtual IGraphResource {
protected:
// Param factory can't be null.
explicit DirectGraphResource(DirectGraphFactory* factory);
public:
CRU_DELETE_COPY(DirectGraphResource)
CRU_DELETE_MOVE(DirectGraphResource)
~DirectGraphResource() override = default;
public:
IGraphFactory* GetGraphFactory() final;
public:
DirectGraphFactory* GetDirectFactory() const { return factory_; }
private:
DirectGraphFactory* factory_;
};
} // namespace cru::platform::graph::win::direct
|