glest / glest-source

Glest is a network multi-player cross-platform 3D real-time strategy (RTS) game, where you create armies of units and battle different factions.
https://glest.io
GNU General Public License v3.0
57 stars 39 forks source link

Lag and delay when game loses and gets focus on Windows #163

Open biels opened 6 years ago

biels commented 6 years ago

When alt-tabbing out of the game and then getting back to it the game seems takes a full 10 seconds to be responsive again. It doesn't look like a performance problem. The CPU or GPU usage is not maxed out during that period and I'm on a quite fast computer that can handle ZG perfectly otherwise. I face this issue on windows, I don't know if it also applies to other OSes. I remember that a a while ago the game would just crash, losing the binding to the graphics buffer or similar.

Doing a bit of research I found that it is not as easy as it should be with OpenGL and that a lot of games suffer from this problem. However commercial ones, even when rendered with OpenGL do not, so we know it is possible to get it right.

Useful links: https://www.opengl.org/discussion_boards/showthread.php/161040-alt-tab-with-fullscreen-fix https://osu.ppy.sh/community/forums/topics/142095 http://www.swiftless.com/tutorials/opengl/fullscreen.html