2015年3月4日 星期三

Week02_02161052_葉采晴


第一個3D圖形
選擇open GL project



google搜尋 freeglut 找外掛
選擇glut project
libfreeglut複製一個並改成libglut32




改成以下程式:

#include <GL/glut.h>                                              //呼叫外掛GLUT

void display()
{
    glutSolidTeapot(0.3);                                         //畫實心的茶壺
    glFlush();
}
int main(int argc, char **argv)                              //main()函數
{
    glutInit(&argc, argv);                                         //初始化GLUT
    glutCreateWindow("GLUT Shapes");               //建立window
    glutDisplayFunc(display);                                //叫display()函式做事
    glutMainLoop();                                               //視窗無限循環
}



沒有留言:

張貼留言