Original Post
Hi, I have a question about FPS in the scene rendering. this is my frame function, when I take out the render method the FPS jump up to the millions. when I do the scene rendering it drops down to 30. Is that expected. I'm not even doing any rendering just clearing the target and zbuffer, begin scene, end scene and present. Any comments would be appreciated, thanks.
bool Frame(){
startTime = timeGetTime();
app.display.Render();
FPS++;
endTime = timeGetTime();
Duration += endTime - startTime;
if(Duration >= 1000){
Duration = 0;
char buf[256];
sprintf(buf, "FPS=%d", FPS);
app.window.SetTitle(buf);
FPS = 0;
}
return true;
}
bool XDisplayManager::Render(){
m_pD3DDevice->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,
m_BgColor, 1.0f, 0);
m_pD3DDevice->BeginScene();
m_pD3DDevice->EndScene();
m_pD3DDevice->Present(NULL, NULL, NULL, NULL);
return true;
}