2016年3月1日 星期二

Week02 林明萱



課堂作業1:
             網址 jsyeh.org/3dcg10
             下載老師給的檔案 Data Win32 GLUT32
              解壓縮之後將資料夾放一起
              執行Shapes


課堂作業2:
        開啟新的project
        GLUT Location:C:\Users\USER\Desktop\freeglut-MinGW-2.8.1-1.mp\freeglut
        程式碼:
 #include <GL/glut.h>
void display()
{
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1,0,0);
    glClearColor(0,1,0,0);
    glutSolidTeapot(0.3);
    glutSwapBuffers();
}

int main(int argc,char**argv)
{
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
    glutCreateWindow("Hello 3D");
    glutDisplayFunc(display);
    glutMainLoop();
}



沒有留言:

張貼留言