glui.h无法找到描述+解决+测试

GL/glui.h无法找到。

尝试安装libglui-dev,发现已经不支持了。

那么怎么办?

老版本程序需要跑起来?

源码编译吧。

GLUI 是一个基于 GLUT 的 C++ 用户界面库,它为 OpenGL 应用程序提供按钮、复选框、单选按钮和微调器等控件。它独立于窗口系统,使用 GLUT 或 FreeGLUT。


三步曲: 

  1. cmake ..
  2. make
  3. sudo make install 


zhangrelay@LAPTOP-5REQ7K1L:~/cppcode/glui-master/build$ sudo make install
[ 64%] Built target glui_obj
[ 66%] Built target glui
[ 68%] Built target glui_static
[ 75%] Built target ppm2array
[ 79%] Built target example1
[ 83%] Built target example2
[ 87%] Built target example3
[ 91%] Built target example4
[ 95%] Built target example5
[100%] Built target example6
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libglui_static.a
-- Installing: /usr/local/lib/libglui.so.2.37
-- Installing: /usr/local/lib/libglui.so
-- Up-to-date: /usr/local/include
-- Installing: /usr/local/include/GL
-- Installing: /usr/local/include/GL/glui.h
-- Installing: /usr/local/lib/cmake/glui/gluiConfig.cmake
-- Installing: /usr/local/lib/cmake/glui/gluiConfigVersion.cmake
-- Installing: /usr/local/lib/cmake/glui/gluiTargets.cmake
-- Installing: /usr/local/lib/cmake/glui/gluiTargets-noconfig.cmake 


glui提供了一些案例供学习:

zhangrelay@LAPTOP-5REQ7K1L:~/cppcode/glui-master/example$ tree
.
├── CMakeLists.txt
├── example1.cpp
├── example2.cpp
├── example3.cpp
├── example4.cpp
├── example5.cpp
└── example6.cpp

0 directories, 7 files


类似圆形如下:

三角形如下: 

 

示例代码参考官方案例。


 

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhangrelay

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值