16#include "imgui_impl_glfw.h"
17#include "imgui_impl_opengl3.h"
26#define GL_SILENCE_DEPRECATION
27#if defined(IMGUI_IMPL_OPENGL_ES2)
30#include <GLFW/glfw3.h>
33#include "implot_internal.h"
35#include "imgui-node-editor/imgui_node_editor.h"
36namespace ImNodeEditor = ax::NodeEditor;
42#if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
43#pragma comment(lib, "legacy_stdio_definitions")
48#include "../libs/emscripten/emscripten_mainloop_stub.h"
52#include "../user_interface_parameters.h"
53#include "../user_interface_window.h"
61 struct GLFWbackgroundImageTexture
64 BackgroundImageParameters parameters;
66 GLFWbackgroundImageTexture()
71 explicit GLFWbackgroundImageTexture(BackgroundImageParameters parameters)
72 : texture(0), parameters(std::move(parameters))
85 UserInterfaceParameters parameters;
86 GLFWbackgroundImageTexture backgroundImageTexture;
88 std::vector<std::shared_ptr<UserInterfaceWindow>> windows;
99 template<
typename T,
typename... Args>
102 auto window = std::make_shared<T>(std::forward<Args>(args)...);
103 windows.push_back(std::move(window));
106 void loadIcon()
const;
108 void loadBackgroundImage();
109 void renderWindows()
const;
110 void renderBackgroundImage()
const;
111 void updateLastRenderedFrameDimensions();
112 void updateFontGlobalScale()
const;
118bool LoadTextureFromFile(
const char* filename, GLuint* out_texture,
int* out_width,
int* out_height);
119float GetDpiScale(GLFWwindow* window);
120GLFWmonitor* GetActiveMonitor(GLFWwindow* window);
void addWindow(Args &&... args)
Constructs a window of type T and registers it for rendering.
Definition win32_dx12_user_interface.h:157
void shutdown()
Destroys the rendering backend, the ImGui contexts and the platform window.
bool isShutdownRequested() const
Returns true once the user has requested to close the window.
void initialize()
Creates the platform window, sets up the rendering backend and the ImGui/ImPlot/node-editor contexts,...
void render()
Renders one frame: processes platform events and calls render() on every registered window.
UserInterface()
Constructs the interface with default UserInterfaceParameters.
Definition colour_palette.h:11