﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Ogre</title><link>http://www.cppblog.com/windeer/</link><description>        ——静下心，坐坐……</description><language>zh-cn</language><lastBuildDate>Sat, 11 Apr 2026 09:22:20 GMT</lastBuildDate><pubDate>Sat, 11 Apr 2026 09:22:20 GMT</pubDate><ttl>60</ttl><item><title>VS2010添加类失败问题,弹出错误框,提示 CodeModel操作失败，可以无法访问标记数据库</title><link>http://www.cppblog.com/windeer/archive/2012/09/24/191776.html</link><dc:creator>alpha</dc:creator><author>alpha</author><pubDate>Mon, 24 Sep 2012 00:50:00 GMT</pubDate><guid>http://www.cppblog.com/windeer/archive/2012/09/24/191776.html</guid><wfw:comment>http://www.cppblog.com/windeer/comments/191776.html</wfw:comment><comments>http://www.cppblog.com/windeer/archive/2012/09/24/191776.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/windeer/comments/commentRss/191776.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/windeer/services/trackbacks/191776.html</trackback:ping><description><![CDATA[<div>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;前几天，我在使用VS2010添加类的时候，会弹出一个错误框,提示&nbsp;CodeModel操作失败，可以无法访问标记数据库 英文版是&nbsp;CodeModel operation failed,Possibly cannt access Tag database. 添加类很是麻烦。<br />&nbsp; &nbsp; &nbsp; 后来到网上搜索了下，终于在 一个论坛找到了解决方法，记录在这里备忘。<br /><br />&nbsp; &nbsp; &nbsp; 解决方法: 1.删除解决方案所在文件中的*.sdf文件<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2.删除解决方案目录中Ipch下的文件<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3.重新打开解决方案，VS会重新创建类向导。然后就可以正常添加类了。<br /><br />&nbsp; &nbsp;<br /></div><img src ="http://www.cppblog.com/windeer/aggbug/191776.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/windeer/" target="_blank">alpha</a> 2012-09-24 08:50 <a href="http://www.cppblog.com/windeer/archive/2012/09/24/191776.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>D3D纹理混合方式</title><link>http://www.cppblog.com/windeer/archive/2010/03/26/110579.html</link><dc:creator>alpha</dc:creator><author>alpha</author><pubDate>Fri, 26 Mar 2010 04:06:00 GMT</pubDate><guid>http://www.cppblog.com/windeer/archive/2010/03/26/110579.html</guid><wfw:comment>http://www.cppblog.com/windeer/comments/110579.html</wfw:comment><comments>http://www.cppblog.com/windeer/archive/2010/03/26/110579.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/windeer/comments/commentRss/110579.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/windeer/services/trackbacks/110579.html</trackback:ping><description><![CDATA[<p>D3D纹理混合方式：</p>
<p>摘自: <a  href="http://blog.readnovel.com/article/htm/tid_1066443.html">http://blog.readnovel.com/article/htm/tid_1066443.html</a><br>D3DTOP_DISABLE:
禁用纹理层颜色输出.<br>D3DTOP_SELECTARG1:将该纹理层的第一个混合参数直接输出.对于D3DTSS_COLOROP,则输出由
D3DTSS_COLORARG1指定的第一个表示RGB的参数;对于D3DTSS_ALPHAOP,则输出由D3DTSS_ALPHAARG1指定的第
一个表示ALPHA的参数.<br>D3DTOP_SELECTARG2:同上.<br>D3DTOP_MODULATE:将两个混合参数相乘后输出.<br>D3DTOP_MODULATE2X:
将两个混合参数相乘后再乘以2输出.<br>D3DTOP_MODULATE4X:将两上混合参数相乘后再乘以4输出.<br>D3DTOP_ADD:将
两上混合参数相加后输出.<br>D3DTOP_ADDSIGNED:将两个混合参数相加后减去0.5输出.(可以这样理解:本来范围在[0,1]里,减
0.5使其范围限制在[-0.5,
0.5]中.这样相加后,比较暗的部分,即负数部分,将对原来的纹理产生衰减,而较亮部分则对原来的纹理增强.可用作细节纹理.如果有的显卡不支持
D3DTOP_ADDSIGNED方式,可考虑采用D3DTOP_MODULATE2X来模拟这种效果).<br>D3DTOP_ADDSIGNED2X:
同上,结果再乘以2输出.<br>D3DTOP_SUBTRACT:将两个混合参数相减后输出.<br>D3DTOP_ADDSMOOTH:将两个混合参
数的和减去两个混合参数的积.</p>
<p>D3DTSS_COLORARG1 与 D3DTSS_COLORARG2 可以指定的纹理混合参数:<br>D3DTA_CURRENT:前一个
纹理层的输出颜色.如果在第0层,则为漫反射颜色.<br>D3DTA_DIFFUSE:像素的漫反射颜色值.这种颜色是在使用GOURAUD着色模式时
对顶点的漫反射颜色插值得到的.<br>D3DTA_TEXTURE:当前纹理的颜色值.<br>D3DTA_TFACTOR:参数值为
SetRenderState()通过D3DRS_TEXTURE_EFACTOR设置的系数值.<br>D3DTA_SPECULAR:参数值为像素的
镜面反射颜色值.这种颜色是在使用高洛德着色模色时对顶点的镜面反射颜色插值得到的.<br>D3DTA_SELECTMASK:该状态在设置纹理参数时
不起作用.<br>D3DTA_TEMP:参数值存储在一个临时寄存器中.<br>D3DTA_CONSTANT:参数值为一个常数值.<br>D3DTA_COMPLEMENT:
该参数必须与以上任意一个参数同时设置(或操作?),表示用一减去原参数.<br>D3DTA_ALPHAREPLICATE:该参数必须与以上除了
D3DTA_COMPLEMENT之外的任一参数同时设置,表示将原参数的ALPHA值复制到R,G,B中. <br></p><img src ="http://www.cppblog.com/windeer/aggbug/110579.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/windeer/" target="_blank">alpha</a> 2010-03-26 12:06 <a href="http://www.cppblog.com/windeer/archive/2010/03/26/110579.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【设计模式】最简单常用的一种设计模式－－singleton（单件）</title><link>http://www.cppblog.com/windeer/archive/2009/03/29/78278.html</link><dc:creator>alpha</dc:creator><author>alpha</author><pubDate>Sun, 29 Mar 2009 09:27:00 GMT</pubDate><guid>http://www.cppblog.com/windeer/archive/2009/03/29/78278.html</guid><wfw:comment>http://www.cppblog.com/windeer/comments/78278.html</wfw:comment><comments>http://www.cppblog.com/windeer/archive/2009/03/29/78278.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/windeer/comments/commentRss/78278.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/windeer/services/trackbacks/78278.html</trackback:ping><description><![CDATA[<div class=tpc_content>
<div class=c id=p_tpc></div>
<div class=f14 id=read_tpc><font size=4><span style="COLOR: #ff0000">这是一篇论文，文章比较长，感兴趣的可以只看其中的部分内容。</span></font><br><br>＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝<br><br><br>摘&nbsp; 要 本文提出了三种Singleton模式的实现方式，并做了对比分析。<br>关键字 设计模式，Singleton<br>&nbsp; &nbsp; Singleton（单件）模式是一种很常用的设计模式。《Design Patterns》对它作的定义为：Ensure a class only has one instance, and provide a global point of access to it. 也就是说单件类在整个应用程序的生命周期中只能有一个实例存在，使用者通过一个全局的访问点来访问该实例。这是Singleton的两个最基本的特征，也是在实现的时候首先应该考虑的。Singleton的应用很广，它可以典型的被用来表示那些本性上具有唯一特性的系统组件，如数据库访问组件等。这一点在《Design Patterns》上有详细说明，在此就不细说了。<br><br>实现Singleton有很多途径，但都离不开两条最基本的原则。首先，要使得Singleton只有一个全局唯一的实例，我们通常的做法是将它的构造函数和拷贝构造函数私有化。再者，Singleton的全局唯一实例通常是一个static变量，这一点利用了语言的内在优势。本文给出的几种实现都比较简单，容易理解。在通常的情况下，它们足以满足要求。但缺点也是不可避免，以下我们逐一分析。 <br><br>一、基于模板函数的实现 <br><br>先看实现代码：<br><br>class MySingleton1<br><br>{<br><br>private:<br><br>&nbsp; &nbsp; MySingleton1(){ cout &lt;&lt; _T("Construct MySingleton1") &lt;&lt; endl; }<br><br>&nbsp; &nbsp; MySingleton1(const MySingleton1&amp;){} //拷贝构造函数<br><br>MySingleton1 &amp; operator =(const MySingleton1&amp;){} //赋值函数<br><br>&nbsp; &nbsp; template &lt;typename T&gt;<br><br>&nbsp; &nbsp; friend T&amp; GetInstanceRef();<br><br><br><br>public:<br><br>&nbsp; &nbsp; ~MySingleton1(){ cout &lt;&lt; _T("Destroy MySingleton1") &lt;&lt; endl; }<br><br><br><br>public:<br><br>&nbsp; &nbsp; void DoSomething(){ cout &lt;&lt; _T("Do something here in MySingleton1") &lt;&lt; endl; }<br><br>};<br><br>template &lt;typename T&gt;<br><br>T&amp; GetInstanceRef() //返回全局唯一对象的一个引用<br><br>{<br><br>&nbsp; &nbsp; static T _instance;<br><br>&nbsp; &nbsp; return _instance;<br><br>}<br><br>template &lt;typename T&gt;<br><br>T* GetInstancePtr() //返回全局唯一对象的指针<br><br>{<br><br>&nbsp; &nbsp; return &amp;GetInstanceRef&lt;T&gt;();<br><br>}<br><br>上面的代码中，MySingleton1是需要单实例化的类。下面的模板函数template &lt;typename T&gt; T&amp; GetInstanceRef()返回该类的唯一实例（静态变量_instance）的一个引用，另一个模板函数调用它返回该实例的指针。我们可以注意到以下几点：<br><br>1．&nbsp; &nbsp; MySingleton1的构造函数私有，防止了程序员随意构造它的实例。<br><br>2．&nbsp; &nbsp; 同样，拷贝构造函数MySingleton1(const MySingleton1&amp;)也被声明为私有。<br><br>3．&nbsp; &nbsp; 全局的模板函数template &lt;typename T&gt; T&amp; GetInstanceRef()是MySingleton1的友元。因为MySingleton1的构造函数已经声明为私有，为了让GetInstanceRef能顺利的构造静态变量_instance，我们不得不将它声明为MySingleton1的友元函数。<br><br><br><br>这样，我们的类MySingleton1就具有了Singleton特性了，而全局访问点就是两个模板函数。测试代码如下：<br><br>MySingleton1* myobj1;<br><br>myobj1 = GetInstancePtr&lt;MySingleton1&gt;();<br><br>myobj1-&gt;DoSomething();<br><br>GetInstanceRef&lt;MySingleton1&gt;().DoSomething();<br><br>&nbsp; &nbsp; 下面我们分析这种实现的缺点。由于模板函数GetInstanceRef被特化后要访问MySingleton1，它的声明必须在类（MySingleton1）声明之后（区分声明与实现），这与我们通常的使用方式不合。虽然它在其它方面表现的比较良好，但就这一个缺点已经使我不会再想使用它了。来看第二种可以实际使用的实现。<br><br><br><br>二、基于模板类的实现<br><br><br><br>&nbsp; &nbsp; 这种实现的基本思路是，做一个类让它来负责提供Singleton对象的生成与访问。由于它要构造Singleton对象，所以让它成为一个友元是理所当然的。下面看看实现代码：<br><br>template &lt;typename T&gt;<br><br>class SingletonWraper<br><br>{<br><br>public:<br><br>static T&amp; GetInstanceRef()<br><br>{<br><br>&nbsp; &nbsp; static T _instance;<br><br>&nbsp; &nbsp; return _instance;<br><br>}<br><br>static const T&amp; GetInstanceConst()<br><br>{<br><br>&nbsp; &nbsp; return GetInstanceRef();<br><br>}&nbsp; &nbsp; &nbsp; <br><br>static T* GetInstancePtr()<br><br>{<br><br>&nbsp; &nbsp; return &amp;GetInstanceRef();<br><br>}<br><br>};<br><br>#define DEFINE_SINGLETON(ClassName); \<br><br>public: \<br><br>friend class SingletonWraper&lt;ClassName&gt;; \<br><br>typedef class SingletonWraper&lt;ClassName&gt; SingletonWraper; \<br><br>typedef SingletonWraper SingletonInterface; \<br><br>private: \<br><br>ClassName(const ClassName&amp;){} \<br><br>ClassName&amp; operator=(const ClassName&amp;) \<br><br>{ \<br><br>&nbsp; &nbsp; return SingletonInterface::GetInstanceRef(); \<br><br>} \<br><br>private: //End of define DEFINE_SINGLETON(ClassName);<br><br>class MySingleton2<br><br>{<br><br>DEFINE_SINGLETON(MySingleton2);<br><br>private:<br><br>MySingleton2(){ cout &lt;&lt; _T("Construct MySingleton2") &lt;&lt; endl; }<br><br><br><br>public:<br><br>~MySingleton2(){ cout &lt;&lt; _T("Destroy MySingleton2") &lt;&lt; endl; }<br><br><br><br>public:<br><br>void DoSomething(){ cout &lt;&lt; _T("Do something here in MySingleton2") &lt;&lt; endl; }<br><br>};<br><br>&nbsp; &nbsp; 先看看SingletonWraper类，它提供的三个静态函数用于取得对Singleton对象的访问。再看下面的一个宏，它的作用是声明友元以及定义两个Singleton对象的访问点（SingletonWraper和SingletonInterface），并且，它还重载了拷贝构造函数以使访问的Singleton对象永远都是由GetInstanceRef惰性生成的一个实例。我们可以看见，使用这个SingletonWraper来包装Singleton类已经变得很简单了。我们只需要在需要Singleton化的类里面声明一条语句DEFINE_SINGLETON(MySingleton2);就可以了。但这还是有一些前提的，如构造函数（包括拷贝构造函数）私有以及析构函数公有。测试代码如下：<br><br>&nbsp; &nbsp; MySingleton2* myobj2;<br><br>&nbsp; &nbsp; myobj2 = SingletonWraper&lt;MySingleton2&gt;::GetInstancePtr();<br><br>&nbsp; &nbsp; myobj2-&gt;DoSomething();<br><br>&nbsp; &nbsp; MySingleton2::SingletonInterface::GetInstanceRef().DoSomething();<br><br><br><br>三、基于自身静态成员函数的实现<br><br><br><br>&nbsp; &nbsp; 这个实现不比前面的实现复杂，相反，更简单了。思路是从要实现Singleton的类自身入手，实现它的静态成员函数来提供全局的实例访问。这个实例的构造也是发生在它内部的一个静态成员函数里，所以，我们不用再使用友元来提供额外的访问权限。并且，我们也没有再使用任何模板。代码如下：<br><br>#define DECLARE_SINGLETON(ClassName); \<br><br>public: \<br><br>static ClassName&amp; GetInstanceRef() \<br><br>{ \<br><br>&nbsp; &nbsp; static ClassName _instance; \<br><br>&nbsp; &nbsp; return _instance; \<br><br>} \<br><br>static const ClassName&amp; GetInstanceConst() \<br><br>{ \<br><br>&nbsp; &nbsp; return GetInstanceRef(); \<br><br>} \<br><br>static ClassName* GetInstancePtr() \<br><br>{ \<br><br>&nbsp; &nbsp; return &amp;GetInstanceRef(); \<br><br>} \<br><br>private: \<br><br>ClassName(const ClassName&amp;){} \<br><br>ClassName&amp; operator=(const ClassName&amp;) \<br><br>{ \<br><br>&nbsp; &nbsp; return GetInstanceRef(); \<br><br>} \<br><br>private: \<br><br>static void operator delete(void *p, size_t n) \<br><br>{ \<br><br>&nbsp; &nbsp; ; /* 嘿嘿，什么都不要做.<br><br>&nbsp; &nbsp; &nbsp; &nbsp; 但要注意，析构函数已经执行。<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 但对象并没有真正从内存卸载掉。*/ \<br><br>}//End of define DECLARE_SINGLETON(ClassName);<br><br><br><br>class MySingleton3<br><br>{<br><br>DECLARE_SINGLETON(MySingleton3);<br><br><br><br>private:<br><br>MySingleton3(){ cout &lt;&lt; _T("Construct MySingleton3") &lt;&lt; endl; }<br><br><br><br>public:<br><br>~MySingleton3(){ cout &lt;&lt; _T("Destroy MySingleton3") &lt;&lt; endl; }<br><br><br><br>public:<br><br>void DoSomething(){ cout &lt;&lt; _T("Do something here in MySingleton3") &lt;&lt; endl; }<br><br>};<br><br>实现Singleton的代码就一个宏定义而已，而使用它来使一个类拥有Singleton属性也只是调用一下这条宏。从使用上来看它应该是最简单的，看看下面的测试代码：<br><br>MySingleton3 *myobj3 = MySingleton3::GetInstancePtr();<br><br>myobj3-&gt;DoSomething();<br><br>delete myobj3;<br><br>MySingleton3::GetInstanceRef().DoSomething();<br><br>对比这里的测试代码和上一个的，可以发现，在使用过程中，这种方式也是最简单的。前面的三种方式都是在栈空间中创建对象，对象的销毁是在作用域边界上。细心的读者可能已经发现问题了。如果我们得到对象的指针后把它给delete了，则肯定就出问题了。对第一二种实现，我们没有重载delete操作符，delete之后指针将不再可用。而对第三种实现，我们有delete的重载函数，它阻止了对象的真正卸载。但在执行delete函数之前，析构函数已经执行了，因为全局的delete操作首先调用的是类的析构函数，再调用类的delete重载操作符函数。汇编代码清楚的显示了这一点：<br><br>MySingleton3::`scalar deleting destructor':<br><br>00412270&nbsp; push&nbsp; &nbsp; &nbsp; &nbsp; ebp<br><br>&#8230;&#8230;<br><br>0041228D&nbsp; mov&nbsp; &nbsp; &nbsp; &nbsp; ecx,dword ptr [ebp-4]<br><br>00412290&nbsp; call&nbsp; &nbsp; &nbsp; &nbsp; @ILT+175(MySingleton3::~MySingleton3) (004010b4)<br><br>00412295&nbsp; mov&nbsp; &nbsp; &nbsp; &nbsp; eax,dword ptr [ebp+8]<br><br>00412298&nbsp; and&nbsp; &nbsp; &nbsp; &nbsp; eax,1<br><br>0041229B&nbsp; test&nbsp; &nbsp; &nbsp; &nbsp; eax,eax<br><br>0041229D&nbsp; je&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MySingleton3::`scalar deleting destructor'+3Dh (004122ad)<br><br>0041229F&nbsp; push&nbsp; &nbsp; &nbsp; &nbsp; 4<br><br>004122A1&nbsp; mov&nbsp; &nbsp; &nbsp; &nbsp; ecx,dword ptr [ebp-4]<br><br>004122A4&nbsp; push&nbsp; &nbsp; &nbsp; &nbsp; ecx<br><br>004122A5&nbsp; call&nbsp; &nbsp; &nbsp; &nbsp; @ILT+70(MySingleton3::operator delete) (0040104b)<br><br>004122AA&nbsp; add&nbsp; &nbsp; &nbsp; &nbsp; esp,8<br><br>&#8230;&#8230;<br><br>前面的三个实现中Singleton的全局唯一对象是自动创建(惰性初始化)并自动销毁（在作用域边界上），而程序员非要执行delete操作的话将是错误的，这好比我们在程序中执行如下一段代码。<br><br>int i(0);<br><br>int* p = &amp;i;<br><br>delete p;<br><br>很显然，这是不被允许的。对这一点最好的处理方式是在delete的时候抛出一个异常，因为我们不允许程序员在这里使用delete操作。考虑下面的代码：<br><br>static void operator delete(void *p, size_t n) \<br><br>{ throw &#8211;1; }<br><br>相应的测试代码改为：<br><br>try { delete myobj3; /*试着卸载对象*/ }<br><br>catch(...) { cout &lt;&lt; _T("Your object cannot be deleted.") &lt;&lt; endl; /*失败*/ }<br><br><br><br>四、《Design Patterns》上的实现及其改进<br><br>&nbsp; &nbsp; 在《Design Patterns ---Elements of Reusable Object-Oriented Software》(英文版)第127页讨论Singleton模式时也给出了一个实现，但它存在一个严重的缺陷：没有考虑对象的销毁。以下是它给出的Sample代码：<br><br>class MazeFactory {<br><br>public:<br><br>static MazeFactory* Instance();<br><br><br><br>//existing interface goes here<br><br>protected:<br><br>MazeFactory();<br><br>private:<br><br>static MazeFactory* _instance;<br><br>};<br><br><br><br>MazeFactory* MazeFactory::_instance = 0;<br><br><br><br>MazeFactory* MazeFactory::Instance() {<br><br>if (_instance == 0) {<br><br>&nbsp; &nbsp; _instance = new MazeFactory;<br><br>}<br><br>return _instance;<br><br>}<br><br>&nbsp; &nbsp; 先分析一下它的实现策略。首先是构造函数访问受限（protected），然后声明了一个静态的对象指针，该指针的初始化（或者说该类的实例化）是在静态成员函数Instance里面。这里它并没有相应的对象卸载代码，然而在自由存储空间（堆空间）里生成的对象是不会自动卸载的。所以，经过改进，我得到了下面的代码。<br><br>class MySingleton4<br><br>{<br><br>private:<br><br>MySingleton4(){ cout &lt;&lt; _T("Construct MySingleton4") &lt;&lt; endl; } //构造函数私有&nbsp; &nbsp; ~MySingleton4(){ cout &lt;&lt; _T("Destroy MySingleton4") &lt;&lt; endl; } //析构函数放哪里都可以了<br><br>static MySingleton4* _instance;<br><br><br><br>public:<br><br>static MySingleton4&amp; GetInstanceRef()<br><br>{<br><br>&nbsp; &nbsp; if (_instance == 0)<br><br>&nbsp; &nbsp; &nbsp; &nbsp; _instance = new MySingleton4;<br><br>&nbsp; &nbsp; return *_instance;<br><br>}<br><br>static MySingleton4* GetInstancePtr()<br><br>{<br><br>&nbsp; &nbsp; return &amp;GetInstanceRef();<br><br>}<br><br>static ReleaseInstance()<br><br>{<br><br>&nbsp; &nbsp; if (_instance != 0)<br><br>&nbsp; &nbsp; {<br><br>&nbsp; &nbsp; &nbsp; &nbsp; delete _instance;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; _instance = 0;<br><br>&nbsp; &nbsp; }<br><br>}<br>public:<br><br>void DoSomething(){ cout &lt;&lt; _T("Do something here in MySingleton4") &lt;&lt; endl; }<br><br>};<br><br>MySingleton4* MySingleton4::_instance = 0; //Singleton对象初始化<br><br>static class DestructHelper //用于卸载MySingleton4对象的辅助类<br><br>{<br><br>public:<br><br>~DestructHelper(){ MySingleton4::ReleaseInstance(); }<br><br>} DestructHelperInstance; //辅助类静态实例<br><br>代码唯一的改进是增加了释放对象的静态函数ReleaseInstance。注意，在这个函数中_instance != 0判断以及后来的_instance = 0都是必不可少的，因为函数ReleaseInstance可能会被重复调用。将指针所指向的对象卸载后将指针置为0是一种非常好的编程习惯，它可以避免&#8220;野指针&#8221;的出现，而这通常是很危险的。接下来的类DestructHelper是用来辅助卸载MySingleton4的Singleton对象的，我们在它的公有析构函数里调用MySingleton4::ReleaseInstance()静态函数来完成工作。而DestructHelper的一个全局静态实例DestructHelperInstance会在适当的时候卸载掉，这就保证了析构函数~DestructHelper()得以被调用，从而卸载掉MySingleton4的Singleton对象。使用的时候，我们可以调用ReleaseInstance（）手动的卸载掉对象，然后再调用GetInstanceRef（）获得一个新的对象。如果我们不希望这样做，那么DestructHelperInstance的析构将保证堆空间里的对象得以被自动卸载。这样的处理方式增加了更多的灵活性。<br><br>但是，缺点还是有的。最主要的遗憾在于代码的重用上。第一、二种实现方式是基于模板技术的，代码可以很方便的重用，第三种方式虽然没有使用模板技术，但宏定义的使用也可以很好的保证代码的简单重用。最后的这种实现方式在代码重用上就显得稍微难了一点。我能想到的最佳解决办法仍然是使用宏（虽然我本人也很反对在C++里使用宏），一个用于定义MySingleton4类内部的处理，一个用于生成一个卸载辅助类的静态实例。第二个宏与模板有异曲同工的味道，不过，它还生成了一个与类型相关的静态变量。具体代码请见源程序清单。 <br><br>五、结束语 <br><br>本文全部代码在VC6.0里全部通过。<br><br>本文提出的只是作者写的几个比较简单的实现方式，但已经能满足大多数应用的需要了。更复杂的实现请参考<a id=url_1298 onclick="return checkUrl(this)" href="http://www.hoversoft.net/devinfo/0205doc/20Singleton/index.htm" target=_blank><font color=#0070af>http://www.hoversoft.net/devinfo/0205doc/20Singleton/index.htm</font></a>。本文作者&#8220;油箱&#8221;：<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#118;&#99;&#118;&#98;&#106;&#97;&#118;&#97;&#64;&#121;&#97;&#104;&#111;&#111;&#46;&#99;&#111;&#109;"><font color=#0070af>vcvbjava@yahoo.com</font></a>。欢迎大家讨论，以求共同进步。</div>
</div><img src ="http://www.cppblog.com/windeer/aggbug/78278.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/windeer/" target="_blank">alpha</a> 2009-03-29 17:27 <a href="http://www.cppblog.com/windeer/archive/2009/03/29/78278.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于3D的一些重要链接</title><link>http://www.cppblog.com/windeer/archive/2006/02/17/3301.html</link><dc:creator>alpha</dc:creator><author>alpha</author><pubDate>Fri, 17 Feb 2006 01:06:00 GMT</pubDate><guid>http://www.cppblog.com/windeer/archive/2006/02/17/3301.html</guid><wfw:comment>http://www.cppblog.com/windeer/comments/3301.html</wfw:comment><comments>http://www.cppblog.com/windeer/archive/2006/02/17/3301.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/windeer/comments/commentRss/3301.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/windeer/services/trackbacks/3301.html</trackback:ping><description><![CDATA[<H2><SPAN style="FONT-SIZE: 12pt"><SPAN style="FONT-FAMILY: Arial"><A href="http://www.gamedev.net/">http://www.gamedev.net/</A><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></H2>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-FAMILY: Arial">Provides news and views, articles, job offers, and more, all related to game development</SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.gametutorials.com/">http://www.gametutorials.com/</A><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-FAMILY: Arial">Tutorials for C, C++, Win32 API, DirectX, OpenGL, networking, and game development</SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.libsdl.org/index.php">http://www.libsdl.org/index.php</A><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><STRONG><SPAN style="FONT-WEIGHT: normal; COLOR: #414141; FONT-FAMILY: Arial; mso-bidi-font-weight: bold">“Simple <SPAN class=SpellE>DirectMedia</SPAN> Layer is a cross-platform multimedia library designed to provide level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video <SPAN class=SpellE>framebuffer</SPAN>. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of ‘Civilization: Call <SPAN class=GramE>To</SPAN> Power.’”</SPAN></STRONG><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></B></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.gamasutra.com/">http://www.gamasutra.com/</A><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-FAMILY: Arial">Articles from Game Developer magazine, news of the game industry (requires setting up a free <SPAN class=SpellE>userid</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Showcard Gothic'; mso-bidi-font-family: Arial">Organizations and Conferences<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.igda.org/">http://www.igda.org/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Organization for game developers…membership is $100/year, $35/year for students, and includes <B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal">Game Developer</I></B> magazine<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.gamanetwork.com/">http://www.gamanetwork.com/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Parent organization for <SPAN class=SpellE>Gamasutra</SPAN> Online, Game Developer magazine, and the game developer’s conference<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.gdconf.com/">http://www.gdconf.com/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Annual game developer’s conference<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.igf.com/">http://www.igf.com/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Independent Games Festival…contest for independent game developers, and a student showcase to highlight work of high school and college game developers<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.garagegames.com/">http://www.garagegames.com/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Home of independent games and game makers<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Showcard Gothic'; mso-bidi-font-family: Arial">3D Graphics Libraries<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.microsoft.com/windows/directx/default.aspx">http://www.microsoft.com/windows/directx/default.aspx</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Microsoft DirectX information site<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.opengl.org/">http://www.opengl.org/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">OpenGL information site (code samples, tutorials, etc)<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.xmission.com/~nate/opengl.html">http://www.xmission.com/~nate/opengl.html</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN class=SpellE><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Nate</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"> Robins OpenGL site, containing precompiled GLUT for Windows, tutorials, etc<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.mathies.com/cpw/about.html">http://www.mathies.com/cpw/about.html</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Free GLUT API replacement for game programming<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://hem.passagen.se/opengl/glfw/">http://hem.passagen.se/opengl/glfw/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Another GLUT replacement OpenGL framework for Windows and Unix/X11<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Showcard Gothic'; mso-bidi-font-family: Arial">3D Graphics Engines<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://cg.cs.tu-berlin.de/~ki/game_eng.html">http://cg.cs.tu-berlin.de/~ki/game_eng.html</A><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">3D engines list, last updated </SPAN><?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:date style="BACKGROUND-POSITION: left bottom; BACKGROUND-IMAGE: url(res://ietag.dll/#34/#1001); BACKGROUND-REPEAT: repeat-x" Year="2000" Day="23" Month="6"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">6/23/2000</SPAN></st1:date><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">…lists 643 engines<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="COLOR: green; FONT-FAMILY: Arial"><A href="http://www.cs.tu-berlin.de/~ki/game_eng.html">www.cs.tu-berlin.de/~ki/game_eng.html</A><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Commercial 3D game engines list, last updated </SPAN><st1:date style="BACKGROUND-POSITION: left bottom; BACKGROUND-IMAGE: url(res://ietag.dll/#34/#1001); BACKGROUND-REPEAT: repeat-x" Year="1997" Day="16" Month="5"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">5/16/97</SPAN></st1:date><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.slamsoftware.com/">http://www.slamsoftware.com/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Amp 2 game engine…licenses start at $200<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.c4engine.com/">http://www.c4engine.com/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Graphics license, $3000, sound license $2000, network license $2000<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.ca3d-engine.de/">http://www.ca3d-engine.de/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Free for free <SPAN class=SpellE>mods</SPAN>, need to negotiate a license for commercial use<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://crystal.sourceforge.net/">http://crystal.sourceforge.net/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Free game development kit in C++…multiplatform, using OpenGL<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.exocortex.org/3dengine/">http://www.exocortex.org/3dengine/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Graphics engine using OpenGL and C# that started as a class project…includes support for Cg <SPAN class=SpellE>shader</SPAN> programming<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.fly3d.com.br/">http://www.fly3d.com.br/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">The Fly3D libraries (v1 and v2) from the 3D Games books by Watt and <SPAN class=SpellE>Policarpo</SPAN>…Fly3D v1.02 is free for commercial and noncommercial use, while Fly3D v2 is available for free under the GPL if the resulting game is also GPL, or for a fee for a single game use without royalties<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.wirewd.com/wh/glvr.html">http://www.wirewd.com/wh/glvr.html</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">GLVR library for entertainment VR, in particular games, written in C++<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.hyzgame.com/English/index.htm">http://www.hyzgame.com/English/index.htm</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">2D/3D game library from </SPAN><st1:country-region><st1:place><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">China</SPAN></st1:place></st1:country-region><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.panardvision.com/v3/pv_overview.php">http://www.panardvision.com/v3/pv_overview.php</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN class=SpellE><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Panard</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"> Vision, free for noncommercial use<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.garagegames.com/pg/product/view.php?id=1">http://www.garagegames.com/pg/product/view.php?id=1</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Torque game engine, including networking, GUI builder, world editor and scripting language…includes full source code for game engine…$100 per programmer with no royalties to use for any company with less than $500,000 in sales…the engine used in Tribes, Tribes2, <SPAN class=SpellE>Starsiege</SPAN>, etc<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.v3x.net/v3x/v3x_3d_engine.html">http://www.v3x.net/v3x/v3x_3d_engine.html</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">V3x.net engine…free for freeware or evaluation, 5000 Euros for 1 game, 15000 Euros for unlimited games<SPAN class=GramE>, ???</SPAN> <SPAN class=GramE>for</SPAN> unlimited usage with source code<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.idsoftware.com/business/home/technology/index.php">http://www.idsoftware.com/business/home/technology/index.php</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Quake engine and tools are available for free under the GPL, or for a flat fee of $10000 per title with no royalties…Quake II engine is available for free under the GPL, or for a flat fee of $10000 per title with no royalties….Quake II tools are NOT GPL, and are for noncommercial use only, or can be licensed for $5000 a project…Quake III engine is $250000 guarantee against a 5% royalty of the wholesale title price<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.magic-software.com/">http://www.magic-software.com/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Wild Magic game engine, from Dave <SPAN class=SpellE>Eberly’s</SPAN> book…free for noncommercial projects, or for commercial products that do more than just sell the game engine<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Showcard Gothic'; mso-bidi-font-family: Arial">Game information sites<o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.gamesdomain.com/indexus.html">http://www.gamesdomain.com/indexus.html</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-FAMILY: Arial"><A href="http://www.3davenue.com/">http://www.3davenue.com/</A></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoPlainText><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Showcard Gothic'; mso-bidi-font-family: Arial">Books of Interest<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Game Programming Gems</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, Mark <SPAN class=SpellE>DeLoura</SPAN>, editor, August 2000, Charles River Media, ISBN 1584500492<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Game Programming Gems 2</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, Mark <SPAN class=SpellE>DeLoura</SPAN>, editor, October 2001, Charles River Media, ISBN 1584500549<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Game Programming Gems 3</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, Dante <SPAN class=SpellE>Treglia</SPAN> and Mark <SPAN class=SpellE>DeLoura</SPAN>, editors, July 2002, Charles River Media, ISBN 1584502339<o:p></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN-LEFT: 0.5in"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">An attempt to be to game development what <B style="mso-bidi-font-weight: normal">Graphics Gems</B> is to computer graphics in general<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">AI Game Programming Wisdom</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, Steve Rabin, editor, March 2002, Charles River Media, ISBN 1584500778<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Mathematics for 3D Game Programming &amp; Computer Graphics</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, Eric <SPAN class=SpellE>Lengyel</SPAN>, December 2001, </SPAN><st1:place><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Charles River</SPAN></st1:place><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial"> Media, ISBN 1584500379<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">The Cg Tutorial: The Definitive Guide to Programmable Real-Time Graphics</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, <SPAN class=SpellE>Randima</SPAN> Fernando and Mark <SPAN class=SpellE>Kilgard</SPAN>, February 2003, Addison-Wesley, ISBN 0321194969<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Real-Time <SPAN class=SpellE>Shader</SPAN> Programming</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, Ron <SPAN class=SpellE>Fosner</SPAN>, December 2002, Morgan Kaufmann, ISBN 1558608532<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Real-Time Rendering</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, 2<SUP>nd</SUP> edition, Tomas <SPAN class=SpellE>Akenine-Moller</SPAN> &amp; Eric Haines, July 2002, AK Peters, ISBN 1568811829<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Physics for Game Developers</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, David Bourg, November 2001, O’Reilly &amp; Associates, ISBN 0596000065<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">3D Game Engine Design: A Practical Approach to Real-Time Computer Graphics</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, David <SPAN class=SpellE>Eberly</SPAN>, September 2000, Morgan Kaufmann, ISBN 1558605932<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">3D Games: Real-Time Rendering and Software Technology</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, Volume 1, Alan Watt and Fabio <SPAN class=SpellE>Policarpo</SPAN>, December 2000, Addison Wesley, ISBN 0201619210<o:p></o:p></SPAN></P>
<P class=MsoPlainText><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">3D Games: Animation and Advanced Real-Time Rendering</SPAN></B><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">, Volume 2, Alan Watt and Fabio <SPAN class=SpellE>Policarpo</SPAN>, January 2003, Addison Wesley, ISBN 0201787067<BR><o:p><BR>上述资料取自<A href="http://employees.oneonta.edu/allisodl/GameDevelopment/">http://employees.oneonta.edu/allisodl/GameDevelopment/</A>，所有权利归原出处所有，这里谨做链接。</o:p></SPAN></P></SPAN><img src ="http://www.cppblog.com/windeer/aggbug/3301.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/windeer/" target="_blank">alpha</a> 2006-02-17 09:06 <a href="http://www.cppblog.com/windeer/archive/2006/02/17/3301.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>