Page 1 of 1

WPF without offscreen rendering

PostPosted: Wed Aug 26, 2015 2:45 am
by sjoerd222888
Hi

For WinForms direct rendering is done by using the Control handle. In the WpfOSR example off-screen rendering is shown where sort of we re-render the image in the Paint function. My question is now how I could do direct rendering for WPF. I know there is not handle for the WPF UserControl.

The only idea I had so far is creating a WPF userControl with an OpenGL Control (for example SharpGL) trying to get the OpenGL context and getting CEF to render to that context. But not sure if something like this is possible at all with CEF. (And I would not yet know where to start).

Edit: My idea would again be off-screen rendering. And hardware accelerated off-screen rendering seems work in progress for CEF.

Re: WPF without offscreen rendering

PostPosted: Wed Aug 26, 2015 2:53 am
by fddima
There is exist similar question CEF integration into a game as an embedded browser.

Also from my feelings, on windows you should take away from any GL stuff, because it is all the time has been broken or work only partially, or hardly depends on proprietary graphic device drivers (and all of them differs).

Also Hardware offscreen render support.

UPD: You can probably take a look on SharpDX and WPF related stuff. But anyway without CEF support it is no have big sense, and it is why WPF uses OSR by default. In other cases whenever you not need apply transformations to control, i.e. when it is exist for normal browsing - it is pretty simple to use windows forms host in WPF. It is exist some bugs with WPF 4.0 / windows forms host, but all of them can be solved in finite time.

Re: WPF without offscreen rendering

PostPosted: Wed Aug 26, 2015 4:20 am
by sjoerd222888
Agree that windows form host might be the best approach in this case.

Thx