EUI-NEO 是一个跨平台、高性能、低开销的 C++17 GPUI 框架
EUI-NEO 是一个跨平台、高性能、低开销的 C++17 UI 框架,具有 GLFW/SDL2 窗口后端和 OpenGL/Vulkan 渲染后端。 ## 预览 | | | | --- | --- | | | | | | | | | | ## 快速入门 要求: - CMake 3.14+ - C++17 编译器: MSVC 19.29+ (Visual Studio 2019 16.11+)、GCC/MinGW-w64 12+ 或 Clang 14+ - 用于默认渲染器的 OpenGL 开发文件 在 `3rd/EUI-NEO` 下添加 EUI-NEO,然后创建: 如果 GitHub 克隆失败,请将 AtomGit 镜像作为备用方案使用: ```sh git clone https://atomgit.com/sudoevolve/EUI-NEO.git 3rd/EUI-NEO ``` ```cmake cmake_minimum_required(VERSION 3.14) project(MyProject LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(3rd/EUI-NEO)
add_executable(my_app main.cpp) eui_neo_configure_app(my_app)
`main.cpp`:
```cpp
#include "eui_neo.h"
namespace app {
const DslAppConfig& dslAppConfig() {
static const DslAppConfig config = DslAppConfig{}
.title("My App")
.pageId("my_app")
.windowSize(960, 640);
return config;
}
void compose(eui::Ui& ui, const eui::Screen& screen) {
ui.column("root")
.size(screen.width, screen.height)
.padding(32.0f)
.content([&] {
ui.text("title")
.text("Hello EUI-NEO")
.fontSize(28.0f)
.build();
})
.build();
}
} // namespace app构建:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel在使用 Visual Studio 生成器的 Windows 上,运行:
.\build\Release\my_app.exe在 Linux 或 macOS 上,运行:
./build/my_appeui_neo_configure_app() 添加了选定的 GLFW/SDL2 入口点,链接了 eui::neo,应用平台可执行文件设置,并部署运行时
暂无开放 Issues,或尚未同步最近议题。