PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
graphics.h
1#pragma once
2
3#include "pixelbullet/graphics/graphics_config.h"
4
5#include <filesystem>
6#include <memory>
7#include <string>
8
9namespace pixelbullet
10{
11class Window;
12class GraphicsState;
16
20class Graphics
21{
22public:
23 enum class FrameOutcome
24 {
25 Skipped,
26 Rebuilt,
27 Rendered
28 };
29
30 Graphics(GraphicsConfig config, Window& window);
31 ~Graphics();
32
33 Graphics(const Graphics&) = delete;
34 Graphics& operator=(const Graphics&) = delete;
35 Graphics(Graphics&&) = delete;
36 Graphics& operator=(Graphics&&) = delete;
37
38 FrameOutcome Update();
39 void WaitIdle() const;
40
45 void CaptureScreenshot(const std::filesystem::path& filename, std::size_t id = 0) const;
46 const Window& GetWindow() const;
47 Window& GetWindow();
48
49private:
50 friend class GraphicsFrameRuntimeAccess;
51 friend class GraphicsRendererBindingAccess;
52 friend class GraphicsStateAccess;
53
54 std::unique_ptr<GraphicsState> state_;
55};
56} // namespace pixelbullet
Definition graphics_frame_runtime_internal.h:10
Definition graphics_renderer_binding_internal.h:18
Definition graphics_state_internal.h:23
Definition graphics_state_internal.h:30
void CaptureScreenshot(const std::filesystem::path &filename, std::size_t id=0) const
Definition graphics.cc:30
Definition window.h:30
Definition graphics_config.h:19