회전1 OpenGL 키보드 콜백 회전 회오리 #include #include #include #include #include #include using namespace std; int zRotate = 0; void MyDisplay() { glClear(GL_COLOR_BUFFER_BIT); glLoadIdentity(); //이전 상태 초기화 후 변환 glRotatef(zRotate, 0.0, 0.0, 1.0); //z를 중심을 회전 glutSolidTeapot(0.5); glFlush(); } void MyKeyboard(unsigned char KeyPressed, int X, int Y) { switch (KeyPressed) { case 'Q':case'q': exit(0); break; case 'Z': zRotate += 10; b.. 2020. 4. 25. 이전 1 다음