GLUT 畫圖圖
這是一個茶壺(teapot)
#include <GL/glut.h>
void display()
{
glutSolidTeapot(0.3);
glColor3f(1.0,0.0,0.0);
glutSwapBuffers();
}
int main(int argc,char**argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("week03");
glutDisplayFunc(display);
glutMainLoop();
}
這是一個紅色的茶壺(3f 1,0,0)
這是一個軟體色的茶壺(3ub 0,100,255)
3D龍三角形




沒有留言:
張貼留言