2016年3月1日 星期二

Week2_01370984黃昱鳴

Class Work 1

download two zip files and glut32.dll. then unzip two zip files; windows and data. put these data into windows file. double clicks shape.exe.


Class Work 2

#include<GL/glut.h>

void display()
{
    glClear(GL_COLOR_BUFFER_BIT);
    glClearColor(0.5,0.5,0,0); //RGBA
    glColor3f(1,0.5,0.5); //RGB
    glutSolidTeapot(0.3);
    glutSwapBuffers();
}
int main(int argc, char**argv)
{

    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH);
    glutCreateWindow("hello 3D");

    glutDisplayFunc(display);

    glutMainLoop();
}


沒有留言:

張貼留言