I m working on a project that captures the game windows and send it to another node. As long as game is in focus or maximize, the rendering is smooth and steady. When the game is out of focus or minimized, the streaming shows jerky effect. When you maximize the windows, the affect again disappears. Is that an issue of directx game rendering or something else? How this problem can be solved?


closed as off-topic by Anko, jmegaffin, Seth Battin, Josh Apr 9 '15 at 21:45

  • This question does not appear to be about game development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ I'm not the programmer of the game, I'm just fetching its when the it renders. \$\endgroup\$ – Yasir Majeed Mar 26 '15 at 4:05
  • 3
    \$\begingroup\$ I'm voting to close this question as off-topic because it's about the technicalities of a specific game's rendering implementation, only answerable by that game's developers. \$\endgroup\$ – Anko Mar 28 '15 at 13:12
  • \$\begingroup\$ There are issues with windows 10 and how it handles minimized rendering for both OpenGL and DirectX which can become extremely inefficient and extremely CPU intensive, by an order of magnitude or more when compared to the same render in a window or full screen. I believe it has to do with how windows handles rendering to support its thumbnail features and the in efficiency of the faux device contexts. Take care to not only handle normal background modes, but also decrease the frequency of render itself to 10 fps or less even if maintaining the simulation at 60 to stay network responsive. \$\endgroup\$ – Celess May 22 '18 at 2:40

If the system is not under heavy load, there is nothing inherent in DirectX that will reduce performance for a minimized or background window's process. If the system is under heavy load, the OS may prioritize scheduling of the foreground window's process above other processes.

Games will often intentionally throttle back their rendering when their primary window is minimized or goes out of focus, in order to enable a better experience for users who temporarily alt+tab to another process (e.g. Teamspeak, a web browser, etc.).

  • \$\begingroup\$ Can we make such process think that it is still in focus, when it goes out of focus? I couldn't find a way to keep multiple windows in foreground/focused. \$\endgroup\$ – LifeH2O Dec 31 '15 at 14:04
  • \$\begingroup\$ @LifeH2O I don't think it's possible to have multiple windows focused at a time. Also trying to bypass this check and make the OS think your window is in the foreground when its not is a terrible idea. The OS does this for a reason. Programs that try to control the OS (instead of the other way around) are very close to being malicious. \$\endgroup\$ – TomTsagk Oct 28 at 15:58
  • \$\begingroup\$ @TomTsagk I did this by hooking into windows APIs. Game kept thinking that its in focus while it was actually minimized \$\endgroup\$ – LifeH2O Oct 28 at 17:01
  • \$\begingroup\$ @LifeH2O So now, when the OS needs to handle focused and unfocused windows in a certain way, it will handle yours the wrong way. Image a system where all programs work that way. The system won't be able to do optimisations, or to handle everything in a graceful way. \$\endgroup\$ – TomTsagk Oct 28 at 17:16
  • \$\begingroup\$ @TomTsagk it was special case. We were capturing multiple games running on the same system and also sending them controls with window messaging API. The problem was that when the game was minimized, it reduced its own frame rate. This was fixed by not letting the game know that it has been minimized \$\endgroup\$ – LifeH2O Oct 28 at 17:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.