第一步利用CodeBlocks打開openGL
設定專案名稱hw1
建立新資料夾(學號)
按F9
作業2
1.下載 freeglut 的Windows MinGW版本
2.解壓縮到C:\user\user\Desktop\freeglut
3.在codeblocks新增一個project
4.把GLUT設在C:\user\user\Desktop\freeglut
5.把libl\libfreeglut.a copy 成 libglut32.a
6.按F9
7.就會跑出六個3D圖案
作業3
#include <GL/glut.h> ///1.呼叫外掛 include GL/glut 的功能
int main(int argc, char **argv) ///2. main() 的參數, 也有高手寫成 int main(int argc, char* argv[])
{
glutInit(&argc, argv); ///3. 把glut 準備好, 參數照舊
glutCreateWindow("02160252黃智筠"); ///4. 開一個glut的視窗,用小駱駝 的名字
glutMainLoop(); ///5. glut的主要迴圈,卡住用的
}
#include <GL/glut.h> ///1.呼叫外掛 include GL/glut 的功能
int main(int argc, char **argv) ///2. main() 的參數, 也有高手寫成 int main(int argc, char* argv[])
{
glutInit(&argc, argv); ///3. 把glut 準備好, 參數照舊
glutCreateWindow("02160252黃智筠"); ///4. 開一個glut的視窗,用小駱駝 的名字
glutMainLoop(); ///5. glut的主要迴圈,卡住用的
}
沒有留言:
張貼留言