c++ - Updating screen to render camera position -


Using GLUT to use SLD / OpenGL has changed C ++ source. The problem is that since the 'camera condition has changed with GLUT, I am not updating, so instead of moving around instead of using the keyboard, the screen is just made and needs it and there is no updation goes.

Keyboard strokes are working because I have set it up so when the ESC comes out of it and it's okay.

Here's my display function, which is also called on every loop and quotes:

  glClear (GL_COLOR_BUFFER_BIT); GlLoadIdentity (); Camera.Render (); GlTranslatef (0.0, -0.5, -6.0); .... Remove some stuff .... SDL_GL_SwapBuffers ();   

Front camera. Render ();

  SF3dVector ViewPoint = Status + WatchDear; GluLookAt (Position.x, Position.y, Position.z, ViewPoint.x, ViewPoint.y, ViewPoint.z, UpVector.x, UpVector.y, UpVector.z);   

Now what happens when the key is pressed (W, which should move the camera):

  Case SDLK_A: CCAMERA (). Forward forward (-0.1); Display (); break;   

and finally CCAMERA (). MoveForward () function:

  Move forward (GL float distance) (position = position + (see DIIR * - test);}   

Because the key is not updated once the key is pressed, any help will be welcomed! Thanks.

ccaira () just makes a temporary camera (which you take back again.) Then the temporary fades away.

Maybe you camera ?

Comments