1.開啟http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/
2.Examples下載win32、data
3.other examples下載glut32.dll
4.解壓縮windows資料夾
5.將data壓縮檔打開(不要解壓縮),直接拖曳到windows資料夾中
6.將glut32.dll放入windows資料夾中
7.打開shapes.exe即可使用
茶壺
延續第一週下載Freeglut後修改主程式碼。
#include<GL/glut.h>
void display()
{
glutSolidTeapot(0.3);
glutSwapBuffers();
}
int main(int argc,char**argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
glutCreateWindow("WeekQ3");
glutDisplayFunc(display);
glutMainLoop();
}
之後執行程式即可
沒有留言:
張貼留言