2.轉動
程式碼
#include<GL/glut.h>
void motion(int x, int y)
{
}
void display()
{
glClearColor(1,0,1,1);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1,1,0);
glutSolidTeapot(0.3);
glutSwapBuffers();
}
int main(int argc, char**argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("hello3D");
glutDisplayFunc(display);
glutMotionFunc(motion);
glutMainLoop();
}



沒有留言:
張貼留言