Files
HydraV3/HydraEngine/source/task/gui/HydraInitialiseGUITask.hpp
T

42 lines
1.2 KiB
C++
Raw Normal View History

2026-08-30 19:06:41 +01:00
#ifndef HYDRAINITIALISEGUITASK
#define HYDRAINITIALISEGUITASK
#include "../HydraTask.h"
#include "../../engine/HydraEngine.h"
#include "../../renderer/HydraRenderer.h"
#include "../../windowmanager/HydraWindowManager.h"
#include "../../GlewIncludes.h"
#include <GLMIncludes.h>
#include <imgui.h>
#include <imgui_impl_glfw.h>
#include <imgui_impl_opengl3.h>
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 */