#ifndef HYDRAINITIALISEGUITASK #define HYDRAINITIALISEGUITASK #include "../HydraTask.h" #include "../../engine/HydraEngine.h" #include "../../renderer/HydraRenderer.h" #include "../../windowmanager/HydraWindowManager.h" #include "../../GlewIncludes.h" #include #include #include #include class HydraInitialiseGUITask : public HydraTask { private: protected: public: void Process() override { // Setup Dear ImGui context IMGUI_CHECKVERSION(); ImGui::CreateContext(); ImGuiIO& io = ImGui::GetIO(); io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls //io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // IF using Docking Branch // Setup Platform/Renderer backends ImGui_ImplGlfw_InitForOpenGL(GetEngine()->WindowManager()->GetWindow(), true); // Second param install_callback=true will install GLFW callbacks and chain to existing ones. ImGui_ImplOpenGL3_Init(); } void Initialise() { } }; #endif /* HYDRAINITIALISEGUITASK */