Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D3DImage possible issues #2

Closed
QuantumDeveloper opened this issue Oct 30, 2015 · 2 comments
Closed

D3DImage possible issues #2

QuantumDeveloper opened this issue Oct 30, 2015 · 2 comments

Comments

@QuantumDeveloper
Copy link

Hi,
As far as I understand, in d3dImage rendering occurs only when OnRender arrives, but what if I have rendering in another thread in while loop and I want to keep rendering without UI thread, but I just need IntPtr to tell swapchain where to render?

Could I render to D3DImage independent from OnRender?
Also, I see that on size changed IntPtr of the surface is changed, which will lead to recreation of the whole swapchain instead of simple swapchain.Resize(). I think this is caused by the fact that WPF internally is still working on DirectX 9 and DirectX 9 has no way to resize swapchain, but DirectX 10 and higher - does.

From the sample I see that you recreate rendertarget each DoRender() call, which is extremely not efficient in highe performance rendering scenarios. Rendertargets should be recreated only when one of the swapchain parameters changed. Other time DX should reuse existing one.

Now I can render in the separate thread to the WinForm surface without any problems with any FPS my PC can reach, but I have only one issue - well known airspace problem. D3DImage could relieve me from it, but it creates a lot of other issues.

All this issues, obviously not that I expect when creating request on visualstudio.uservoice.com for Native DX 11 support for WPF. The goal was high performance immediate mode rendering, but here we still have the same 60 fps.

And my question is: could this be fixed or this will leave forever?

@QuantumDeveloper
Copy link
Author

Also in addition to my previous post: after resizing your D3D11Image few times, it just stops rendering to it and thats all

@rrelyea
Copy link
Contributor

rrelyea commented Oct 30, 2015

I'm going to break this out into ~4 new issues and link to them from here.
Then I'll close this issue. If I missed anything, please bring it back up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants