ImGui
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#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 */
|
||||
Reference in New Issue
Block a user