https://github.com/asukaminato0721/-computer-graphics
backup for 计算机图形学素材
https://github.com/asukaminato0721/-computer-graphics
Last synced: 2 months ago
JSON representation
backup for 计算机图形学素材
- Host: GitHub
- URL: https://github.com/asukaminato0721/-computer-graphics
- Owner: asukaminato0721
- License: mit
- Created: 2020-03-02T05:42:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T14:19:32.000Z (almost 5 years ago)
- Last Synced: 2025-04-02T12:53:29.585Z (3 months ago)
- Language: Mathematica
- Size: 669 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 计算机图形学代码备份
> 本项目是基于 MinGW 的,所有代码均已测试成功。
在老师提供的压缩包 `glut-3.7.6-bin.rar` 里有 glut.def, glut.h, glut32.lib, glut32.lib.
作如下安排
假设要编译的 `test.cpp` 在 `fold` 文件夹里
1. glut.def 不用管。
2. glut.h 放在 `\MinGW\include\GL\glut.h`
3. 网上找一个 32 位的 opengl32.dll 下载下来,放在 `fold`,(cmd 里运行 `gcc -v` 确认 `gcc` 是否是 32 位)
4. glut32.dll 也放 `fold`
5. 在 `fold` 目录打开 cmd, 运行 `g++ -o test -Wall test.cpp -mwindows glut32.lib -lopengl32 -lglu32` 即编译成功,会得到 `test.cpp`
6. 注意 `#include ` 一定要写第一行
```cpp
#include
#include
......
```[参考链接](https://w3.cs.jmu.edu/bernstdh/Web/common/help/cpp_mingw-glut-setup.php)
---
弃 CPP,转投 Python 怀抱。
[相关资料](https://hansimov.github.io/#PyOpenGL%20的几个问题)