{"id":13731959,"url":"https://github.com/yak32/glw_imgui","last_synced_at":"2025-08-25T20:20:30.299Z","repository":{"id":81870836,"uuid":"68654959","full_name":"yak32/glw_imgui","owner":"yak32","description":"Code-driven, simple and bloat-free GUI system.","archived":false,"fork":false,"pushed_at":"2019-11-23T18:20:23.000Z","size":3768,"stargazers_count":52,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-14T23:33:18.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yak32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-19T23:23:47.000Z","updated_at":"2023-05-10T13:00:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e1f9686-301e-403e-92e9-d89c8f606397","html_url":"https://github.com/yak32/glw_imgui","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yak32/glw_imgui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yak32%2Fglw_imgui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yak32%2Fglw_imgui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yak32%2Fglw_imgui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yak32%2Fglw_imgui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yak32","download_url":"https://codeload.github.com/yak32/glw_imgui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yak32%2Fglw_imgui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272125347,"owners_count":24877839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:42.546Z","updated_at":"2025-08-25T20:20:30.289Z","avatar_url":"https://github.com/yak32.png","language":"C++","funding_links":[],"categories":["Graphics"],"sub_categories":[],"readme":"![](https://github.com/yak32/glw_imgui/workflows/status/badge.svg) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n\n# glw_imgui - C++ IMGUI implementation\nImmediate Mode UI C++ implementation.\n\nIMGUI is a code-driven, simple and bloat-free GUI system, widely used in modern game engines and games.\nBest explanation of IMGUI concept is [here](https://www.youtube.com/watch?v=Z1qyvQsjK5Y).\n\n#### IMGUI: creation, usage and rendering of a button in one line:\n![Alt text](/../feature-screenshots/screenshots/cancel_button.png)\n```c++\n\n// simple button\nif (gui.button(\"Cancel\"))\n\tdo_cancel_action();\n\n```\n\nAll logic is hidden in the Gui::button() call, rendering commands are issued and added to the render queue. String pooling is used to pack strings in render queue and avoid memory allocation during rendering. Rendering is graphics API independent, platform specific rendering should be implemented (the reference implementation by SDL is provided in the demo project.)\n\nThe library has basic suppot for layouting (attachable toolbars, layout serialization), themes (right now colors only), lock-free multithreading (triple buffering).\n\n### Gallery\nBasic GUI manipulations, various controls, resizable and movable toolbars. Entire UI is built using IMGUI.\n[![ScreenShot](/../feature-screenshots/screenshots/IMGUI_toolbars.png)](https://www.youtube.com/watch?v=TlJiuguyLVo)\n\nThe Editor of [Glow game engine](http://www.glow3d.com)\n\n\n\n#### Build and run:\n\n**Windows:**\nPrerequisites: cmake, C++ compiler\n```\nmkdir build\ncd build\ncmake ..\ncmake --build . --target install\n```\nRun demo.exe from demo/install/ folder.\n\n**Linux:**\nPrerequisites: cmake, C++ compiler, SDL2\n\nInstall SDL2\n```\nsudo apt-get install libsdl2-dev\n```\n\nBuild:\n```\nmkdir build\ncd build\ncmake ..\ncmake --build . --target install\ncd ../demo/install/\n./demo\n```\n\n**MacOS:**\nPrerequisites: cmake, C++ compiler, SDL2\n\nInstall SDL2\n```\nbrew update SDL2\n```\n\nBuild:\n```\nmkdir build\ncd build\ncmake ..\ncmake --build . --target install\ncd ../demo/install/\n./demo\n```\n\n\n### Sample UI update loop with various controls\n```c++\n\tint mouse_x, mouse_y;\n\n\tuint keysPressed = handle_input(x, y);\n\tint w, h;\n\tSDL_GetWindowSize(gWindow, \u0026w, \u0026h);\n\tui.set_text_align(ALIGN_LEFT);\n\n\tui.begin_frame(w, h, x, y, -mouse_wheel, last_char, keysPressed);\n\tlast_char = 0;\n\tmouse_wheel = 0;\n\n\tui.begin_rollout(rollout);\n\tstatic bool collapsed = false;\n\tif (ui.collapse(\"Collapse\", collapsed))\n\t\tcollapsed = !collapsed;\n\n\tif (!collapsed) {\n\t\tui.indent();\n\t\tui.button(\"Button1\");\n\t\tui.button(\"Button2\");\n\t\tui.button(\"Button3\");\n\t\tui.button(\"Button4\");\n\t\tui.separator(true);\n\n\t\tstatic char combo_value[100] = \"Item1\";\n\t\tif (ui.combo(\"Combo Box\", combo_value)) {\n\t\t\tif (ui.combo_item(\"Item1\"))\n\t\t\t\tstrcpy(combo_value, \"Item1\");\n\t\t\tif (ui.combo_item(\"Item2\"))\n\t\t\t\tstrcpy(combo_value, \"Item2\");\n\t\t\tif (ui.combo_item(\"Item3\"))\n\t\t\t\tstrcpy(combo_value, \"Item3\");\n\t\t\tif (ui.combo_item(\"Item4\"))\n\t\t\t\tstrcpy(combo_value, \"Item4\");\n\t\t}\n\t\tui.separator();\n\n\t\tstatic bool checked = false;\n\t\tif (ui.check(\"Checkbox\", checked))\n\t\t\tchecked = !checked;\n\n\t\tui.separator(true);\n\t\tui.texture(\"texture.jpg\");\n\t\tui.rectangle(100);\n\t\tui.texture(nullptr);\n\n\t\tui.separator();\n\t\tui.separator(true);\n\t\tui.label(\"Edit text\");\n\t\tstatic char edit_value[256];\n\t\tbool edit_finished = false;\n\t\tui.edit(edit_value, 256, \u0026edit_finished);\n\t\tui.separator(true);\n\n\t\tui.label(\"Label\");\n\t\tui.value(\"Value\");\n\t\tstatic float val = 1.0f;\n\t\tui.slider(\"Slider\", \u0026val, 0.0f, 10.0f, 1.0f);\n\n\t\tui.separator(true);\n\t\tui.label(\"Progress bar\");\n\t\tstatic float progress = 7.0f;\n\t\tui.progress(progress, 0.0f, 10.0f, 1.0f);\n\n\t\tui.row(3);\n\t\tui.button(\"Item1\");\n\t\tui.button(\"Item2\");\n\t\tui.button(\"Item3\");\n\t\tui.end_row();\n\n\t\tstatic char str_property[100] = \"Property Val\";\n\t\tui.property(\"Property\", str_property, 100, NULL);\n\t\tui.draw_text(5, 5, 0, \"Draw item\", 0xffffffff);\n\n\t\tui.unindent();\n\t}\n\tui.end_rollout();\n\n\tui.begin_rollout(vert_rollout);\n\n\tchar str[100];\n\tstatic int selected = -1;\n\tfor (int i = 0; i \u003c 100; ++i) {\n\t\tsprintf(str, \"item %d\", i);\n\t\tif (ui.item(str, i == selected))\n\t\t\tselected = i;\n\t}\n\n\tui.end_rollout();\n\n\tui.end_frame();\n```\n![Alt text](/../feature-screenshots/screenshots/ref_ui.png)\n\n## FAQ\n\nThe license?\n[BSD](https://opensource.org/licenses/BSD-2-Clause)\n\n### Dependencies\n STL, c-runtime.\n\n### Performance\nRendering - almost allocation-free (and I will try to make it allocation-free completely in the future)\n\n### Compatibility\n  Working on Windows (tested with Visual Studio 2013, 2015), MacOS and Linux.\n\nThe library is based on IMGUI implementation from Recast library by Mikko Mononen\nhttps://github.com/recastnavigation/recastnavigation\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyak32%2Fglw_imgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyak32%2Fglw_imgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyak32%2Fglw_imgui/lists"}