![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | WinFX/WPF performance for CAD application Hello- I am trying to understand all of this new fangled WinFX stuff and determine if it's appropriate for our next generation application. Our application is basically a schematic/CAD/graphics program where the user can place objects on the screen and then 'wire' ( kind of like Visio ) the objects together. An object can be 'opened' and more objects can be created inside of the parent. An opened object creates a new child window that is the objects 'canvas'. On screen we may be drawing 100s of objects but the entire project file might contain 1000s of objects - some might be either scrolled off screen or contained within other objects so they aren't currently visible. In the past we've used straight Win32/GDI+ for our windows and drawing. Unfortunately GDI+ never made it to hardware acceleration AFAIK and the performance wasn't ever that great. We did like some of the features - anti-aliasing, support for numerous graphics formats, gradients, etc but the speed of the GUI was never snappy enough using GDI+ After reading about WinFX/WPF for a couple of days it doesn't look like there's a new hardware accelerated drawing API that could be seen as a drop in replacement for GDI+. It appears as though you can host a avalon window inside of a WIN32 HWND but it doesn't look like a OnPaint method is exposed - I'm guessing that the expectation is that you load the objects into the canvas and let WPF do the drawing for you. Is that correct? Is WinFX/WPF suitable for a CAD application with possibly 100s ( maybe 1000s ) of objects on screen at once? All the examples show a couple of buttons and a few bouncing balls - nothing that cutting edge. Would I be better served using DirectX to do my drawing? All I'm really looking for is a hardware accelerated 2d graphics library. The other issue is C++. We've been a C++ shop for 14+ years so moving to C# will be quite a big undertaking. It looks like MS sees C#/XAML as the future but in the past they've been know to shift there focus. C++/Win32 is basically guaranteed to always be supported. Thanks for any help- John |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: WinFX/WPF performance for CAD application We think that for most new programs, managed code is the right answer, and we think over time it will be appropriate for more and more programs. That said, there's a lot of existing unmanaged code, and unmanaged is still the right answer for some problem domains, so we don't intend to drop support for our existing unmanaged APIs anytime soon. WPF 1.0 was not targeted and tuned for 3D CAD applications, so I can't honestly recommend it for 3D CAD. For 2D applications, it may or may not have the performance you need, you'll want to do some prototyping. Bear in mind that there are multiple abstraction layers you can write to in WPF, with different performance/ease-of-use trade-offs. Pablo's blog has a couple relevant articles: http://www.fernicola.org/loquitor/in...straction.html and http://www.fernicola.org/loquitor/in...hnologies.html. DirectX doesn't really have 2D drawing APIs as GDI and GDI+ people have come to think of them. You can theoretically build them on top of Direct 3D, by tessolating drawing commands into meshes of triangles, which is what WPF has done, but it's a ton of work. Then again, are you sure you need hardware accelerated 2D? GDI is hardware accelerated on Windows XP but not on Windows Vista, but we haven't seen a lot of real world applications that this made a noticeable difference. Not that it's impossible, it definitely happens especially when using things like gradients, just that rendering isn't always where the performance bottleneck is in applications. If you're using GDI today, you might want to try out Windows Vista and see if if that's the bottleneck for you. -Nick Kramer [MSFT] http://blogs.msdn.com/nickkramer This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "John Dunn" <John Dunn@discussions.microsoft.com> wrote in message news:A8E3A5C0-2157-43A1-8322-4ECB87DE4756@microsoft.com... > Hello- > > I am trying to understand all of this new fangled WinFX stuff and > determine > if it's appropriate for our next generation application. Our application > is > basically a schematic/CAD/graphics program where the user can place > objects > on the screen and then 'wire' ( kind of like Visio ) the objects together. > An > object can be 'opened' and more objects can be created inside of the > parent. > An opened object creates a new child window that is the objects 'canvas'. > On > screen we may be drawing 100s of objects but the entire project file might > contain 1000s of objects - some might be either scrolled off screen or > contained within other objects so they aren't currently visible. > > In the past we've used straight Win32/GDI+ for our windows and drawing. > Unfortunately GDI+ never made it to hardware acceleration AFAIK and the > performance wasn't ever that great. We did like some of the features - > anti-aliasing, support for numerous graphics formats, gradients, etc but > the > speed of the GUI was never snappy enough using GDI+ > > After reading about WinFX/WPF for a couple of days it doesn't look like > there's a new hardware accelerated drawing API that could be seen as a > drop > in replacement for GDI+. It appears as though you can host a avalon window > inside of a WIN32 HWND but it doesn't look like a OnPaint method is > exposed - > I'm guessing that the expectation is that you load the objects into the > canvas and let WPF do the drawing for you. Is that correct? > > Is WinFX/WPF suitable for a CAD application with possibly 100s ( maybe > 1000s > ) of objects on screen at once? All the examples show a couple of buttons > and > a few bouncing balls - nothing that cutting edge. Would I be better served > using DirectX to do my drawing? All I'm really looking for is a hardware > accelerated 2d graphics library. > > The other issue is C++. We've been a C++ shop for 14+ years so moving to > C# > will be quite a big undertaking. It looks like MS sees C#/XAML as the > future > but in the past they've been know to shift there focus. C++/Win32 is > basically guaranteed to always be supported. > > Thanks for any help- > > John |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: WinFX/WPF performance for CAD application "Nick Kramer [MSFT]" wrote: > WPF 1.0 was not targeted and tuned for 3D CAD applications, so I can't > honestly recommend it for 3D CAD. For 2D applications, it may or may not > have the performance you need, you'll want to do some prototyping. Bear in > mind that there are multiple abstraction layers you can write to in WPF, > with different performance/ease-of-use trade-offs. Pablo's blog has a > couple relevant articles: > http://www.fernicola.org/loquitor/in...straction.html > and > http://www.fernicola.org/loquitor/in...hnologies.html. Thank you. Both of these entries look helpful. > DirectX doesn't really have 2D drawing APIs as GDI and GDI+ people have come > to think of them. You can theoretically build them on top of Direct 3D, by > tessolating drawing commands into meshes of triangles, which is what WPF has > done, but it's a ton of work. Then again, are you sure you need hardware > accelerated 2D? GDI is hardware accelerated on Windows XP but not on > Windows Vista, but we haven't seen a lot of real world applications that > this made a noticeable difference. Not that it's impossible, it definitely > happens especially when using things like gradients, just that rendering > isn't always where the performance bottleneck is in applications. If you're > using GDI today, you might want to try out Windows Vista and see if if > that's the bottleneck for you. The problem is that since we use a lot of bezier curves in our drawing we really need anti-aliasing. In a quick test a pure GDI app can draw ~20,000 elipses per second. Using GDI+ with antialiasing I get about 500. Unfortunatly GDI doesn't have the features we desire. I'm a little concerned about your comment about GDI not being accelerated on Vista. Does that mean that to get good performance it will be required to use WPF or write our own DirectX graphics library ( which you said would be quite difficult )? It's unfortunate that Microsoft chose to not expose the low level drawing API. I'll look into using the Visual level and see what type of performance I can get. Is there any example of using the Visual classes from C++ being hosting inside of a Win32 HWND? Thanks- John |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: WinFX/WPF performance for CAD application WPF is suitable for a CAD application with possibly 1000s objects at once normally, unless you use lots of expensive stuff. -- Feng Yuan [MSFT] http://blogs.msdn.com/fyuan > Is WinFX/WPF suitable for a CAD application with possibly 100s ( maybe > 1000s > ) of objects on screen at once? All the examples show a couple of buttons > and > a few bouncing balls - nothing that cutting edge. Would I be better served > using DirectX to do my drawing? All I'm really looking for is a hardware > accelerated 2d graphics library. |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Use WinFX (FlowDocumentReader etc.) in non-GUI application? | P Chase | Avalon | 0 | 03-07-2008 03:11 AM |
| appdata-local-Application Data-Application Data-Application Data infinitum ad nauseum. WHY | keepout | Vista General | 15 | 09-15-2007 07:50 PM |
| Developing WinFX application under Windows XP Install Requirements | Mircea Cimpoi | Avalon | 0 | 10-15-2006 05:03 PM |
| WPF 3D Performance in WinFX Beta 2 | Mike Strobel | Avalon | 1 | 06-02-2006 03:32 PM |