Pygmy's picture

GLControl in WindowsFormsHost in WPF - how to do continuous updates ?

I have a GLControl in a WindowsFormsHost in WPF.
I want to update and render my scene continuously.

What would be the best way to do that in WPF ?
There is no "Application.Idle" event like in Winforms... I'm open to suggestions :)


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

I'm not very familiar with WPF, but I think the equivalent would be something like:

Dispatcher.BeginInvoke(
    System.Windows.Threading.DispatcherPriority.SystemIdle,
    /* your delegate/lambda here */);

where the Dispatcher is an instance property of your window (or something - I'm not 100% certain on this).