Skip to content

Abergard/imgui-glfw

Repository files navigation

imgui-glfw

Build status Build Status

Easy and fast setup, just pass pointer to GLFWwindow to ImGuiGlfw constructor and draw the ui interface. It prepares and initializes ImGui at construct and deinitializes at destruct time. Example here!

int main()
{
    // ...
    // setup
    ImGuiGlfw ui{/* GLFWwindow* */ window};
 
    // ...
    // in a loop
    ui.draw([&]() {
        ImGui::Begin("Hello, world!");
        ImGui::Text("This is some useful text.");
        ImGui::End();
    });
}