Game rendering dramatically dragged down
by Dane McGreevy · in Torque Game Engine · 05/21/2007 (5:26 pm) · 4 replies
Hi all,
I found a tricky phenomenon on the TGE 1.4.2 version that we currently use. When it was activated (I mean either the win32 console or the OpenGL canvas for the PlayGUI was on), the game was rendered fine (e.g. FPS reached up to 120). However, its rendering speed was noticeably reduced (FPS down to around 5 even less) when I deactivated it by clicking the mouse on anywhere else on the screen or pressed the "Start Menu" key on the keyboard. All in all, the game rendering got much irregularly broken when it lost the focus. The reason I have to leave Torque for some application else is that I need to activate that application and send messages to Torque.
Has anyone else noticed this issue? I would guess it's something to do with the thread stuff. Well, I can be wrong anyway. Any pointer would be appreciated!
I found a tricky phenomenon on the TGE 1.4.2 version that we currently use. When it was activated (I mean either the win32 console or the OpenGL canvas for the PlayGUI was on), the game was rendered fine (e.g. FPS reached up to 120). However, its rendering speed was noticeably reduced (FPS down to around 5 even less) when I deactivated it by clicking the mouse on anywhere else on the screen or pressed the "Start Menu" key on the keyboard. All in all, the game rendering got much irregularly broken when it lost the focus. The reason I have to leave Torque for some application else is that I need to activate that application and send messages to Torque.
Has anyone else noticed this issue? I would guess it's something to do with the thread stuff. Well, I can be wrong anyway. Any pointer would be appreciated!
Associate Orion Elenzil
Real Life Plus
look in Platform::process() for a line like this:
// If we are in background or minimized, sleep for 100ms or until message is recieved