Dear ImGui prototyping wrapper.

LabImGui Prototyping framework

LabImGui wraps up creating a window, GL bindings, and a full screen docking set up with ImGui so that all of the boilerplate involved is out of the way.

It's the minimal amount of visible API to pull it off.

Note that until Dear ImGui supports multiple windows on Linux, the multiple window support on this project is not implemented.

Tested on

Platform/SDK GL
Windows ✔️
#include int main(char** argc, int argv) try { lab_imgui_init(); lab_imgui_create_window("Hello LabImgui", 1024, 768); while (lab_imgui_update(1.f/60.f, true)) { lab_WindowState ws; lab_imgui_window_state("Hello LabImgui", &ws); if (!ws.valid) break; lab_imgui_new_docking_frame(&ws); lab_imgui_begin_fullscreen_docking(&ws); //------------ custom begin ImGui::Begin("Hello LabImgui"); ImGui::Button("hi!"); ImGui::End(); //------------ custom end lab_imgui_end_fullscreen_docking(&ws); // render the user interface lab_imgui_render(&ws); // present swaps the frame buffer to be visible // so all frame rendering must be complete before the present call lab_imgui_present(&ws); } lab_imgui_shutdown(); return 0; } catch (std::exception& exc) { std::cerr << exc.what(); return -1; } ">
#include <GL/gl3w.h>
#include "LabImgui/LabImGui-gl-glfw.h"
#include "imgui.h"
#include <exception>
#include <iostream>

int main(char** argc, int argv) try
{
    lab_imgui_init();
    lab_imgui_create_window("Hello LabImgui", 1024, 768);

    while (lab_imgui_update(1.f/60.f, true))
    {
        lab_WindowState ws;
        lab_imgui_window_state("Hello LabImgui", &ws);
        if (!ws.valid)
            break;

        lab_imgui_new_docking_frame(&ws);
        lab_imgui_begin_fullscreen_docking(&ws);

        //------------ custom begin

        ImGui::Begin("Hello LabImgui");
        ImGui::Button("hi!");
        ImGui::End();

        //------------ custom end

        lab_imgui_end_fullscreen_docking(&ws);

        // render the user interface
        lab_imgui_render(&ws);

        // present swaps the frame buffer to be visible
        // so all frame rendering must be complete before the present call
        lab_imgui_present(&ws);
    }

    lab_imgui_shutdown();
    return 0;
}
catch (std::exception& exc)
{
    std::cerr << exc.what();
    return -1;
}
Owner
Nick Porcino
Gamedev & Virtual Production // since 8 bit days :space_invader:
Nick Porcino
Similar Resources

Window and GUI system based on Dear ImGui from OCornut

Window and GUI system based on Dear ImGui from OCornut

ImWindow Window and GUI system based on ImGui from OCornut. Include docking/floating window, multi window and multi render support. Platform Actually

Dec 20, 2022

A permissively licensed markdown single-header library for Dear ImGui.

A permissively licensed markdown single-header library for Dear ImGui.

Support development of imgui_markdown through GitHub Sponsors or Patreon imgui_markdown Markdown For Dear ImGui A permissively licensed markdown singl

Jan 8, 2023

Sample Unreal Engine 5.0.1 C++ Project That Incorporates Dear ImGui

UE5 With Dear ImGui A sample Unreal Engine 5.0.1 C++ project that incorporates the Dear ImGui graphical user interface library. YouTube Tutorial This

Dec 25, 2022

Simple ImGui external base. Uses ImGui DX9.

Simple ImGui external base. Uses ImGui DX9.

ImGui External Base 🖥️ What is this? ⚡ Hello all! I used to use noteffex's loader base for all my external ImGui projects. I got bored of using this

Jun 29, 2022

An addon of imgui for supporting docks in the imgui's window

An addon of imgui for supporting docks in the imgui's window

An addon of imgui for support dock in the window

Nov 29, 2022

CMakeLists wrapper around imgui

ImGui Wrappings This is a trifold wrapper for the Dear ImGui library. Ease integration with CMake, Provide an RAII mechanism for ImGui scopes, Provide

Dec 8, 2022

super duper simple gui for C, wrapping imgui and stb

super duper simle gui for C, wrapping imgui and stb You can use it as a static library with cmake. See the example directory for a complete example. E

May 19, 2022

KeyAuth login form made with ImGui.

KeyAuth-ImGui-Example KeyAuth ImGui Example Download Repository Download the DirectX SDK

Dec 16, 2022

ImGuiBase - A very good & simple external ImGui base

ImGuiBase Join CProject to learn about ImGui! https://discord.gg/dnkdDuUtQu Check out our website: https://cproject.xyz Check out the youtube tutorial

Dec 23, 2022
Comments
  • Project doesn't build on macos

    Project doesn't build on macos

    I tried to build the project but it throws error when when creating config (cmake ..) - seems like there is some issue with LabFont:

    -- Installing Dear Imgui
    -- Installing ImPlot
    -- Installing sokol_gp
    -- Installing sokol
    -- Installing RapidJSON
    -- Installing LabFont
    CMake Error: File /Users/patryk/Developer/compile/LabImGui/build/_deps/labfont-src/LabFontDemo.config.h does not exist.
    CMake Error at LabFont.cmake:22 (configure_file):
      configure_file Problem configuring file
    Call Stack (most recent call first):
      CMakeLists.txt:120 (include)
    
    
    -- Installing cute headers
    -- -Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libarch.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libgf.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libjs.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libplug.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libtf.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libtrace.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libvt.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libar.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libwork.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libkind.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libndr.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libpcp.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libsdf.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libsdr.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusd.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdGeom.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdHydra.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdLux.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdMedia.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdPhysics.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdRi.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdShade.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdSkel.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdUI.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdUtils.a;-Wl,-force_load;/Users/patryk/Developer/compile/LabImGui/build/libusdVol.a
    -- Configuring incomplete, errors occurred!
    
Related tags
This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui.

cimgui This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui. All imgui.h functions are programm

Jul 5, 2021
Unity OnGUI(IMGUI) extensions for Rapid prototyping/development
Unity OnGUI(IMGUI) extensions for Rapid prototyping/development

RapidGUI Unity IMGUI extensions for Rapid prototyping/development. Installation Install via OpenUPM The package is available on the openupm registry.

Dec 25, 2022
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

Dear ImGui (This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addit

Jan 7, 2023
Advanced 2D Plotting for Dear ImGui
Advanced 2D Plotting for Dear ImGui

ImPlot ImPlot is an immediate mode, GPU accelerated plotting library for Dear ImGui. It aims to provide a first-class API that ImGui fans will love. I

Jan 9, 2023
Real-time GUI layout creator/editor for Dear ImGui
Real-time GUI layout creator/editor for Dear ImGui

ImStudio Real-time GUI layout creator/editor for Dear ImGui Inspired by Code-Building/ImGuiBuilder Features Drag edit Property edit Covers most of the

Jan 9, 2023
An integrated information center created with dear ImGui using modern C++ design / coding style.

ImGui info-center Introduction An integrated notification and information center created with dear ImGui. Interfaces and variables are designed under

Oct 29, 2022
Addon widgets for GUI library Dear ImGui.
Addon widgets for GUI library Dear ImGui.

ImGui-Addons Addon widgets for GUI library Dear ImGui. File Dialog A simple cross-platform file dialog that uses dirent interface for reading director

Jan 7, 2023
This is a software renderer for Dear ImGui. I built it not out of a specific need, but because it was fun
This is a software renderer for Dear ImGui. I built it not out of a specific need, but because it was fun

Dear ImGui software renderer This is a software renderer for Dear ImGui. I built it not out of a specific need, but because it was fun. The goal was t

Dec 22, 2022
Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui
Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui

ImGuizmo Latest stable tagged version is 1.83. Current master version is 1.84 WIP. What started with the gizmo is now a collection of dear imgui widge

Dec 27, 2022
Nice things to use along dear imgui
Nice things to use along dear imgui

Mini hexadecimal editor! Right-click for option menu. Features: Keyboard controls. Read-only mode. Optional Ascii display. Optional HexII display. Goto address. Highlight range/function. Read/Write handlers.

Jan 1, 2023