Hey all
I've got a really simple program here (C++, DX9) - just rendering a quad.
I've opened up FRAPS, and it tells me that it's only running at about 30-40fps... and about 0-1% CPU.
Is there something I need to do to prevent it from limiting the framerate?
If it was stuck at about 60fps, I'd assume v-sync was on... but 40fps?
So maybe I need to tell it "hey, actually use some CPU time to render as many frame as you can"?
Render function is just this:
p_dx_Device->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(255, 255, 255), 1.0f, 0);
p_dx_Device->Clear(0, NULL, D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
p_dx_Device->BeginScene();
p_dx_Device->SetStreamSource(0, p_dx_VertexBuffer, 0, sizeof(QUADVERTEX));
p_dx_Device->SetFVF(QUADVERTEXFVF);
p_dx_Device->DrawPrimitive(D3DPT_TRIANGLEFAN, 0, 2);
p_dx_Device->EndScene();
p_dx_Device->Present(NULL, NULL, NULL, NULL);
And message loop is just this:
while(appRunning)
{
while(PeekMessage(&msg_Message, han_Window, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg_Message);
DispatchMessage(&msg_Message);
}
DrawScene(p_Device, p_dx_VB);
}