1.
2.
#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_DOUBLE | GLUT_DEPTH);
glutCreateWindow("hello 3D");
glutDisplayFunc(display);
glutMainLoop();
}


沒有留言:
張貼留言