868 Chapter 18 Object-Oriented Infrastructure
if (MoveObject())
{
m_spkScene->UpdateGS();
m_kCuller.ComputeVisibleSet(m_spkScene);
}
m_pkRenderer->ClearBuffers();
if (m_pkRenderer->BeginScene())
{
m_pkRenderer->DrawScene(m_kCuller.GetVisibleSet());
DrawFrameRate(8,GetHeight()-8,ColorRGBA::WHITE);
m_pkRenderer->EndScene();
}
m_pkRenderer->DisplayBackBuffer();
UpdateFrameCount();
}
The first and last functions are used to coarsely measure the frame rate and the
function
DrawFrameRate just displays the result in the lower-left corner of the screen.
The function
MoveCamera checks to see if the camera has moved as a result of
transformation changes that occurred because of keystrokes (arrow keys, page up or
page down, home or end). If the camera has moved, the potentially ...