{"id":21285235,"url":"https://github.com/vokegpu/ekg","last_synced_at":"2025-07-11T11:32:18.585Z","repository":{"id":41227472,"uuid":"508459066","full_name":"vokegpu/ekg-ui-library","owner":"vokegpu","description":"High-performance multi-platform GUI library for SDL2 OpenGL/Vulkan accelerated","archived":false,"fork":false,"pushed_at":"2024-04-13T16:35:47.000Z","size":952582,"stargazers_count":33,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"version-core","last_synced_at":"2024-04-13T20:50:22.456Z","etag":null,"topics":["cpp17","gui","hacktoberfest","opengl","sdl2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vokegpu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"MrsRina"}},"created_at":"2022-06-28T21:23:00.000Z","updated_at":"2024-04-15T01:41:50.145Z","dependencies_parsed_at":"2024-03-30T04:29:59.808Z","dependency_job_id":"dab38755-09de-492b-b250-b86bdc2bba3d","html_url":"https://github.com/vokegpu/ekg-ui-library","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vokegpu%2Fekg-ui-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vokegpu%2Fekg-ui-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vokegpu%2Fekg-ui-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vokegpu%2Fekg-ui-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vokegpu","download_url":"https://codeload.github.com/vokegpu/ekg-ui-library/tar.gz/refs/heads/version-core","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225716398,"owners_count":17513000,"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","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":["cpp17","gui","hacktoberfest","opengl","sdl2"],"created_at":"2024-11-21T11:18:57.879Z","updated_at":"2025-07-11T11:32:18.574Z","avatar_url":"https://github.com/vokegpu.png","language":"C++","funding_links":["https://github.com/sponsors/MrsRina"],"categories":[],"sub_categories":[],"readme":"# 🐄 EKG 🐈\n\nEKG is a descriptor-based low-latency memory-safety modular UI-toolkit for desktop-apps, mobile-apps, and high-performance apps.\n\nThe purpose of EKG is to be an alternative way to create fancy and low-latency C++ memory-safety GUI-context. EKG is under an experimental-buildable-unstable version, which means no ready-prod release was made before.\n\nThe complete article of EKG memory-safety model can be read [here](https://github.com/vokegpu/ekg-docs/blob/master/model/memory.md). Ultimately, EKG does not use raw-ptr(s) or even smart-ptr(s), except for hardware interfaces (platform-base and rendering-api), the entire EKG use of a virtual memory with virtual address which is called `ekg::at_t`, `ekg::at_t` is a virtual-address reference pointer to EKG descriptors, you can read more about [here](https://github.com/vokegpu/ekg-docs/blob/master/model/memory.md#descriptor).\n\nFor a complete technical details about EKG read [here](https://github.com/vokegpu/ekg-docs/tree/master?tab=readme-ov-file#ekg-technical-details).\n\n## GUIs with EKG\n\n### Initializing\n\nThis is an example for SDL2 and OpenGL 4.5, for a complete desired program [looks here](https://github.com/vokegpu/ekg-sandbox).\n\n```cpp\nekg::ft_library ft_library {};\nFT_Init_FreeType(\u0026ft_library);\n\nekg::runtime_properties_info_t runtime_properties_info {\n  .default_font_path_text = \"./comic-mono.ttf\",\n  .default_font_path_emoji = \"./twemoji.ttf\",\n  .p_platform_base = new ekg::sdl2(app.p_sdl_win),\n  .p_gpu_api = new ekg::opengl(),\n  .ft_library = ft_library\n};\n\nekg::runtime_t ekg_runtime {};\nekg::init(\n  runtime_properties_info,\n  \u0026ekg_runtime\n);\n\nwhile (true) {\n  while (SDL_PollEvent(\u0026sdl_event)) {\n    ekg::sdl2_poll_event(sdl_event);\n  }\n\n  ekg::update();\n\n  // clear screen and previous buffers\n\n  ekg::gui.ui.dt = 0.016f;\n  ekg::render();\n\n  // swap buffers\n}\n```\n\n### Widgets\n\nA simple frame using the basic of `ekg::make\u003ct\u003e`!\n```cpp\nekg::make\u003cekg::stack_t\u003e(\n  ekg::stack_t meow {\n    .tag = \"moo\"\n  }\n);\n\nekg::frame_t frame_template {\n  .tag = \"meows\",\n  .rect = {20.0f, 20.0f, 200.0f, 200.0f},\n  .drag = ekg::dock::top,\n  .resize = ekg::dock::left | ekg::dock::right | ekg::dock::bottom\n};\n\nauto \u0026my_frame = ekg::make\u003cekg::frame_t\u003e(frame_template);\n```\n\n## Building\n\nEKG is C++17-based and is supported by:  \n| - | GNU-MinGW-w64  \n| - | GNU-G++  \n| - | Clang++  \n\nDependencies for building binary:  \n| - | [FreeType](https://freetype.org/)  \n| - | [GLEW](https://glew.sourceforge.net/)  \n| - | [SDL2](https://www.libsdl.org/)  \n| - | [Ninja](https://ninja-build.org/)  \n| - | [CMake](https://cmake.org/)  \n\nNote: EKG is not SDL2 or GLEW fixed, this is for compile the entire library, for using the library you will not need to compile SDL2 or even GLEW with EKG, you can choose soon Vulkan and GLFW.\n\nRun the following commands:\n```cpp\ncmake -S . -B ./cmake-build -G Ninja -D CMAKE_BUILD_TYPE=Release\ncmake --build ./cmake-build\n```\n\nSupported video APIs:  \n| - | OpenGL 3.1~4.6  \n| - | OpenGL ES 3  \n| - | Emscripten WebGL 2 (OpenGL ES 2) (require building EKG with flag `-D EKG_EMSCRIPTEN_BUILD_TYPE=1`)  \n\nSupported platforms:  \n| - | SDL2  \n\n## Contributing\n\nContributing for EKG is nicely welcome, please confer [EKG docs and read the model architecture](https://github.com/vokegpu/ekg-docs?tab=readme-ov-file#ekg-technical-details) for prevent ~useless~ pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvokegpu%2Fekg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvokegpu%2Fekg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvokegpu%2Fekg/lists"}