.NET 3.5, WPF and Direct3D

Published May 13, 2008
Advertisement
Cool: WPF Interoperability with Direct3D. Very cool indeed.

I distinctly remember talking with some developers at MIX:UK last year and again, very briefly with Promit (re: SlimDX). Struck me that there was a lot of scope for cool things if you could get WPF<->D3D integration.

Quote:You will be able to treat Direct3D content just like an image within an application, as well as use Direct3D content as textures on WPF controls
So it would seem to open the door for a .NET 3.5 + WPF + D3D based editor. Bind your native-code graphics to a WPF resource and write the UI using WPF elements and .NET code.

Whilst I doubt the other way will work (embedding WPF UI's inside of a native D3D app) it does seem like a step towards getting some decent UI tools for D3D apps.



Anyone recognize the sample on the right-most cube? I think I might've seen that somewhere before... [grin]

Quote:Note: the Direct3D integration isn't today's SP1 beta release. It will appear in the final SP1 release.
Guess we'll just have to wait then [headshake]
0 likes 4 comments

Comments

sirob
They also mention extensible shader support for WPF controls. The few samples look very exciting, though I havn't looked further into it. I also think that's already in the beta, though I'm too scared to install it.
May 13, 2008 12:40 PM
jollyjeffers
I missed the mention of extensible shader support. That could definitely be quite handy [grin]
May 14, 2008 06:15 AM
remigius
Quote:Whilst I doubt the other way will work (embedding WPF UI's inside of a native D3D app) it does seem like a step towards getting some decent UI tools for D3D apps.


It's cool and all we get to use D3D surfaces as WPF textures, but in the anticipated editor scenario you'd typically want to render the surface on a flat, user-facing area anyway. So there it doesn't look that much more useful than just rendering to a WinForms control. Other applications would be limited to gimmicky stuff I think, but of course maybe I'm just lacking inspiration [wink]

Anyway, if WPF is this interwoven with D3D, I don't get why it's so hard to let us copy stuff off some WPF rendertarget/control and drop that onto our D3D apps.

Quote:Anyone recognize the sample on the right-most cube? I think I might've seen that somewhere before...


Showoff Oh look, it's Muhammads Managed HDR sample [smile]
May 16, 2008 04:18 AM
Nik02
Quote:Original post by remigius

Anyway, if WPF is this interwoven with D3D, I don't get why it's so hard to let us copy stuff off some WPF rendertarget/control and drop that onto our D3D apps.


The point is that previously you had to copy the video memory back to system in order to do this (which is slow). The new API simply exposes the interfaces that make possible to direct the hardware to do the necessary texture marshalling (which is fast).

That, and they had to make sure that WPF continues to work fully in XP and Server 2003 (and Vista in non-Aero graphics mode) where it does not have all-encompassing hardware acceleration. I think they are still working to actually implement this scenario, which is why these bits are not in the current beta. However, I have no concrete info on this.

-Niko
May 20, 2008 01:29 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement