Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ImguiRenderModule.h
Go to the documentation of this file.
1#pragma once
2
7
9
10#include <Math/TVector2.h>
11
12#include <cstddef>
13#include <array>
14#include <string>
15#include <memory>
16
17namespace ph::editor::render { class ImguiRenderContent; }
18namespace ph::editor::render { class Scene; }
19
20namespace ph::editor
21{
22
23class Editor;
24
26{
27public:
30
31 std::string getName() const override;
32 void onAttach(const ModuleAttachmentInfo& info) override;
33 void onDetach() override;
34 void renderUpdate(const MainThreadRenderUpdateContext& ctx) override;
35 void createRenderCommands(RenderThreadCaller& caller) override;
36 void createSetupRenderCommands(RenderThreadCaller& caller) override;
38
39private:
40 void initializeImgui(Editor& editor);
41 void initializeImguiFonts(Editor& editor);
42 void initializeImguiImages(Editor& editor);
43 void terminateImgui();
44 void setDisplayFramebufferSizePx(const math::Vector2S& sizePx);
45
46 GLFWwindow* m_glfwWindow;
47 render::ImguiRenderContent* m_renderContent;
48 render::Scene* m_rendererScene;
49 std::string m_configFilePath;
50 math::TVector2<uint32> m_displayFramebufferSizePx;
51 bool m_isRenderContentAdded;
52 std::array<ImWchar, 3> m_fontIconGlyphRanges;
53
54 std::unique_ptr<ImguiEditorUI> m_editorUI;
55 std::unique_ptr<ImguiFontLibrary> m_fontLibrary;
56 std::unique_ptr<ImguiImageLibrary> m_imageLibrary;
57};
58
59inline std::string ImguiRenderModule::getName() const
60{
61 return "imgui";
62}
63
64}// end namespace ph::editor
Definition Editor.h:45
Definition ImguiRenderModule.h:26
void createCleanupRenderCommands(RenderThreadCaller &caller) override
Definition ImguiRenderModule.cpp:197
void onAttach(const ModuleAttachmentInfo &info) override
Definition ImguiRenderModule.cpp:59
std::string getName() const override
Definition ImguiRenderModule.h:59
void renderUpdate(const MainThreadRenderUpdateContext &ctx) override
Definition ImguiRenderModule.cpp:110
void onDetach() override
Definition ImguiRenderModule.cpp:101
void createSetupRenderCommands(RenderThreadCaller &caller) override
Definition ImguiRenderModule.cpp:149
ImguiRenderModule()
Definition ImguiRenderModule.cpp:37
void createRenderCommands(RenderThreadCaller &caller) override
Definition ImguiRenderModule.cpp:181
Definition MainThreadRenderUpdateContext.h:11
Definition ModuleAttachmentInfo.h:15
Definition RenderModule.h:15
Thin wrapper for render thread interactions from another thread. Mainly to hide unrelated render thre...
Definition RenderThreadCaller.h:16
Definition ImguiRenderContent.h:18
A scene for the editor renderer only.
Definition Scene.h:34
Definition DesignerObject.h:19
Definition ph_editor.h:10