I'm trying to write a game loop in C#, but I can't access the WPF objects from another thread...
Basically this is what I want in my loop:
Loop:
Read Input Update game state Render to a buffer Send buffer to graphic card show rendered image on screen repeat.
What is the best way to do this?
I could do this with Dispatcher.Invoke
, but I don't think Dispatcher.Invoke
is made for normal UI stuff.