1.試試點線面
2.試試Light Material
3.利用glut輸出可改色的茶壺
#include <GL/glut.h>
void display()
{
glClearColor(0,0.5,1,1);//背景色
glClear(GL_COLOR_BUFFER_BIT);//清除buffer
glColor3f(1,0,0); 大紅茶壺
glutSolidTeapot(0.5);
glColor3f(0,1,0); 中綠茶壺
glutSolidTeapot(0.4);
glColor3f(0,0,1); 小藍茶壺
glutSolidTeapot(0.3);
glFlush();
}
同上週 ↓
int main(int arge, char**argv)
{
glutInit(&arge,argv);
glutCreateWindow("02163024金博鈞");
glutDisplayFunc(display);
glutMainLoop();
}
沒有留言:
張貼留言