安装最新的cmake
brew install cmake
brew upgrade cmake
安装glew
安装GLTools
git clone https://github.com/HazimGazov/GLTools
cd GLTools
cmake . && sudo make install
安装glfw
安装glad
- 进入在线服务: https://glad.dav1d.de/
- API域中gl选择3.3或者以上版本, 3.2与之前的有一些API弃用了
- Profile域中选择Core
- Options域中选择Generate a loader
- 点击右下角的GENERATE
- 跳转到标题为Index的页面, 点击glad.zip下载
- 解压glad.zip
- 将里面的include中的两个文件拷贝到/usr/local/include下
在命令行编译执行
clang++ main.cpp -o test -lglfw3 -framework OpenGL
相关文章:
-
2022-02-07
-
2021-12-27
-
2021-10-16
-
2021-03-27
猜你喜欢
-
2021-07-18
-
2021-12-15
-
2021-05-28
-
2021-11-08
-
2021-11-01
-
2021-09-26
-
2022-12-23
相关资源
-
下载
2021-06-27
-
下载
2021-06-26
-
下载
2023-01-04
-
下载
2023-02-13