LeviLamina
Loading...
Searching...
No Matches
GraphicsTasks.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/WorkQueue.h"
7#include "mc/external/render_dragon/tasks/RenderQueue.h"
8
9// auto generated forward declare list
10// clang-format off
11class Scheduler;
12class WorkerPool;
13namespace Bedrock::Threading::Burst::Strategy { class Console; }
14namespace Bedrock::Threading::Burst::Strategy::Execution { class GreedyExecution; }
15namespace Core { class DeferredTask; }
16// clang-format on
17
18namespace dragon::tasks {
19
20class GraphicsTasks {
21public:
22 // GraphicsTasks inner types declare
23 // clang-format off
24 struct InitBgfx;
25 struct InitEnd;
26 struct InitFinalize;
27 struct InitBegin;
28 struct InitPending;
30 // clang-format on
31
32 // GraphicsTasks inner types define
33 enum class ExecutionMode : int {
34 Immediate = 0,
35 Deferred = 1,
36 RenderThreadLocked = 2,
37 Unconstrained = 3,
38 };
39
40 struct InitBgfx {
41 public:
42 // member variables
43 // NOLINTBEGIN
47 // NOLINTEND
48
49 public:
50 // prevent constructor by default
51 InitBgfx& operator=(InitBgfx const&);
52 InitBgfx(InitBgfx const&);
53 InitBgfx();
54
55 public:
56 // member functions
57 // NOLINTBEGIN
58
59 // NOLINTEND
60
61 public:
62 // destructor thunk
63 // NOLINTBEGIN
64 MCNAPI_C void $dtor();
65 // NOLINTEND
66 };
67
68 struct InitEnd {
69 public:
70 // member variables
71 // NOLINTBEGIN
73 // NOLINTEND
74
75 public:
76 // prevent constructor by default
77 InitEnd& operator=(InitEnd const&);
78 InitEnd(InitEnd const&);
79 InitEnd();
80 };
81
82 struct InitFinalize {};
83
85 public:
86 // member functions
87 // NOLINTBEGIN
88
89 // NOLINTEND
90
91 public:
92 // destructor thunk
93 // NOLINTBEGIN
94 MCNAPI_C void $dtor();
95 // NOLINTEND
96 };
97
98 struct InitPending : public ::dragon::tasks::GraphicsTasks::InitBgfx {
99 public:
100 // member variables
101 // NOLINTBEGIN
104 // NOLINTEND
105
106 public:
107 // prevent constructor by default
108 InitPending& operator=(InitPending const&);
109 InitPending(InitPending const&);
110 InitPending();
111
112 public:
113 // member functions
114 // NOLINTBEGIN
115
116 // NOLINTEND
117
118 public:
119 // destructor thunk
120 // NOLINTBEGIN
121 MCNAPI_C void $dtor();
122 // NOLINTEND
123 };
124
125 struct InitializationState : public ::std::variant<
126 ::std::monostate,
127 ::dragon::tasks::GraphicsTasks::InitBegin,
128 ::dragon::tasks::GraphicsTasks::InitPending,
129 ::dragon::tasks::GraphicsTasks::InitFinalize,
130 ::dragon::tasks::GraphicsTasks::InitEnd> {
131 public:
132 // member functions
133 // NOLINTBEGIN
134
135 // NOLINTEND
136
137 public:
138 // constructor thunks
139 // NOLINTBEGIN
141
142 MCNAPI_C void* $ctor(::dragon::tasks::GraphicsTasks::InitializationState const&);
143 // NOLINTEND
144
145 public:
146 // destructor thunk
147 // NOLINTBEGIN
148 MCNAPI_C void $dtor();
149 // NOLINTEND
150 };
151
152public:
153 // member variables
154 // NOLINTBEGIN
176 // NOLINTEND
177
178public:
179 // prevent constructor by default
180 GraphicsTasks& operator=(GraphicsTasks const&);
181 GraphicsTasks(GraphicsTasks const&);
182 GraphicsTasks();
183
184public:
185 // member functions
186 // NOLINTBEGIN
187 MCNAPI_C void _forCounter(
188 uint64 count,
189 ::std::function<void(uint64)> const& workerCallback,
190 ::std::function<void(uint)> const& resolveCallback
191 );
192
193 MCNAPI_C bool _queueMainFrameRenderTask(::std::function<void()> const& callback);
194
195 MCNAPI_C void _waitUntilCompleted(::std::shared_ptr<::Core::DeferredTask> task);
196
197 MCNAPI_C ::dragon::tasks::GraphicsTasks::InitializationState
199
200 MCNAPI_C void deinit();
201
202 MCNAPI_C void frame(
203 ::std::function<void()> const& frameContentCallback,
204 ::std::function<::std::chrono::nanoseconds(::std::chrono::nanoseconds)> const& computeSleepDuration
205 );
206
207 MCNAPI_C bool previousFrameComplete();
208
209 MCNAPI_C void queueRenderingTask(::std::function<void()> const& task, ::dragon::tasks::RenderQueue renderQueue);
210
211 MCNAPI_C void queueResourcesTask(::std::function<void()> const& task);
212
213 MCNAPI_C void waitForPreviousFrame();
214 // NOLINTEND
215
216public:
217 // constructor thunks
218 // NOLINTBEGIN
219 MCNAPI_C void* $ctor(
220 ::WorkerPool& rendererPool,
221 ::gsl::span<::std::reference_wrapper<::WorkerPool>> helperPools,
222 ::Scheduler& clientScheduler
223 );
224 // NOLINTEND
225
226public:
227 // destructor thunk
228 // NOLINTBEGIN
229 MCNAPI_C void $dtor();
230 // NOLINTEND
231};
232
233} // namespace dragon::tasks
Definition DeferredTask.h:7
Definition Scheduler.h:14
Definition WorkerPool.h:19
Definition GraphicsTasks.h:84
Definition GraphicsTasks.h:40
Definition GraphicsTasks.h:68
Definition GraphicsTasks.h:82
Definition GraphicsTasks.h:98
Definition Alias.h:14