locked
WPF & D3D interop ... (WPF Textures?) RRS feed

  • Question

  • Starting with Windows 8 there have been some ways to better use WPF & D3D together...

    http://blogs.msdn.com/b/windowsappdev/archive/2012/03/15/combining-xaml-and-directx.aspx

    I'm mostly interested in the one using WPF as a 2D GUI solution for my D3D apps. In the link above it is shown that one can already use XAML as an 2D GUI overlay on top of D3D content.

    Does this cover just the rendering part of WPF / XAML and will the controls be static or can we use Button, CheckBox, TextBox, etc. controls and they will react to input just as usual ?

    My second question is, are there any plans in the WPF D3D Interop roadmap to support rendering WPF to D3D textures and be able to use those in D3D scenes ? This would be a huge feature and I'd imagine a big amount of developers would like it.

    Thanks

    Friday, November 29, 2013 2:13 PM

All replies

  • Hi,

    >> My second question is, are there any plans in the WPF D3D Interop roadmap

    I did some researches for this issue, Please check out the links below,

    http://directx4wpf.codeplex.com/

    http://msdn.microsoft.com/en-us/library/jj591490.aspx

    Hope this can help you!

    Have a nice time!

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Edited by Yang,Chenfei Wednesday, December 11, 2013 1:12 AM
    Sunday, December 1, 2013 8:22 AM
  • Thanks for your answer.

    But what I want is exactly the opposite way ... not Direct3D inside WPF ... but WPF inside Direct3D.

    For example I'd like to render a WPF Application XAML to a D3D Texture and use the texture on a D3D geometry while still being able to interact with it ... clicking buttons, entering text in a textbox, etc.

    I might repost this thread on the other forum you suggested though.

    Thanks :)


    • Edited by WSteiner Monday, December 2, 2013 3:04 PM typos
    Monday, December 2, 2013 3:03 PM
  • Starting with Windows 8 there have been some ways to better use WPF & D3D together...

    http://blogs.msdn.com/b/windowsappdev/archive/2012/03/15/combining-xaml-and-directx.aspx

    I'm mostly interested in the one using WPF as a 2D GUI solution for my D3D apps. In the link above it is shown that one can already use XAML as an 2D GUI overlay on top of D3D content.

    Does this cover just the rendering part of WPF / XAML and will the controls be static or can we use Button, CheckBox, TextBox, etc. controls and they will react to input just as usual ?

    (to clarify, I want to use WPF GUI content in D3D, not the other way around ... e.g. a WPF GUI on a D3D rendered cube including interaction with the GUI controls)

    Are there any plans in the WPF D3D Interop roadmap to support rendering WPF to D3D textures and be able to use those in D3D scenes ? This would be a huge feature and I'd imagine a big amount of developers would like it.

    Thanks

    Monday, December 2, 2013 3:10 PM
  • Do you mean WPF or are you writing a Windows Store app? While they both use Xml they are different libraries and interact with DX differently.

    For a Windows Store app see http://msdn.microsoft.com/en-us/library/windows/apps/hh825871.aspx . The Xaml controls will all be live.

    --Rob

    Monday, December 2, 2013 4:16 PM
  • I mean WPF ... although I don't know the difference between WPF and the Win8 XAML UI system ... does the latter support complex controls like Grids, ComboBoxes, ProgressBar, etc. ?

    The closest to my usecase is the third point of the link you provided "SwapChainPanel and Gaming".

    Although the limitation ...
    "The Opacity, RenderTransform, Projection, and Clip properties inherited by SwapChainPanel are not supported."
    ... is exactly what my question is about.

    I would like to have a planar 2D UI in a 3D scene that can have a 3D transformation and that I can interact with. I'm just wondering if this is a feature that is planned for the future roadmap of D3D/WPF/XAML development.
    As said, the WPF/XAML content could be rendered to a D3D texture and input events could be injected manually by the programmer (that's how many other UI solutions do it).

    I'm very aware that such a feature doesn't exist as of right know ... I just want to know if this is going to be supported in the (near) future ;)
    Monday, December 2, 2013 4:25 PM
  • I don't believe there are any new D3d interop features beyond D3DImage to render a WPF scene into a WPF visual tree rather than the other way around, but the folks in the WPF forum can confirm. That said, Microsoft cannot talk about future plans on the forums.

    The Windows Store apps forums are specifically about writing Windows Store apps. I'll move this to the WPF forum for you.

    --Rob


    Monday, December 2, 2013 4:48 PM