Sign in to follow this  
Tsus

How can PIX be used with WPF apps?

Recommended Posts

Tsus    1186
Hi everyone!

I’m planning a project that will require a nice UI. I’m thinking of using ribbon toolbars, which is why I probably need WPF (I know there are lightweight versions for WinForms, but I didn’t came across something that wasn’t buggy, missed important things or was slow…)
I’d like to use SlimDX (currently I only have the September 2011 release installed). So, I looked into the WPF samples of SlimDX and I got confused…

When I tried to debug any of the WPF samples (DX9 or 10 didn’t matter) PIX didn’t show up anything. The D3D area was plain white and hitting F12 had no effect. I read that some people somehow managed to get PIX to do at least something (they got crashes, though…).

[b]So my question is[/b]: Is it possible to write WPF apps that use SlimDX to render Direct3D 11 content and can be debugged in PIX?

Thanks in advance, dear people!

Share this post


Link to post
Share on other sites
Terin    192
Hope this points you in the right direction -- I'm leveraging my knowledge of WPF, but have no experience with SlimDX or PIX (I do WPF pretty extensively for work).

There are some issues with WPF applications when not running in Administrator mode -- especially when referencing other libraries. It sounds stupid, but I've had some intensive third-party 3D controls not work when not in Administrative mode, mostly because they failed impersonation, etc, in .NET. Does the process you're trying to do work in WinForms? If so, have you considered hosting a WinForms control inside WPF? ([url="http://msdn.microsoft.com/en-us/library/ms750944.aspx"]http://msdn.microsoft.com/en-us/library/ms750944.aspx[/url] -- WindowsFormHost is the key here) It plays pretty well with WPF -- haven't had any issues with it when having to use legacy controls (except for minor issues caused by the legacy controls rendering poorly to begin with).

Also, you're [b]much[/b] smarter to stick with WPF than lightweight WinForms. I've found on a variety of projects that WPF is [b]much[/b] faster than WinForms, especially when you have a graphic card. On some controls I'd written for clients, I saw increases in speed for rendering by as much as 200 - 250%. Average was about 170 - 180% faster -- never saw anything actually render slower.

Share this post


Link to post
Share on other sites
Tsus    1186
Thank you very much Terin! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

[quote name='Terin' timestamp='1330934787' post='4919390']
There are some issues with WPF applications when not running in Administrator mode -- especially when referencing other libraries. It sounds stupid, but I've had some intensive third-party 3D controls not work when not in Administrative mode, mostly because they failed impersonation, etc, in .NET.
[/quote]
The Administrator mode wasn’t the problem, but thanks for the tip. (I wouldn’t have thought of it in a million years.)

[quote name='Terin' timestamp='1330934787' post='4919390']
Does the process you're trying to do work in WinForms? If so, have you considered hosting a WinForms control inside WPF? ([url="http://msdn.microsoft.com/en-us/library/ms750944.aspx"]http://msdn.microsof...y/ms750944.aspx[/url] -- WindowsFormHost is the key here) It plays pretty well with WPF -- haven't had any issues with it when having to use legacy controls (except for minor issues caused by the legacy controls rendering poorly to begin with).
[/quote]
This sounds very promising, since I know it works with WinForms. I will definitely try that!

One feature of the framework should be, to let the 3D control be able to switch to fullscreen mode. This means, the WPF control that is currently hosting the 3D code isn’t used in that case. So, I was hoping that I could probably use PIX in full screen mode. Though, I haven’t had the time to test it yet. (This would be my fallback strategy. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img])

[quote name='Terin' timestamp='1330934787' post='4919390']
Also, you're [b]much[/b] smarter to stick with WPF than lightweight WinForms. I've found on a variety of projects that WPF is [b]much[/b] faster than WinForms, especially when you have a graphic card. On some controls I'd written for clients, I saw increases in speed for rendering by as much as 200 - 250%. Average was about 170 - 180% faster -- never saw anything actually render slower.
[/quote]
Interesting! This is very good to know. I haven’t had much the chance to familiarize myself with WPF. It’s good to approach new things. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Thanks again! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Share this post


Link to post
Share on other sites
Tsus    1186
[quote name='Dynamo_Maestro' timestamp='1331042799' post='4919767']
Tsus, did you manage to get it working?

I still get that lame error and have 'temporarily' given up on PIX, but if you got it working, please do let me know what you did [img]http://1.1.1.4/bmi/public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
[/quote]
I’ll let you know when I find a solution. I'll need PIX so I have to figure out a way. :)
Unfortunately, at the moment I barely have time to work on this project. I hope I can give it a try next week...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this