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

Add the ability to render a XAML tree to a direct3d texture (offscreen rendering) #144

Open
eladmaimoni opened this issue Dec 10, 2018 · 7 comments
Labels
API suggestion Early API idea and discussion, it is NOT ready for implementation
Milestone

Comments

@eladmaimoni
Copy link

eladmaimoni commented Dec 10, 2018

Currently WPF offers the ability to render a xaml tree to a bitmap via RenderTargetBitmap.
Yet this API forces the client to do a copy of the render target to system memory (and back).
It would be much better if it would be possible to gain access the Direct3D9 render target.

There could be various applications to this feature. 3D game overlays, Heads up displays etc.

Here are several discussions on this issue:
https://stackoverflow.com/questions/10376016/rendering-from-wpfs-internals-to-a-directx-application
https://stackoverflow.com/questions/18881683/how-to-display-wpf-overlay-on-top-of-directx?noredirect=1&lq=1
https://stackoverflow.com/questions/52918039/is-it-technically-possible-to-render-a-wpf-xaml-element-to-a-direct3d-texture

@rladuca rladuca added the API suggestion Early API idea and discussion, it is NOT ready for implementation label Dec 10, 2018
@rladuca rladuca added this to the Future milestone Dec 10, 2018
@lindexi
Copy link
Contributor

lindexi commented Dec 11, 2018

#97 Bring win2d to WPF

And you may use D3DImage.

@lindexi
Copy link
Contributor

lindexi commented Dec 11, 2018

#85 Extensible rendering pipeline

@eladmaimoni
Copy link
Author

eladmaimoni commented Dec 11, 2018

@lindexi

And you may use D3DImage.

How can D3DImage help in this case? it only allows rendering DirectX content to an exisiting WPF UI, not the other way around.

@lindexi
Copy link
Contributor

lindexi commented Dec 11, 2018

But it can add in xaml

@grubioe grubioe added this to Incoming / New in Future Enhancements / Bugs May 15, 2019
@jtorjo
Copy link

jtorjo commented May 25, 2019

Would this allow for then grabbing the direct3d texture into a bitmap (basically, avoiding the costly RenderTargetBitmap on a XAML tree)?

If so, that would be INSANELY USEFUL!
How soon could we expect this? My app would benefit immensely from this. Probably a 10x improvement in speed or so.

@lostmsu
Copy link

lostmsu commented Jul 12, 2020

As a user of WPF, I'd be happy, if RenderTargetBitmap would allow expose its own DXGI surface, or allow me to supply my own.

@jtorjo
Copy link

jtorjo commented Jul 12, 2020

@lostmsu I've given up on this entirely. I've switched to UWP almost a year ago (which comes with its own huge bag of gotchas, but that's an entirely different story).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API suggestion Early API idea and discussion, it is NOT ready for implementation
Projects
No open projects
Development

No branches or pull requests

5 participants