Sign in to follow this  
tyfius

[SlimDX] Catch other process view to show in WPF application

Recommended Posts

I have a Unity3D application which I hook into a WPF application using a WindowsFormsHost control. As I cannot change the Unity3D application to a web application I'm stuck with an approach like this.

Unfortunately, the use of a WindowsFormsHost control has an impact on the performance. Looking into other solutions I stumbled upon SlimDX and I was wondering if it would be possible to capture the output of an application and show it in my WPF application using the SlimDX WPF controls. I assume they would have an advantage over using the WindowsFormsHost control.

Share this post


Link to post
Share on other sites
This is something I've experimented with personally, and I'm sorry to report that it's actually pretty hard to do properly even when you have access to the rendering program's source. There *is* a fast path available, specifically the [url="http://msdn.microsoft.com/en-us/library/windows/desktop/ee913554(v=VS.85).aspx#interoperability_between_direct3d_9ex_and_dxgi_based_apis"]D3D9Ex shared resource concept[/url], but there are constraints on what resources can be shared and how. Unfortunately, I don't think this is a viable solution for your needs considering that A) I believe Unity3D uses OpenGL, and B) if Unity did use D3D9Ex, it would need to create its framebuffers with a special flag that I'd wager would not have been toggled.

On the other hand, if there is a fast and easy way to do this I'm all ears too.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this