2016年3月8日 星期二

Week02 王偉丞

(一) 教材: jsyeh.org/3dcg10 下載[data] [win32] [glut32.dll]
       本週主題: 點、線、面、顏色
(二)打程式:
#include <GL/glut.h>
void display()
{
    glutSolidTeapot(0.3);
    glutSwapBuffers();
    glColor3f(1,0,0);
    glClear(GL_COLOR_BUFFER_BIT);
    glClearColor(1,1,0,0);
}
int main(int argc,char **argv)
{
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_DEPTH);
    glutCreateWindow("hello");
    glutDisplayFunc(display);
    glutMainLoop();

}

沒有留言:

張貼留言