문제

I am having problems with using a camera in OpenGL/freeGLUT. Here is my code:

http://pastebin.com/VCi3Bjq5

(For some reason, when I paste the code into the code feature on this site, it gives extremely weird output.)

As far as I can tell this should rotate the camera when arrow keys are pressed - but it does nothing. It also seems that even the initial camera position is wrong. Any clue why this is?

도움이 되었습니까?

해결책

The display function is only called once. You need to either set an idle function with glutIdleFunc() or tell GLUT that the display function must be called again with glutPostRedisplay().

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top