An open API service indexing awesome lists of open source software.

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.

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;
}

```