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…).
So my question is: 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!
4 replies to this topic
#1 Members - Reputation: 296
Posted 24 February 2012 - 04:41 PM
Acagamics e.V. – IGDA Student Game Development Club (University of Magdeburg, Germany)
Ad:
#2 Members - Reputation: 128
Posted 05 March 2012 - 02:06 AM
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? (http://msdn.microsof...y/ms750944.aspx -- 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 much smarter to stick with WPF than lightweight WinForms. I've found on a variety of projects that WPF is much 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.
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? (http://msdn.microsof...y/ms750944.aspx -- 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 much smarter to stick with WPF than lightweight WinForms. I've found on a variety of projects that WPF is much 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.
#3 Members - Reputation: 296
Posted 05 March 2012 - 03:33 AM
Thank you very much Terin! 
The Administrator mode wasn’t the problem, but thanks for the tip. (I wouldn’t have thought of it in a million years.)
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.
)
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. 
Thanks again!
Terin, on 05 March 2012 - 02:06 AM, said:
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.
Terin, on 05 March 2012 - 02:06 AM, said:
Does the process you're trying to do work in WinForms? If so, have you considered hosting a WinForms control inside WPF? (http://msdn.microsof...y/ms750944.aspx -- 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).
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.
Terin, on 05 March 2012 - 02:06 AM, said:
Also, you're much smarter to stick with WPF than lightweight WinForms. I've found on a variety of projects that WPF is much 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.
Thanks again!
Acagamics e.V. – IGDA Student Game Development Club (University of Magdeburg, Germany)
#5 Members - Reputation: 296
Posted 06 March 2012 - 10:19 AM
Dynamo_Maestro, on 06 March 2012 - 08:06 AM, said:
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
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
Unfortunately, at the moment I barely have time to work on this project. I hope I can give it a try next week...
Acagamics e.V. – IGDA Student Game Development Club (University of Magdeburg, Germany)


















