Original Post
Hello guys, hope some one help me out of this. Look at the
CD3DApplication::Render3DEnvironment(), the function is as
followed. Check out the DXUtil_Timer that part, from what I
understand TIMER_GETELAPSEDTIME returns time in seconds. And if
you use QueryPerformanceCounter() in that DXUtil_Timer(), the
return values will always be nonzero (I think).
[edited by - HaywireGuy on June 3, 2003 6:19:00 AM]
HRESULT CD3DApplication::Render3DEnvironment()
{
// Check device coorperative level stuff...
....
// Get elapsed time so far.
FLOAT fElapsed = DXUtil_Timer(TIMER_GETELAPSEDTIME);
if((0.0f == fElapsed) && m_bFrameMoving)
return S_OK;
if(m_bFrameMoving)
{
m_fElapsed = fElapsed;
FrameMove();
}
Render();
UpdateStats();
m_lpD3DDevice->Present(...);
return S_OK;
}
In this case, FrameMove() is called, and followed by Render()
and so on. And my question here is, if Render3DEnvironment() is
called 85 times a second, my FrameMove() will get called 85
times a second too. That's too fast for animatin' some
movements isn't it? If this is the case, FrameMove() frame rate
dependent. And when I run my game on a higher end PC, those in
game characters are gonna move much faster... ??
Can some one help clarify this to me? Thanks so much!
[edited by - HaywireGuy on June 3, 2003 6:19:00 AM]