2 years ago I could force my project to run on 60 FPS (refresh rate of the screen) or even real maximum FPS.
Unfortunately I completely forgot what parameters were changed to manipulate frames per seconds. Here are my presentation parameters:
D3DPRESENT_PARAMETERS d3dpp; ZeroMemory(&d3dpp, sizeof(d3dpp)); d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.Windowed = false; d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8; d3dpp.EnableAutoDepthStencil = TRUE; //włącz bufor Z d3dpp.AutoDepthStencilFormat = D3DFMT_D24S8; d3dpp.BackBufferCount = 1; d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE; d3dpp.MultiSampleQuality = 0; d3dpp.hDeviceWindow = hWnd;
d3dpp.BackBufferWidth = 1680; d3dpp.BackBufferHeight = 1050; d3dpp.Flags = 0; //D3DPRESENTFLAG_LOCKABLE_BACKBUFFER; d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE; //ONE,TWO,THREE,FOURS,IMMEDIATE,D3DPRESENT_INTERVAL_DEFAULT (reduces by half)
I might swear that in order to have refresh rate of the screen (60FPS) I used:
d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
and in order to have real FPS (for example 500) I changed second one to D3DPRESENT_INTERVAL_IMMEDIATE
However whatever parameter is I have now FPS between 63 and 64. It also doesn't depend on amount of draw calls. I now nothing draw on the scene and still I have 63-64. What might be the rootcause? I don't have also any limitation/conditions in message loop. For those 2 years I didn't exchange graphic card, however I reinstalled many time windows, so maybe the rootcause is placed in some graphic card settings???