NanoGUI教程-NanoGUI库简介

NanoGUI

NanoGUI是一个简约的跨平台GUI库,它依赖于OpenGL 3.x或者更高版本。它支持自动布局生成,有状态的C++11 lambda表达式,各种有用的窗体窗体类型,并且支持在Apple设备上支持Retina渲染,感谢Mikko Mononen的NanoVG对此的共享。所有功能的Python绑定都是使用pybind11提供的。

示例截屏

截图的例1。

描述

NanoGUI基于GLFW构建,用于跨平台OpenGL上下文创建和事件处理,GLAD用于使用OpenGL 3.x或更高版本的Windows,Eigen用于基本矢量类型,NanoVG用于绘制2D基元。

请注意,依赖关系库NanoVG已经包含了一些基本的示例代码来绘制漂亮的窗体部件;NanoGUI所做的是将其充实为一个具有事件处理、布局生成等功能的完整GUI工具包。

NanoGUI目前可在Mac OS X(Clang)Linux(GCC或Clang)和Windows(Visual Studio)上运行≥ 2015); 它需要一个最新的支持C++11的编译器。所有依赖项都是使用基于CMake的构建系统联合构建的。

“Simple mode”

Christian Schüller提供了一个便利类,它使得只需几行代码就可以创建AntTweakBar风格的变量操纵器。有关如何创建下面的图像,请参阅示例2。

截例2。

下面内容作用不大,懒得翻译了

License

NanoGUI is provided under a BSD-style license that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.

NanoGUI uses Daniel Bruce’s Entypo+ font for the icons used on various widgets. This work is licensed under a CC BY-SA 4.0 license. Commercial entities using NanoGUI should consult the proper legal counsel for how to best adhere to the attribution clause of the license.

Note

The CC BY-SA 4.0 license should not be an issue for most projects. However, you can adopt a different font for icons if you need. See Including Custom Fonts.

posted @ 2022-09-29 15:16  loufand  阅读(2642)  评论(0编辑  收藏  举报