PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
graphics_frame_runtime_internal.h
1#pragma once
2
3#include "pixelbullet/graphics/graphics.h"
4
5#include <cstddef>
6
7namespace pixelbullet
8{
10{
11 bool successful_present = false;
12 bool successful_present_interval_valid = false;
13 bool swapchain_recreated = false;
14 double successful_present_interval_milliseconds = 0.0;
15 double render_preparation_milliseconds = 0.0;
16 double swapchain_acquire_milliseconds = 0.0;
17 double queue_submission_milliseconds = 0.0;
18 double present_milliseconds = 0.0;
19 double fence_wait_milliseconds = 0.0;
20 double swapchain_recreation_milliseconds = 0.0;
21 double device_idle_wait_milliseconds = 0.0;
22};
23
25{
26public:
27 enum class PrepareFrameOutcome
28 {
29 Skipped,
30 Rebuilt,
31 Ready
32 };
33
34 enum class RenderFrameOutcome
35 {
36 Skipped,
37 Rendered
38 };
39
40 static PrepareFrameOutcome PrepareFrame(Graphics& graphics);
41 static RenderFrameOutcome RenderPreparedFrame(Graphics& graphics);
42 [[nodiscard]] static GraphicsFrameTiming GetFrameTiming(const Graphics& graphics) noexcept;
43 static void SetFramebufferResized(Graphics& graphics, std::size_t id);
44};
45} // namespace pixelbullet
Definition graphics_frame_runtime_internal.h:25
Host-facing graphics subsystem shell.
Definition graphics.h:21
Definition graphics_frame_runtime_internal.h:10