0

I am encountering a problem where a WPF application runs with a very low frame rate when a D3D application is running at the same time.

The situation is as follows: The first application is a Winforms form that renders 3D graphics using SlimDX and D3D10. The application doesn't run in fullscreen mode, but in a maximized window. This is very smooth and fast.

The second application consists of a WPF window that renders a ScatterView with some images. The WPF window is transparent (AllowsTransparency="True" with a transparent background). The general idea here is that the WPF window should look like it is composited on top of the 3D scene.

However, as soon as the D3D10 application is running, the performance of the WPF app deteriorates to as low as 1-2 fps (as measured by the WPF Performance Tool). That's not because my computer hardware is not capable of rendering both applications: the D3D10 app is always rendering the 3D scene very smoothly, and GPU and CPU utilization does not max out when I have both applications running. Even when I give the WPF app a higher process priority, the rendering performance stays at 1-2 fps.

I have also tried to combine both applications into a single process and using a D3DImage and using a shared D3D10 surface (with a D3D9Ex device) to feed it into the D3DImage. Furthermore I tried using an InteropBitmap and writing the frame data into it. All of those solutions work and produce a D3D10 scene with some WPF controls on top of it, but none of them make WPF run smoothly.

The idea of using two different application processes was my final idea to decouple the WPF rendering stack from any eventual performance impacts that may arise from having D3D10 render in the same process.

4

0 回答 0