用 glTranslatef( x, y, z); 移動圖形位置
#include <GL/glut.h>
void display()
{
glTranslatef(0.5, 0.5, 0);
glutSolidTeapot(0.3);
glFlush();
}
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutCreateWindow("02160765");
glutDisplayFunc(display);
glutMainLoop();
}
沒有留言:
張貼留言