2018年3月5日 星期一

Week 02 安淇的課堂筆記

1. 到http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/
    下載  data.zip   windows.zip  glut32.dll
    把windows解壓縮貼上glut


右鍵是選擇形狀
左鍵是拖調整數值

2.自己打程式 畫三角形


3.畫茶壺


4.上色
#include <GL/glut.h>
void display()
{
    glClear(GL_COLOR_BUFFER_BIT);
        glColor3f(0,1,0);
    glutSolidTeapot(0.3);
    glutSwapBuffers();
}
int main(int argc, char**argv)
{
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_DOUBLE);
    glutCreateWindow("05161004");
    glutDisplayFunc(display);
    glutMainLoop();
}

沒有留言:

張貼留言