Tom has the final(?) say on the matter.... Or is it? Of course its not :-) Rick has added a response including some perf and memory numbers.
I figured I should put a quick summary list together that explains some of the history behind this.
-
Tom started the discussion in November 03 with his Render Loop post where he highlights the high memory allocations that happen using the .DoEvents method.
- He followed up the same month with Render Loop Revisited where he briefly discusses some alternatives.
- A brief mention in his Speed of Managed DirectX post points out that even though the samples use .DoEvents they still run with similar framerates as the unmanaged samples
- Jump forward to June 2004 with Renderloop re-Revisited where he talks about the change in the summer 04 framework to use PInvoke and not .DoEvents
- March 2005 and Rick comes up with what he considers to be the Ideal Managed render loop.
- March 2005 (again). Rick decides that there was a bug in his previous solution and posts an improved version
- May 2005. Tom puts it all together, makes some small changes and puts the result into the upcoming June SDK.
- May 2005 (again). Rick comments on Tom's final solution and adds perf and garbage collection numbers.
My opinion, and as with all free advice you get what you pay for, is that for the kind of projects most of us are working on it really doesn't matter. Pick one and go with it. The memory allocations with .DoEvents are high but its all going to be generation 0 garabage collected anyway, you are much more likely to screw up something in your own code that causes worse memory issues. As for the increased framerate - unless you are a computer graphics genius there are likely to be algorithmic issues to do with your rendering that will dwarf the effect that the render loop has.
分享到:
相关推荐
Managed DirectX was released with the latest version of the core DirectX libraries in DirectX9. It enables developers using the new .NET languages (i.e. C#, VB.NET, etc.) to develop rich multimedia ...
深入Managed DirectX9 ,源码链接在文档最后。
这个是C#中开发游戏的一些详细的资源深入Managed DirectX9.0,对使用C#+Managed DirectX9.0开发游戏的人非常有帮助的……欢迎下载!
Managed DirectX 9的应用说明
Managed DirectX 9.0 SDK中文文档
DirectXDirectX9 3D 快速上手(深入Managed DirectX9)9 3D 快速上手(深入Managed DirectX9)
一个职业游戏制作者关于DirectX9 的深入探讨,个性视角,印象深刻
Sams - Managed DirectX 9 Kick Start
Managed DirectX9.0中文教程 有需要的就下吧
Managed DirectX 9.0 SDK 文档中文译本 翻译内容选自官方帮助文档 pdf清晰版 极有价值
Managed Directx 9 Kick Start Graphics And Game Programming - (Source Code,C#)
managed directx sound库managed directx sound库
Device类是DirectX里的所有绘图操作所必须的。可以把这个类假想为真实的图形卡。场景里所有其他图形对象都依赖于device。
ManagedDirectX9教程事例代码
ManagedDirectX9教程
Managed DirectX +C# 开发(入门篇) 1:在整理过程中,有些内容为从网上找的资料,部分为翻译国外文章,正所谓“天下文章一大抄,就看会抄不会抄。”,如果侵犯了你的个人权益,可同我联系; 2:以前的开发环境为VS...
关于Shader技术的介绍!介绍有关固定渲染管线与着色器介绍以及各个光线的讲解部分
深入Managed_DirectX9.0 所以的源码,并且都能在VS2005内运行……