Example #1
0
File: ANIM.CPP Project: CGSG/TLR
/* Timer event handle function.
 * ARGUMENTS: None.
 * RETURNS: None.
 */
VOID tlr::anim::Timer( VOID )
{
  /* Handle timer */
  timer::Response();
  static CHAR Buf[100];
  sprintf(Buf, "fps: %.5f", FPS);
  SetWindowText(win::hWnd, Buf);

  /* Handle input system */
  input::Response();

  /* Hanlde animation objects */
  for (INT i = 0; i < Units.Size(); i++)
    Units[i]->Response(this);

  StartFrame();
  for (INT i = 0; i < Units.Size(); i++)
  {
    glPushAttrib(GL_ALL_ATTRIB_BITS);
    Units[i]->Render(this);
    glPopAttrib();
  }
  EndFrame();
  CopyFrame();
  IncrFrameCount();
} /* End of 'tlr::anim::Timer' function */
Example #2
0
/* Redraw window content function.
 * ARGUMENTS:
 *   - window device context:
 *       HDC hDC;
 * RETURNS: None.
 */
VOID physic::anim::Paint( HDC hDC )
{
  StartFrame();
  glPushAttrib(GL_ALL_ATTRIB_BITS);
  Navigation.Render(this);
  glPopAttrib();
  World.ModelUpdate(this);
  World.Render(this);
  EndFrame();
  CopyFrame();
  IncrFrameCount();
} /* End of 'physic::anim::Paint' function */
Example #3
0
File: ANIM.CPP Project: CGSG/TLR
/* Redraw window content function.
 * ARGUMENTS:
 *   - window device context:
 *       HDC hDC;
 * RETURNS: None.
 */
VOID tlr::anim::Paint( HDC hDC )
{
  CopyFrame();
  IncrFrameCount();
} /* End of 'tlr::anim::Paint' function */