2016年3月1日 星期二

Week2






Class Work 1

Step 2. Download [data] [win32] and glut32.dll 
Step 3. Drag glut32.dll into File(win32)
Step 4. Open file(win32) click Shapes.exe





Class Work 2


Source Code:


#include<GL/glut.h>

void display()
{
    glClear(GL_COLOR_BUFFER_BIT); // clean background
    glClearColor(0,1,0,0); //background color
    glColor3f(1,0,0); //Teapot's color
    glutSolidTeapot(0.3);
    glutSwapBuffers();
}

int main(int argc, char **argv)
{
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH);
    glutCreateWindow("Hello 3D");

    glutDisplayFunc(display);

    glutMainLoop();

}








沒有留言:

張貼留言