2016年3月1日 星期二

Week 02_胡安俊

Shape Test


Teapot color

C

#include<GL/glut.h>

void display()
{
     glClearColor(1,1,0,0);
     glClear(GL_COLOR_BUFFER_BIT);
     glColor3f(1,0,0);
     glutSolidTeapot(0.3);
     glutSwapBuffers();
}
int main(int argc,char**argv)
{
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_DEPTH);
    glutCreateWindow("hello");

    glutDisplayFunc(display);
    glutMainLoop();
}







沒有留言:

張貼留言