#include <GL/glut.h>
float eyeX=0, eyeY=0, eyeZ=1;
float centerX=0, centerY=0, centerZ=0;
float upX=0, upY=1, upZ=0;
static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3d(1,0,0);
glPushMatrix();
gluLookAt(eyeX, eyeY, eyeZ,
centerX, centerY, centerZ,
upX, upY, upZ);
glutSolidTeapot(0.3);
glPopMatrix();
glutSwapBuffers();
} |
沒有留言:
張貼留言