giladbau's picture

WPF Performance

I am about to begin a new project. Some decisions are out of my control: Using WPF and OpenGL are some of them.
However, I have narrowed down my OpenGL options to two: Either OpenTK or SharpGL. SharpGL has a WPF control, while OpenTK only has a Windows Forms control, which makes it that I have to embed it in a Windows Forms Host :-/
While I don't mind the airspace restrictions, I do wish to have decent performance, since I am building a real time application. Not a game, but still, real time.

How much of a performance hit would my program take for using OpenTK over a Windows Forms Host, vs using SharpGL with a "pure" WPF control? Is there a WPF control planned for OpenTK?



Comment viewing options

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

I think you will get much better performance with winforms embedded in a wpf host. That is what we are using for a real time rendering engine. Apart from airspace problems it works perfectly.
As far as I remember, Sharpgl's solution to the native wpf control is to copy the framebuffer on the cpu. This will hurt your performance significantly.
If you are not set on opengl, you can use directx, which will allow you to copy the framebuffer on the gpu with almost no performance lost.

Robmaister's picture

At some point in the near future, I'll attempt to integrate OpenTK with XWT ( ) and, by extension, WPF. I'd use winform host for now, since "near future" might not be for a while...