parent
a212843021
commit
6cf95572d5
10 changed files with 98 additions and 12 deletions
@ -1 +1,32 @@ |
||||
#include "imgui_layer.h" |
||||
#include "imgui_layer.h" |
||||
|
||||
namespace Bk { |
||||
void ImguiLayer::on_attach()
|
||||
{ |
||||
ImGui::CreateContext(); |
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
|
||||
Application& app = Application::get(); |
||||
GLFWwindow* window = static_cast<GLFWwindow*>(app.get_window()->get_native_window()); |
||||
|
||||
// Setup Platform/Renderer bindings
|
||||
ImGui_ImplGlfw_InitForOpenGL(window, true); |
||||
ImGui_ImplOpenGL3_Init("#version 410"); |
||||
} |
||||
|
||||
void ImguiLayer::on_detach()
|
||||
{ |
||||
|
||||
} |
||||
|
||||
void ImguiLayer::on_event(Bk::Event& e)
|
||||
{ |
||||
|
||||
} |
||||
|
||||
void ImguiLayer::on_update() |
||||
{ |
||||
|
||||
} |
||||
} |
@ -1,2 +1,23 @@ |
||||
#pragma once |
||||
|
||||
#include <imgui.h> |
||||
#include <backends/imgui_impl_opengl3.h> |
||||
#include <backends/imgui_impl_glfw.h> |
||||
#include <backends/imgui_impl_glfw.h> |
||||
#include <bakara/core/application.h> |
||||
#include <bakara/core/layer.h> |
||||
|
||||
namespace Bk { |
||||
class ImguiLayer : public Layer
|
||||
{ |
||||
public: |
||||
ImguiLayer() |
||||
: Layer("Imgui") {} |
||||
|
||||
~ImguiLayer() = default; |
||||
|
||||
void on_attach() override; |
||||
void on_detach() override; |
||||
void on_event(Bk::Event& e) override; |
||||
void on_update() override; |
||||
}; |
||||
} |
Loading…
Reference in New Issue