i have some problem with the timer.
dun quite understand how it works???
when did i start the timer?how do i stop? quite confused!
let say when i want to rotate the object by 3 degree
everytime i pressed the arrow key...
how do i do it?
or is there other ways to do it?
like using a flag to indicate as shown in the code below:
void CDhView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
z_angle -= 3.0f;
if (z_angle <=0.0f);
z_angle = 359.0f;
cameramode = ROTATE;
if (cameramode == ROTATE)
glRotatef(z_angle, 0.0f, 1.0f, 0.0f);
cameramode == STOP;
so once i rotate the z_angle by 3 degree, then the object
should stop rotating until i press arrow key again.
but it keep on rotating...why??