Skip to content

High-performance, descriptor-based, low-latency, multi-platform, modular GPU-accelerated GUI library written for C++.

License

Notifications You must be signed in to change notification settings

vokegpu/ekg-ui-library

Repository files navigation

🐄 EKG 🐈

EKG is a descriptor-based low-latency UI-toolkit for desktop-apps, mobile-apps, and high-performance apps. Offers multi-support for platforms and graphics API(s).

Note: EKG is not stable yet.

Contributing for EKG is nicely welcome, just take a look on code of conduct and VokeGpu library coding-guide style.

GUIs with EKG

Creating a simple frame:

ekg::make(
  ekg::frame_t {
    .tag = "first frame",
    .rect = {20.0f, 20.0f, 200.0f, 200.0f},
    .drag_dock = ekg::dock::top,
    .resize_dock = ekg::dock::left | ekg::dock::bottom | ekg::dock::right
  }
);

image

Adding buttons:

ekg::button_t button {};

button.tag = "bt-1";
button.text = "moo moo";
button.text_dock = ekg::dock::left;
button.dock = ekg::dock::left;
ekg::make(button);

button.tag = "bt-2";
button.text = "owlf olwf";
button.text_dock = ekg::dock::center;
button.dock = ekg::dock::next | ekg::dock::fill;
ekg::make(button);

button.tag = "bt-3";
button.text = "oi amo gatinhos";
ekg::make(button);

image

You can dynamic change the value, text or any display output via safety-reference:

button.tag = "bt-3";
button.text = "oi amo gatinhos";
ekg::button_t &bla = ekg::make(button);

And then dynamic trigger/set value from fields.

bla.value = true; // set button trigger value forced
bla.text = "clicked here times: " + std::to_string(button_click_times); // set the text dynamically

Others widgets are being re-implemented in this new memory-model, also new future widgets.

May you want to know about this new memory-model or about EKG more, go here.
EKG Docs

Initializing EKG

EKG is a modular library, which does not necessary have one unique base, for example the platform used, supporting SDL2, GLFW and soon others.

ekg::runtime_property_t ekg_runtime_property {
  .font_path = "default.ttf",
  .font_path_emoji = "default-emoji.ttf",
  .p_gpu_api = new ekg::opengl(),
  .p_os_platform = new ekg::sdl(p_win_sdl)
};

ekg::runtime ekg_runtime {};
ekg::init(&ekg_runtime, &ekg_runtime_property);

Supported GPU API(s): OpenGL3+, OpenGLES3.

Supported platform(s): SDL2, GLFW.

About

High-performance, descriptor-based, low-latency, multi-platform, modular GPU-accelerated GUI library written for C++.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages