I haven't found any way to update gameTime by itself, so I updated it manually using C# stopwatch
.
Thanks to Shawn Hargreaves for his article: http://blogs.msdn.com/b/shawnhar/archive/2010/12/06/when-winforms-met-game-loop.aspx
Question
I'm trying to embedd an XNA game into my WPF application. I'm following the code shown here: http://remember.waralan.fr/?p=497 (not in english)
My problem is, gameTime is never updated, and is always 0. How can I increase as it would be in a normal XNA game?
Solution
I haven't found any way to update gameTime by itself, so I updated it manually using C# stopwatch
.
Thanks to Shawn Hargreaves for his article: http://blogs.msdn.com/b/shawnhar/archive/2010/12/06/when-winforms-met-game-loop.aspx
OTHER TIPS
I don't have anything in front of me but it's not enough to just instantiate the Game.
I believe you have to actually Run the game to get the game loop to start.