A C++20 UI library with two programming approaches and an optional Vulkan backend.
Public types live in namespace Nikerva.
Development status: Nikerva is available for testing and integration, but it remains under active development. Further improvements and fixes are ongoing, and APIs or behavior may still change.
| Approach | How you write a screen | Public headers |
|---|---|---|
| Retained | Create controls once; update properties when data changes | Nikerva/UI/Retained/ |
| Every-frame declarative | Declare controls each frame with stable IDs | Nikerva/UI/Decl/ |
Shared geometry and renderer counters live in Nikerva/UI/Layout.hpp and
Nikerva/UI/UIStatistics.hpp. Both approaches use the same renderer-neutral
vocabulary, but have different control ownership and rendering paths.
- Basic usage: dependency setup, CMake targets, migration.
- Retained mode: views, handles, bindings, frame order.
- Declarative UI: stable IDs and each frame's declarations.
- Architecture: ownership, threading, host/backend boundaries.
- Small examples: source, build/run commands, screenshots.
- Retained drawing: lines, polylines, circles, immutable geometry, and an application-owned widget example.
- Full manual and API reference: every widget, property, constructor option, setter, binding, callback, layout/style field, and public header.
- Set, apply, and change values: practical recipes for initial configuration and live updates.
| Target | Contents |
|---|---|
Nikerva::Core |
Both UI approaches, shared geometry, renderer interfaces, retained paint snapshots; depends on GLM |
Nikerva::Vulkan |
Vulkan consumers for retained snapshots and declarative shape/text commands |
Nikerva::Nikerva |
Convenience alias for the Vulkan target |
Set NIKERVA_BUILD_VULKAN=OFF for a Core-only build. Implement Renderer2D and
TextRenderer for declarative drawing, or consume UIPaintSnapshot for retained
drawing. Core does not create windows or submit graphics commands.
The sample host uses GLFW, Vulkan, and the bundled Noto Sans font. Its code is separate from both the library and Nikreon's engine. The font's license is in assets/fonts.