https://github.com/meshula/labimgui
Dear ImGui prototyping wrapper.
https://github.com/meshula/labimgui
Last synced: 5 days ago
JSON representation
Dear ImGui prototyping wrapper.
- Host: GitHub
- URL: https://github.com/meshula/labimgui
- Owner: meshula
- Created: 2021-11-14T21:05:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-19T20:24:28.000Z (almost 3 years ago)
- Last Synced: 2025-01-13T13:30:13.236Z (over 1 year ago)
- Language: C
- Size: 807 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
Windows | GL | WebGPU/native |
------- | ------------------ | ------------- |
GLFW | :white_check_mark: | :hourglass: |
Sokol | :white_check_mark: | :hourglass: |
Mac | GL | Metal | WebGPU/native |
------- | ------------------ | ------------------ | ---------------- |
GLFW | :white_check_mark: | :hourglass: | :jack_o_lantern: |
Sokol | :white_check_mark: | :white_check_mark: | :jack_o_lantern: |
Cocoa | :jack_o_lantern: | :white_check_mark: | :hourglass: |
iOS | Metal | WebGPU/native |
------- | ------------------ | ---------------- |
Sokol | :hourglass: | :jack_o_lantern: |
Cocoa | :construction: | :hourglass: |
WASM | WebGPU |
------- | ------------------ |
Sokol | :hourglass: |
Linux | GL | Vulkan |
------- | ------------------ | ---------------- |
GLFW | :construction: | :hourglass: |
Sokol | :construction: | :jack_o_lantern: |
```cpp
#include "LabImgui/LabImGui.h"
#include "imgui.h"
#include
#include
void frame()
{
lab_WindowState ws;
lab_imgui_window_state("Hello LabImGui", &ws);
if (!ws.valid)
return;
//------------ draw to the frame buffer
// custom graphics stuff
//------------ start the Dear ImGui portion
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);
}
int main(int argv, char** argc) try
{
lab_imgui_init();
lab_imgui_create_window("Hello LabImGui", 1024, 768, frame);
lab_imgui_shutdown();
return 0;
}
catch (std::exception& exc)
{
std::cerr << exc.what();
return -1;
}
```