Unravel Engine C++ Reference
Loading...
Searching...
No Matches
imgui_interface.h
Go to the documentation of this file.
1#pragma once
2
3#include <base/basetypes.hpp>
4#include <context/context.hpp>
5#include <ospp/event.h>
6
7#include "integration/imgui.h"
8
9#include <string>
10
11namespace unravel
12{
13
15{
16public:
19
21 auto init_basic(rtti::context& ctx) -> bool;
23 auto init_finalize(rtti::context& ctx) -> bool;
24 auto deinit(rtti::context& ctx) -> bool;
25
29 const std::string& stage,
30 size_t completed,
31 size_t total,
32 const std::string& current_job = {});
33
34private:
35 void draw_loading_overlay(const std::string& stage,
36 size_t completed,
37 size_t total,
38 const std::string& current_job);
39 void on_frame_ui_render(rtti::context& ctx, delta_t dt);
40 void on_os_event(rtti::context& ctx, os::event& e);
41
42 std::shared_ptr<int> sentinel_ = std::make_shared<int>(0);
43 bool inited_{};
44
45 std::chrono::steady_clock::time_point last_frame_time_;
46};
47} // namespace unravel
void render_loading_frame(rtti::context &ctx, const std::string &stage, size_t completed, size_t total, const std::string &current_job={})
imgui_interface(rtti::context &ctx)
auto deinit(rtti::context &ctx) -> bool
auto init_finalize(rtti::context &ctx) -> bool
Phase 2: creates the cubemap shader program from compiled editor:/ assets.
auto init_basic(rtti::context &ctx) -> bool
Phase 1: creates ImGui context, embedded shaders, fonts. No asset dependencies.
std::chrono::duration< float > delta_t