PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
imgui_layer_runtime_backend_internal.h
1#pragma once
2
3#include <imgui.h>
4
5#include <memory>
6#include <string_view>
7
8namespace pixelbullet
9{
10class Graphics;
11class RenderDevice;
13
14namespace application_internal
15{
17{
18public:
19 virtual ~ImGuiLayerRuntimeBackend() = default;
20
21 [[nodiscard]] virtual bool IsInitialized() const noexcept = 0;
22 [[nodiscard]] virtual bool EnsureInitialized(pixelbullet::RenderDevice& render_device, pixelbullet::Graphics& graphics) = 0;
23
24 virtual void BeginFrame() = 0;
25 virtual void RenderDrawData(const pixelbullet::RenderFrameContext& frame_context, ImDrawData& draw_data) = 0;
26 virtual void RebuildFontTexture(pixelbullet::RenderDevice& render_device, pixelbullet::Graphics& graphics) = 0;
27 virtual void Shutdown(pixelbullet::RenderDevice& render_device, pixelbullet::Graphics& graphics) = 0;
28
29 [[nodiscard]] virtual ImTextureID GetTexture(pixelbullet::RenderDevice& render_device, pixelbullet::Graphics& graphics,
30 const std::shared_ptr<void>& image) = 0;
31 [[nodiscard]] virtual ImTextureID GetRenderTargetTexture(pixelbullet::RenderDevice& render_device, pixelbullet::Graphics& graphics,
32 std::string_view name) = 0;
33};
34
35[[nodiscard]] std::unique_ptr<ImGuiLayerRuntimeBackend> CreateImGuiLayerRuntimeBackend();
36} // namespace application_internal
37} // namespace pixelbullet
Host-facing graphics subsystem shell.
Definition graphics.h:21
Definition render_device.h:15
Definition render_frame_context.h:15
Definition imgui_layer_runtime_backend_internal.h:17