2015年3月18日 星期三

Week04 02160510黃品鈞

#include <GL/glut.h>
float angle=0;
void display()
{
    glClear(GL_COLOR_BUFFER_BIT);
    glPushMatrix();
    glTranslatef(-0.3,0,0);
    glRotatef(angle,1,1,0);

    glutWireTorus(0.2,0.5,20,20);
    glutSolidTeapot(0.2);
    glPopMatrix();
    glFlush();
     angle+=0.2;
}

int main(int argc,char**argv)
{
    glutInit(&argc,argv);
    glutCreateWindow("02160510");
    glutDisplayFunc(display);
    glutIdleFunc(display);

    glutMainLoop();
}

沒有留言:

張貼留言