blob: e6ffb203b704303c403f54213bbb68c8a9c394bb (
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/graphics/Resource.hpp"
#include <string_view>
namespace cru::platform::graphics::win::direct {
class DirectGraphFactory;
class DirectResource : public Object, public virtual IPlatformResource {
 public:
  static String kPlatformId;
 protected:
  DirectResource() = default;
 public:
  CRU_DELETE_COPY(DirectResource)
  CRU_DELETE_MOVE(DirectResource)
  ~DirectResource() override = default;
 public:
  String GetPlatformId() const final { return kPlatformId; }
};
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::graphics::win::direct
 |