用户操作
[即时聊天] [发私信] [加为好友]
zhou JamesID:jameszhou
91948次访问,排名1010好友3人,关注者36
PMP & MCAD
jameszhou的文章
原创 92 篇
翻译 0 篇
转载 0 篇
评论 72 篇
James Zhou的公告
Locations of visitors to this page

最近评论
Microsoft_China_Vip:



www.soAsp.net 编程学习网 技术+ 实例应用 讲解不错。 推荐大家!

有很多 技术资料也很好!


chjttony:说多了,没什么意思啊,时间才能证明一切,等到看就有答案了
kenpusney:总感觉微软没前途...
控制帐户:很好。
找了半天什么是控制帐户,终于看到这里有说明。
不过英文看起来恼火。
aladdin:這沒有帶來什麼思想解放阿...

1. HttpContext.RewriteUrl,從2003年就開始用了。

2. M$沒事把這些並不是常常需要用到的把戲,弄得好像和藹可親,但卻常常忘記了: 1) Layering,2) Lightweight,再加上M$常常給出不正確的practice,以致於新的小朋友進公司,還得要花上很多時間把這些錯誤從他們的……
文章分类
收藏
    相册
    链接
    Old Blog - Runner on .NET
    存档
    订阅我的博客
    XML聚合  FeedSky

    原创 WPF - GDI/GDI+的末路, Direct3D的盛宴收藏

    新一篇: TFS - 安装指南 | 旧一篇: WPF - 取代GDI/GDI+ ?

    GDI/GDI+ 是什么

    GDI is the main graphics library for Windows applications today. It provides 2D graphics and text functionality, as well as limited imaging functionality. There is some level of acceleration support in graphics cards for GDI, but it is almost negligible nowadays (especially when compared to the level of investment in Direct3D acceleration).

    GDI+ was introduced around 2001 and it brought anti-aliased 2D graphics, floating point coordinates, gradients, per-pixel alpha value support, and support for multiple image formats to the Windows platform, but no hardware acceleration abstraction (all rendering is done in software). Windows Form provides managed wrappers on top of the GDI+ interfaces.

     

    GDI/GDI+的前途
     

    如果微软按下面的计划执行,那么GDI/GDI+在未来不会有什么发展,可能会逐渐淡出主流了。


    We continue to put a lot of effort in ensuring compatibility for GDI and GDI+ (and Windows as a whole I might add) for every Windows release, and both technologies will continue to be supported, but no functionality improvements are planned in these technologies for future Windows releases. Of course, we will continue to address security and customer issues; if any arise (the GDI and GDI+ development work takes place as part of the Avalon organization – we invest significant time on GDI/GDI+ work).

     

    WPF如何实现的

     

    WPF GDI/GDI+是不同技术实现。它是对DirectXmanaged封装,准确的说是Direct3D,所有2D的表现也都是通过其实现。由于Direct3D是基于硬件的Native API,而WPFmanaged code,因此WPF存在managed codenative资源的交互开销。这一点很象GDI+是对native GDI的封装,同样存在类似开销。因此,对于性能要求甚高的3D游戏,直接使用DirectX要比WPF 在性能表现上要强。

     

    Windows Presentation Foundation does not depend on either GDI or GDI+ for its rendering (GDI, GDI+, and WPF coexist side by side). The mainstream scenario has Windows Presentation Foundation doing all its rendering through Direct3D, for all primitives (2D, text, imaging, video, and of course 3D), through Direct3D’s native interface (the managed/native transition takes place within the Windows Presentation Foundation stack, as the bulk of WPF was written in managed code).

     

     

    正由于WPF依赖于Direct3D,因此它的图形的表现依赖于硬件显卡。如果,硬件本身不支持一些图形特效的硬实现,那么会不会对WPF编程带来复杂性,代码中还需要判断硬件是否适用?

     

    不必担心,既然是对Direct3D的一种更高层次的封装,开发人员可以不必考虑硬件:硬实现不支持(GPU的工作),那么会有软实现(CPU的工作)

     

    Windows Presentation Foundation takes advantage of hardware rendering as appropriate. It uses Direct3D to provide accelerated rendering on DirectX 7 or above, with further optimization for graphics cards with DirectX 9 and Pixel Shader 2.0 hardware. For machines without these capabilities, Windows Presentation Foundation uses software rendering, a CPU-based, SSE and SSE2 optimized rasterizer. This is also used when Windows Presentation Foundation is unable to render something using the hardware pipeline, and guarantees that rendering output is available across all machine hardware configurations.

    As a result, Windows Presentation Foundation has both hardware and software pipelines, both with difference performance characteristics. This could make application performance very difficult to predict, since there are two code paths. In practice, hardware is reliably faster; for a given application, it's simply a matter of setting a minimum requirement. Windows Presentation Foundation supports simple runtime hardware detection and allows you to dynamically tailor your application for the platform it's running on using resource dictionaries.

     

    Will Windows Presentation Foundation require a certain level of video card?

     

    Windows Presentation Foundation will take advantage of the latest graphics cards, but it can also use software emulation if a system doesn't have a supported video card.

     

    软实现是需要耗费更多的CPU资源,因此硬件对于WPF在性能方面的表现有很大影响。那么发挥WPF价值的硬件有什么要求?

     

          What graphics card should I use for Windows Presentation Foundation?

    Any high performance DX9 Pixel Shader 2.0 card will give good results. The fastest PS 2.0 card with the most memory your bank account can afford is the ticket.

     

    若干年前上演过 Win+Intel的神话,今天一场WPF+显卡硬件厂商的盛宴又要开始了。

     引用:

    http://www.fernicola.org/loquitor/index.php?/archives/4-Windows-Presentation-Foundation-Graphics-Under-the-Hood.html

    http://msdn2.microsoft.com/en-us/library/aa480221.aspx

     

    发表于 @ 2007年08月10日 18:02:00|评论(loading...)|编辑

    新一篇: TFS - 安装指南 | 旧一篇: WPF - 取代GDI/GDI+ ?

    评论

    #man 发表于2007-08-11 20:38:25  IP: 61.232.0.*
    I think so, MS won't put more effort in GDI/GDI+.At present, GDI+ takes long time to refresh graphics, and MS hasn't improve the performance any more, so many RDs have to take more time to find a good way to fix this issue.
    #program 发表于2007-08-14 11:15:12  IP: 60.178.242.*
    wpf的速度并不理想
    #zjh222 发表于2007-08-14 19:41:10  IP: 222.212.157.*
    好可怕,新一场软硬配合的垄断开始了
    #在线代理 发表于2007-08-16 23:30:17  IP: 222.172.138.*
    MX440的显卡 在wpf下面简直就是 只能当烧火棍用了。
    发表评论  


    当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
    Csdn Blog version 3.1a
    Copyright © James Zhou