Jump to content
Posted 25 September 2012 - 11:40 AM
Posted 25 September 2012 - 01:16 PM
Posted 25 September 2012 - 02:05 PM
Posted 25 September 2012 - 09:21 PM
Posted 26 September 2012 - 09:52 AM
Posted 27 September 2012 - 11:20 PM
There's nothing inherently wrong with only rendering when you need to. The reason games do it is because there are typical objects animating and camera movement constantly, so the changes have to be rendered anyway. If you give more information on what was going wrong with device lost scenarios, it might be a better approach to try to fix those and continue going the way you were before.
If you want to render continuously though, that's also viable. The idea is that you *replace* the Application.Run() method with MessagePump.Run(). You can run as many forms as you want on the same message loop. MessagePump.Run() internally hooks the application "Idle" event and constantly calls your provided callback whenever there are no window messages in the queue. You can put your rendering code inside that loop, and then you can add objects to be rendered to some shared list whenever you need to run one of your tests.