PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
graphics_runtime_backend_internal.h
1#pragma once
2
3#include "pixelbullet/graphics/gpu_diagnostics.h"
4#include "pixelbullet/graphics/graphics.h"
5#include "pixelbullet/graphics/graphics_frame_runtime_internal.h"
6#include "pixelbullet/graphics/render_target.h"
7
8#include <cstdint>
9#include <filesystem>
10#include <memory>
11#include <optional>
12#include <string_view>
13
14namespace pixelbullet
15{
16class RenderDevice;
17class Renderer;
18class Window;
19
20} // namespace pixelbullet
21
22namespace pixelbullet::graphics_internal
23{
25{
26public:
27 virtual ~GraphicsRuntimeBackend() = default;
28
29 virtual pixelbullet::Graphics::FrameOutcome Update() = 0;
30 virtual pixelbullet::GraphicsFrameRuntimeAccess::PrepareFrameOutcome PrepareFrame() = 0;
31 virtual pixelbullet::GraphicsFrameRuntimeAccess::RenderFrameOutcome RenderPreparedFrame() = 0;
32 virtual void WaitIdle() const = 0;
33 virtual void CaptureScreenshot(const std::filesystem::path& filename, std::size_t id) const = 0;
34
35 virtual void SetRenderer(std::unique_ptr<pixelbullet::Renderer>&& renderer) = 0;
36 [[nodiscard]] virtual std::optional<pixelbullet::RenderTargetView> GetRenderTarget(std::string_view name) const = 0;
37 virtual void SetFramebufferResized(std::size_t id) = 0;
38 [[nodiscard]] virtual uint32_t GetFrameImageCount() const noexcept = 0;
39
40 [[nodiscard]] virtual pixelbullet::GraphicsApplicationInfo GetGraphicsApplicationInfo() const = 0;
41 [[nodiscard]] virtual pixelbullet::GraphicsDeviceProperties GetActiveGraphicsDeviceProperties() const = 0;
42};
43
44[[nodiscard]] std::unique_ptr<GraphicsRuntimeBackend> CreateGraphicsRuntimeBackend(pixelbullet::Graphics& owner,
45 pixelbullet::RenderDevice& render_device,
47 pixelbullet::Window& window);
48} // namespace pixelbullet::graphics_internal
Host-facing graphics subsystem shell.
Definition graphics.h:21
Definition render_device.h:15
Definition renderer.h:17
Definition window.h:30
Definition graphics_runtime_backend_internal.h:25
Definition graphics_config.h:11
Definition graphics_config.h:19
Definition gpu_diagnostics.h:24