Fullscreen decreases performance
Fullscreen decreases performance
Hello
Do you know why fullscreen decreases my application performance?
My laptop screen is 1280*768 and the app runs perfectly when I play it at that size (showing all the frame, the windows toolbar, etc.), but if I play exactly the same movie fullscreen, it goes much slower
thanks in advance
marc
Do you know why fullscreen decreases my application performance?
My laptop screen is 1280*768 and the app runs perfectly when I play it at that size (showing all the frame, the windows toolbar, etc.), but if I play exactly the same movie fullscreen, it goes much slower
thanks in advance
marc
With the current implementation the frame rate will actually not be the rate of your monitor but 60 FPS. At least on OpenGL/Windows. Which means that changing the monitor frequency will also make no difference - that value is not used in fullscreen. Not sure if it's different in DirectX.
But disabling vsync should already be enough to find out if this is the problem.
But disabling vsync should already be enough to find out if this is the problem.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
This should be correct to fix the vsync to monitor refresh
The one means wait for 1 refresh interval before redrawing.
Code: Select all
if (wglSwapIntervalEXT)
wglSwapIntervalEXT(vsync ? 1 : 0);
@hybrid: This is correct (thought there is no reason to restrict vsync to a bool as 2 is also a legal value here). The problem is simply that the monitor refresh rate in fullscreen has nothing to do with the refresh rate which you set in windows. That's something which would have to be changed in CIrrDeviceWin32::switchToFullScreen. To set another frequence one would have to add somthing like that:
I don't know why the default is that you get 60Hz, this is just the experience i made.
Code: Select all
dm.dmDisplayFrequency = frequency;
dm.dmFields |= DM_DISPLAYFREQUENCY;
The refresh rate value set in the Windows display settings will have no effect on the refresh rate seen in a full screen d3d app. The refresh rate for a full-screen exclusive d3d app is set in the FullScreen_RefreshRateInHz field of the present params. Right now it is getting set to D3DPRESENT_RATE_DEFAULT which allows the runtime to select an appropriate value. I don't believe that setting the dmDisplayFrequency member of the device mode is enough to do it. Maybe I'm wrong...
Travis
Travis