2/23補課(補3/31)
利用shape理解基本程式碼
茶壺
#include <GL/glut.h>
void display()
{
glutSolidTeapot(0.3);
glutSwapBuffers();
}
int main(int argc,char ** argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
glutCreateWindow("week02 GLUT哦");
glutDisplayFunc(display);
glutMainLoop();
}
#include <GL/glut.h>
void display()
{
glColor3f(0.8,0.6,0);
glutSolidTeapot(0.3);
glutSwapBuffers();
}
int main(int argc,char ** argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
glutCreateWindow("week02 GLUT哦");
glutDisplayFunc(display);
glutMainLoop();
}
沒有留言:
張貼留言