[DX9] frames per second

Started by
1 comment, last by ArgusMaker 12 years, 8 months ago
Hi :D
How can i increase my fps?
I made a win32 application with dx9 rendering methods.
my WinMain function registers a window class, creates the window and then runs an infinite while loop like this one:


while(true)
{
g_pd3dDevice->BeginScene();
//some render
g_pd3dDevice->EndScene();
g_pd3dDevice->Present(NULL,NULL,NULL,NULL);

TranslateMessage(&messages);
DispatchMessage(&messages);
PeekMessage(&messages,hwnd,0,0,true);
}


My application maintains 60 fps.. but i didn't place any limitation, so how can i increase them?
Advertisement
You'll have to turn off V-Sync.

EDIT: here's how...

[color=#1C2837][size=2]D3DPRESENT_PARAMETERS d3dPP;
d3dPP.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
Thank you, it works ;D

This topic is closed to new replies.

Advertisement