﻿<?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>博客园-梦想天空</title><link>http://www.cnblogs.com/hesicong/</link><description>.NET/.NET CF/Mobile Phones
HP1937,Siemens M55,Siemens CXV65,Nokia 6021
PDU,SMS,Data Cabel,IrDA,Bluetooth and so on.</description><language>zh-cn</language><lastBuildDate>Fri, 22 Aug 2008 02:09:49 GMT</lastBuildDate><pubDate>Fri, 22 Aug 2008 02:09:49 GMT</pubDate><ttl>60</ttl><item><title>测试GPU的材质填充率</title><link>http://www.cnblogs.com/hesicong/archive/2008/08/08/1263709.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Fri, 08 Aug 2008 05:55:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/08/08/1263709.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1263709.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/08/08/1263709.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1263709.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1263709.html</trackback:ping><description><![CDATA[<p>　　体渲染最重要的一个优化就是减少GPU的采样工作。测试GPU的材质填充率能够指导我们的工作。要知道为什么GPU在800*600的环境中只能达到12FPS么？这就要看GPU每秒钟采样的次数啦。</p>
<p>　　我写了一个简单的ＯＳＧ程序，用来测试采样次数，<a href="http://www.hesicong.net/blog/upload/2008/8/TestTextureFetching.tar" target="_blank">点击这里可以下载</a></p>
<p>　　程序原理很简单，分几步：创建窗口-&gt;生成和设置纹理-&gt;载入SHADER-&gt;渲染。具体如何做要看程序里面啦，这里就不再贴出来了。</p>
<p>　　直接说最后的测试的结果了。我的8800GTS(G80)官方资料说材质填充率能够达到24Billion/Sec，官方资料给的核心频率500Mhz，着色器频率1200Mhz，显存800Mhz。我将我的显卡也按照这个数据进行了降频。</p>
<p>　　测试环境：窗口800*600，3D贴图256*256*256，数据是LUMINACE_ALPHA，每个像素2BYTE。每个像素的Shader采样3D贴图512次。</p>
<p>　　最后得到测试FPS为11.98帧。算算：800*600*512*11.98=2,944,204,800，因为是3D纹理所以每个采样实际要有8次采样工作，所以最终的材质填充率：23,553,638,400，和24Billion/Sec很接近了。</p>
<p>　　换用2D贴图可以得到相似的结果，只是FPS会快一倍。原因是三线性采样的工作量是二线性采样的两倍，很显然FPS会提升一倍。</p>
<p>　　那么怎么去优化呢？下面做一些测试：</p>
<ol>
    <li>减小3D贴图的大小，以便尽可能的装到CACHE里面。直接设置为1*1*1，结果发现性能一样。</li>
    <li>更换3D贴图的internal format为RGBA，发现性能一样。</li>
    <li>超频：超核心，性能提升百分比和超频百分比几乎一样。超Shader，几乎没变化。超显存，几乎没变化。</li>
    <li>降频：降核心，性能降低百分比和降频百分比几乎一样。降Shader，几乎没办法。降显存，一直降到400Mhz也没有变化。</li>
    <li>降低每像素采样率：降低为256后，性能提升一倍，和预期一样。</li>
</ol>
<p>　　最终的结果很明显。3D贴图的采样已经成了整个系统的瓶颈，已经让显卡的贴图单元达到了极限。Shader处理器由于计算量很小，所以还很空闲。由于采样过滤的繁忙，贴图单元也不需要很大的显存带宽，所以显存的影响几乎没有。</p>
<p>　 　优化的措施：只能尽可能的减少采样次数，或者找更快的卡。目前看来只有G92的9800GTX或者8800GTS的采样率能够达到 43.2Billion/Sec以上，GTX280官方资料也只能达到48.2Billion/Sec，GTX260 36.9Billion/Sec。9800GX2能够达到76.8Billion/Sec，就是不知道实际SLI的性能能不能满足需要了。看来如何选择适 合体渲染的卡已经有一个理论和实际的指导了。</p>
<p>　　</p><img src ="http://www.cnblogs.com/hesicong/aggbug/1263709.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41832/" target="_blank">[新闻]2008年8月22日IT博客精选</a>]]></description></item><item><title>Sourceforge怎么了？</title><link>http://www.cnblogs.com/hesicong/archive/2008/06/28/1231824.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Sat, 28 Jun 2008 14:22:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/06/28/1231824.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1231824.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/06/28/1231824.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1231824.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1231824.html</trackback:ping><description><![CDATA[电信网通都无法访问，怎么回事呢？用TOR也不行，是不是挂了哟？朋友们帮忙看看呢？<br />
<img src ="http://www.cnblogs.com/hesicong/aggbug/1231824.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41831/" target="_blank">[新闻]微软封杀盗版网站</a>]]></description></item><item><title>CUDA Intelisence</title><link>http://www.cnblogs.com/hesicong/archive/2008/06/05/1214538.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Thu, 05 Jun 2008 08:01:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/06/05/1214538.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1214538.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/06/05/1214538.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1214538.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1214538.html</trackback:ping><description><![CDATA[<p>　　CUDA是个好玩意儿，现在2.0BETA已经出来了，提供了很多特爱的特性，特别是对于3D纹理的支持。我也不清楚CUDA应用在目前我的一
些项目中到底有多少潜力，但看来这个还是个趋势，可以了解一下。今天在配置CUDA编程环境的时候，因为其后缀名是.CU的，所以VS2005的智能感知
无法使用。再查询了一些文章以后，发现有下面的解决方案：</p>
<p>We can use the tool Visual Assist X to implement it:<br />
First, find the Visual Assist X install directory:<br />
"Program
Files"Visual Assist X"Autotext, then make a copy of Cpp.tpl, rename it
to Cu.tpl, apply same operation to the "Latest" directory.<br />
Second,
open the regedit table, and search it with the key word "Visual Assist
X" until you find in the VANet8 in
HKEY_USERS"S-1-5-21-1757981266-220523388-725345543-1003"Software"Whole
Tomato"Visual Assist X"VANet8<br />
Here you can see many attribute setting about Visual Assist X,<br />
click the item ExtHeader and add the .cu in the list, same to the item ExtSource.<br />
save and quit.</p>
<p>原文：http://forums.nvidia.com/index.php?showtopic=35669&amp;hl=intellisense</p>
<img src ="http://www.cnblogs.com/hesicong/aggbug/1214538.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41830/" target="_blank">[新闻]财富：十大最炫酷的手机应用软件</a>]]></description></item><item><title>[OSG]如何用Shader得到物体的世界坐标</title><link>http://www.cnblogs.com/hesicong/archive/2008/05/27/1208312.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Tue, 27 May 2008 04:49:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/05/27/1208312.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1208312.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/05/27/1208312.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1208312.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1208312.html</trackback:ping><description><![CDATA[<p>　　最近群里面有个朋友问我关于如何得到OpenGL世界坐标的问题，当时我还弄错了，误以为gl_ModelViewMatrix*gl_Vertex就是世界坐标。因最近也突然遇到了世界坐标的问题，所以花了一些时间来研究这个问题，网上也有人问，但或许没有答案，或许是错的。<br />
其实，OpenGL的转换管道直接将gl_Vertex，也就是物体坐标，用gl_ModelViewMatrix相乘，得到的是眼坐标。如果将gl_ModelViewMatirx拆分为gl_ModelMatrix和gl_ViewMatrix，那么问题就好解决了。但事实上没有提供。要清楚OpenGL其实没有世界坐标系，世界坐标系是应用程序的概念。其实可以将OpenGL的摄像机看作是固定的，其坐标系就是眼坐标系，移动摄像机和移动物体的位置是一个相反的转换，对于观察者来说根本不知道是摄像机在动，还是物体在动（想想大卫的大变自由女神像的魔术吧，呵呵）<br />
说回来，最终的变换是这样的：<br />
eyePos=viewMatrix * modelMatrix * modelVertex<br />
在OpenGL里面viewMatrix和modelMatrix合并了，因为OpenGL里面并没有设置摄像机的参数，所以OpenGL并不知道viewMatrix到底是什么。viewMatrix是用户自己定义的，所以如果能够得到这个viewMatrix并能得到其逆矩阵，就可以得到worldPos:<br />
worldPos=viewMatrixInv * viewMatrix * modelMatrix * modelVertex<br />
传统的OpenGL程序里面，你得自己计算这个viewMatrixInv，还好OSG的Camera提供了一个getViewMatrixInverse()方法，通过这个方法我们就可以轻松的获得viewMatrixInv，然后传递给Vertex Shader（用一个Uniform就可以），然后进行这个计算就可以了。<br />
记得每一帧都需要Update这个viewMatrixInv，只需要一个updateCallBack就可以了。<br />
好了，看几个图，我用3DSMAX创建了两个盒子，为了便于观察，模型的顶点值限制在0-1之间，然后用osgExp导出，没有选中Flatten Static Transform这样就不会把模型定点转换成世界坐标系的顶点。<br />
源代码中可以改变gl_FragColor=的值来修改为相应的坐标系的值显示。<br />
世界坐标系的最终输出，可见颜色连续变换的。<br />
<img title="" alt="" src="http://www.hesicong.net/blog/upload/2008/5/world.jpg" onload="ResizeImage(this,600)" /></p>
<p>　　眼坐标系的图，可见屏幕中间偏左的部分是黑的。因为其值是负的。平移拖动盒子可见相应像素着色不变。<br />
<img title="" alt="" src="http://www.hesicong.net/blog/upload/2008/5/eye.jpg" onload="ResizeImage(this,600)" /></p>
<p>　　物体坐标系的图，可见两个盒子的颜色一样，因为其值是相同的。<br />
<img title="" alt="" src="http://www.hesicong.net/blog/upload/2008/5/local.jpg" onload="ResizeImage(this,600)" /><br />
源代码也附后，可以运行着看看，虽然程序简单，但用到的时候再也不用苦苦思考了，呵呵。<br />
</p>
<p>源代码：<br />
<a href="http://www.hesicong.net/blog/upload/2008/5/RenderWorldCoordinate.tar">www.hesicong.net/blog/upload/2008/5/RenderWorldCoordinate.tar</a></p>
<img src ="http://www.cnblogs.com/hesicong/aggbug/1208312.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41829/" target="_blank">[新闻]商业周刊:暴雪Activision合并 巨无霸诞生</a>]]></description></item><item><title>OpenSceneGraph 2.4 安装包下载</title><link>http://www.cnblogs.com/hesicong/archive/2008/05/27/1208280.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Tue, 27 May 2008 04:17:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/05/27/1208280.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1208280.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/05/27/1208280.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1208280.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1208280.html</trackback:ping><description><![CDATA[网盘下载，长期有效，下载得越多越频繁地址有效期越长：<br />
<br />
http://www.fs2you.com/files/dc36f205-2b14-11dd-a506-00142218fc6e/<br />
<br />
本地下载，请自觉限制下载速度，谢谢！<br />
<br />
http://www.hesicong.net/Store/OSG24.tar<br />
<img src ="http://www.cnblogs.com/hesicong/aggbug/1208280.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41829/" target="_blank">[新闻]商业周刊:暴雪Activision合并 巨无霸诞生</a>]]></description></item><item><title>GPU体素化初探</title><link>http://www.cnblogs.com/hesicong/archive/2008/05/03/1208283.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Sat, 03 May 2008 07:51:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/05/03/1208283.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1208283.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/05/03/1208283.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1208283.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1208283.html</trackback:ping><description><![CDATA[<p>　　用OSG实现，256*256*256的分辨率，每一帧都对物体进行体素化并用简单的体渲染进行显示，可以达到20FPS以上的速度，基本满足我的需要了。但我用的体素化的方法还存在一些问题，对于一些特殊的形体还无法正确体素化。 注：只有NVIDIA 8系列显卡以上才支持硬件渲染到3D贴图。</p>
<p>效果：</p>
<p><img onload="ResizeImage(this,600)" src="http://www.hesicong.net/blog/upload/2008/5/volumetric.jpg" alt="" title="" /></p>
<p>对这个物体进行体素化：</p>
<p><img onload="ResizeImage(this,600)" src="http://www.hesicong.net/blog/upload/2008/5/3dsmax.jpg" alt="" title="" /></p>
<br />
文章来源:<a href="http://www.hesicong.net/blog/post/362.html">http://www.hesicong.net/blog/post/362.html</a> 
<img src ="http://www.cnblogs.com/hesicong/aggbug/1208283.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41828/" target="_blank">[新闻]51.com新版上线 正式推出开放平台</a>]]></description></item><item><title>gDebugger 4.0 破解</title><link>http://www.cnblogs.com/hesicong/archive/2008/04/01/1132640.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Tue, 01 Apr 2008 05:08:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/04/01/1132640.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1132640.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/04/01/1132640.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1132640.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1132640.html</trackback:ping><description><![CDATA[<font face="Verdana"><font face="Verdana">有两种方法：<a style="color: #ffffff" href="http://www.hesicong.net">http://www.hesicong.net</a><br />
1、安装的时候用Total Uninstaller（http://www.crsky.com/soft/5302.html）监视整个安装过程，过期以后用Total Uninstaller卸载重装即可，30天又回来了<a style="color: #ffffff" href="http://www.hesicong.net/">http://www.hesicong.net</a><br />
2、如果是老版本的30天过期了，就装这个新版本，然后有7天的宽限期。你会发现如果你调整你的时间，<a style="color: #ffffff" href="http://www.hesicong.net/">http://www.hesicong.net</a><a href="http://bbs.osgchina.org"><br />
</a>那么宽限期也会自动变化。所以找一个软件将时间锁住就OK了。可以到这里下载个时间宽限小软件即可搞定。<a style="color: #ffffff" href="http://www.hesicong.net/">http://www.hesicong.net</a><br />
</font></font>
 <img src ="http://www.cnblogs.com/hesicong/aggbug/1132640.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41827/" target="_blank">[新闻]微软照片共享网站Photosynth上线首日陷入瘫痪 访问量过大</a>]]></description></item><item><title>GPU GEM3 CD下载</title><link>http://www.cnblogs.com/hesicong/archive/2008/03/29/1129213.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Sat, 29 Mar 2008 13:37:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/03/29/1129213.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1129213.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/03/29/1129213.html#Feedback</comments><slash:comments>10</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1129213.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1129213.html</trackback:ping><description><![CDATA[找了个朋友搞到了GPU GEMS 3的CD，供出来大家下载。请仅用于学习用途并于24小时内删除，本人不负责由此带来的任何问题，谢谢！<br />
GPU GEMS 3 CDROM<br />
电驴下载地址（长期有效，ＡＤＳＬ做种，不是太稳定）<br />
<a href="ed2k://|file|GPU%20GEMS%203.isz|411780607|085AF31F100077881F9DBFFE5A868BF5|h=SDC63EGBC2JPTNDI6K7B6F5GCNGU3N4J|/">ed2k://|file|GPU%20GEMS%203.isz|411780607|085AF31F100077881F9DBFFE5A868BF5|h=SDC63EGBC2JPTNDI6K7B6F5GCNGU3N4J|/</a><br />
此为压缩iso格式，请用最新的daemon tools打开。 <br />
     <img src ="http://www.cnblogs.com/hesicong/aggbug/1129213.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41826/" target="_blank">[新闻]修改版WinXP集体歇业避免遭遇调查</a>]]></description></item><item><title>GPU GEMS 3 EBOOK下载</title><link>http://www.cnblogs.com/hesicong/archive/2008/03/21/1115541.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Thu, 20 Mar 2008 16:13:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/03/21/1115541.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1115541.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/03/21/1115541.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1115541.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1115541.html</trackback:ping><description><![CDATA[GPU GEMS 3已经发行了很久了，但始终没有找到下载。今天终于找到了电子版下载地址，比以前1、2的电子版好很多，是CHM格式的，很清晰。国内下载地址见：http://www.itpub.net/viewthread.php?tid=952477<br />
<span style="color: red;">另最新提供网络硬盘的下载地址：<br />
</span>http://www.fs2you.com/zh-cn/files/6710f94c-0234-11dd-99af-0014221f4662/<br />
<img src ="http://www.cnblogs.com/hesicong/aggbug/1115541.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41825/" target="_blank">[新闻]微软投诉番茄花园幕后：两月前BSA代为出手</a>]]></description></item><item><title>DX10 DXUT用Nvidia PerfHUD 5.7的方法</title><link>http://www.cnblogs.com/hesicong/archive/2008/03/12/1103518.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Wed, 12 Mar 2008 13:50:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/03/12/1103518.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1103518.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/03/12/1103518.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1103518.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1103518.html</trackback:ping><description><![CDATA[<p>研究了好半天，结果在网上搜索到一个结果，试了试，非常ＯＫ，方法是在DXUT.CPP 3568行插入如下代码：</p>
<blockquote>
<p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; D3D10_DRIVER_TYPE driver_type = D3D10_DRIVER_TYPE_HARDWARE;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; while(pDXGIFactory-&gt;EnumAdapters(adapter_index, &amp;pAdapter) != DXGI_ERROR_NOT_FOUND)<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(pAdapter)<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DXGI_ADAPTER_DESC adapter_desc;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(SUCCEEDED(pAdapter-&gt;GetDesc(&amp;adapter_desc)))<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const bool is_perf_hud = (wcscmp(adapter_desc.Description, L"NVIDIA PerfHUD") == 0);<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(is_perf_hud)<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; driver_type = D3D10_DRIVER_TYPE_REFERENCE;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pAdapter-&gt;Release();<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pAdapter-&gt;Release();<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ++adapter_index;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pNewDeviceSettings-&gt;d3d10.DriverType = driver_type;</p>
</blockquote> 
<img src ="http://www.cnblogs.com/hesicong/aggbug/1103518.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41822/" target="_blank">[新闻]第一财经周刊:当前互联网世界正处无秩序时代</a>]]></description></item><item><title>查论文</title><link>http://www.cnblogs.com/hesicong/archive/2008/03/11/1103519.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Mon, 10 Mar 2008 16:40:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/03/11/1103519.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1103519.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/03/11/1103519.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1103519.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1103519.html</trackback:ping><description><![CDATA[<p>　　最近还是清闲，把ICMA 2008会议论文忽悠完了以后就继续忽悠弯管机，弯管机模拟程序现在也基本OK了，只是很多小的细节方面的东东还没有完善。想到弯管机就郁闷，还不知道什么时候要被发配到浙江，也不知道去多久，反正听到30个小时的火车我就郁闷了，要知道从这儿到绵阳两个小时的火车我都坐的心烦。</p><p>　　晚上就为体渲染技术查一些论文，说实在的，国内的维普上面还真不能查到太多相关的资料，还好学校的IEEE论文可以查到很多，从2003年到现在将近300篇相关论文一个一个看了一下标题，合适的就下了下来，后来一看竟然有91个。呵呵，还发现一个规律，中国的翻译的论文的题目老是那么长，以至于现在看见题目我就大概明白这是一篇中文翻译的论文了。我还是很喜欢老外写的论文，很清晰，配的图也很漂亮，倒是中国的论文质量不是很高，即便是发到IEEE这样国际刊物的论文质量也欠佳啊。想想前段时候一直搞的论文，就是一个明显的例子，能够发表了那我就对中国论文的质量彻底失去了信心。看来真的国内外的教育体制有很大的差距啊，国内为了完成学业不得不发表文章，博士生甚至一年要发表3篇，我的妈啊，这也太牛了。</p><p>　　不评论论文了，干好自己的事情就OK。过段时间看有空写个IEEE论文下载器，现在用起来太麻烦了，一个一个的手动保存还要自己命名，以后说不定还要用到呢~~不写了哟，手已经按的不爽了，睡觉~</p><img src ="http://www.cnblogs.com/hesicong/aggbug/1103519.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41820/" target="_blank">[新闻]Visual Studio 2008 SDK 1.1 发布</a>]]></description></item><item><title>gDebugger 3.1.1 原版+破解</title><link>http://www.cnblogs.com/hesicong/archive/2008/03/09/1103520.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Sun, 09 Mar 2008 02:27:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/03/09/1103520.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1103520.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/03/09/1103520.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1103520.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1103520.html</trackback:ping><description><![CDATA[<p><img title="" alt="" src="http://www.hesicong.net/blog/upload/2008/3/200803091108002838.jpg" onload="ResizeImage(this,520)" /></p>
<p>好不容易找到的，原版+破解。下载地址：<font face="Verdana">http://www.fs2you.com/files/1df81151-ffab-11dc-9c88-0014221f4662/</font></p>
<img src ="http://www.cnblogs.com/hesicong/aggbug/1103520.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41821/" target="_blank">[新闻]死敌VMware变身微软认证计划新成员</a>]]></description></item><item><title>又一个星期</title><link>http://www.cnblogs.com/hesicong/archive/2008/03/07/1103521.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Fri, 07 Mar 2008 15:00:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/03/07/1103521.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1103521.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/03/07/1103521.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1103521.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1103521.html</trackback:ping><description><![CDATA[<p>　　时间真是不等人啊，还没回过神来，一个星期又荡然无存。这星期做了些&ldquo;了不起&rdquo;的事情，感谢感冒给了我充足的力量来对付论文和对付那些可恶的感冒病毒。说起论文还是挺好玩的。2月29号老板把我和寝室一哥们儿叫过去说论文的事情，我晕，竟然叫我们10号之前出一篇符合IEEE会议的全英文论文！我没有怎么构思，因为我这个人貌似是意识流的，想到哪儿写到哪儿，最后来重组。星期六下午就回家了，星期天出去玩了一天。星期天晚上就开始正式动笔了，竟然星期一晚上就基本完稿，写了2600英文单词，看了看5页，基本合格。第二天把图做了，调整格式的时候欲哭无泪啊，5页直接变成了4页，麻烦的是那些格式还要一一改动。最近又把摘要和引用写了，凑够了3000单词，郁闷的一看，还是4页半，而且没有任何东西可以写了，10号之前想发表那是妄想了。所以想开了，继续玩吧~~~</p><img src ="http://www.cnblogs.com/hesicong/aggbug/1103521.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41819/" target="_blank">[新闻]英特尔雅虎开发网络计算机频道</a>]]></description></item><item><title>搞定Server 2008蓝牙问题</title><link>http://www.cnblogs.com/hesicong/archive/2008/02/23/1078861.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Sat, 23 Feb 2008 09:09:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/02/23/1078861.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1078861.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/02/23/1078861.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1078861.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1078861.html</trackback:ping><description><![CDATA[<p>下载东芝的蓝牙驱动即可：http://www.toshiba-tro.de/tools/bluetooth/bt-stack.zip</p>
<img src ="http://www.cnblogs.com/hesicong/aggbug/1078861.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41818/" target="_blank">[新闻]Windows Live视频邮件9月9日开始测试</a>]]></description></item><item><title>今天回学校</title><link>http://www.cnblogs.com/hesicong/archive/2008/02/23/1078361.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Fri, 22 Feb 2008 16:53:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/02/23/1078361.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1078361.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/02/23/1078361.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1078361.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1078361.html</trackback:ping><description><![CDATA[<p>　　今天就回学校了，下午回去，晚上还是睡不着，一到晚上就有事情想做，看着ＱＱ上的好友一个一个由彩色变成灰色，才发现时间已经很晚了。下学期要怎么安排一下呢，事情很多，有些事情还有些矛盾做不做还成问题。暑假的旅游的事情还要好好的策划一下，倒是听说研究生没有暑假，我这个汗啊，没有还是要争取，我的生活又不是导师一手操控的，活出自己的精彩。</p><p>　　下学期天气也暖和起来了，应该要多多的锻炼身体了，每次都是寒假过后觉得特别的不舒服，一来是&ldquo;时差&rdquo;没有调整好，第二是身体也不舒服，因为假期里面大部分时候都在弄电脑，强度比平时在学校大多了，所以很多作品、很多好想法都是在假期做出来的。下学期还有学习的任务，完了就是一年了，1/3了，太快了，继续努力学习，努力想法赚钱~~~</p><img src ="http://www.cnblogs.com/hesicong/aggbug/1078361.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41818/" target="_blank">[新闻]Windows Live视频邮件9月9日开始测试</a>]]></description></item><item><title>2008-2-22，这么倒霉的一个日子~！</title><link>http://www.cnblogs.com/hesicong/archive/2008/02/22/1078362.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Fri, 22 Feb 2008 11:53:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/02/22/1078362.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1078362.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/02/22/1078362.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1078362.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1078362.html</trackback:ping><description><![CDATA[<p>　　要彻底崩溃了，今天这个日子好&mdash;&mdash;都是2，2月22，过了凌晨就开始倒霉。</p><p>　　首先是装了个andLinux把Windows Server 2008搞挂了，此为倒霉一。</p><p>　　重装罢了，结果哪知道DIRT的存档在C盘的Users文件夹里面，被格式化了&hellip;&hellip;此为倒霉二。</p><p>　　早上还在睡觉就接到电话，不理，此为倒霉三。</p><p>　　下午弄手机短信，发现手机设计的很心烦，只能将文件夹的东西移动到&ldquo;收件箱&rdquo;而不能移动到&ldquo;发件箱&rdquo;，想把2000多条短信备份一下，结果弄得来2月12号以后的短信全部丢失，幸好以前的还有备份，此为倒霉四。</p><p>　　弄好手机，回来查看QQ的聊天记录？呀？我的QQ聊天记录哪儿去了？？隐约记得今天删除过QQ File List这个文件夹，我靠，你QQ也不能负责一些，以前放到那儿就放到那儿，现在你挪个位置也不给我说一声！！！现在的破软件越来越讨厌了，老在你的Document目录里面装东西，Adobe的什么Updater啊，3DSMAX也放一大堆乱七八糟的东西，还有QQ这个破玩意儿竟然给我创建了QQ File List，My Received File, 我的视频这些文件夹，到底要干啥子哦！！你就放到QQ File List里面也就完了嘛！！！还整个英文名，我郁闷你以为整个英文全中国能用QQ的人都看得懂？！！！！气遭了，反正也删除了，把QQ也删除了，重装，一起记忆滚蛋！！此为倒霉五。</p><p>　　倒霉六暂时还没有发生，反正今天一天丢了很多东西，有些记忆也从此刻消失，也没有备份，算了，没意思。</p><img src ="http://www.cnblogs.com/hesicong/aggbug/1078362.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41817/" target="_blank">[新闻]Intel首次公开展示Nehalem架构迅驰3平台</a>]]></description></item><item><title>Windows Server 2008壮烈牺牲</title><link>http://www.cnblogs.com/hesicong/archive/2008/02/22/1078363.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Thu, 21 Feb 2008 16:47:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/02/22/1078363.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1078363.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/02/22/1078363.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1078363.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1078363.html</trackback:ping><description><![CDATA[<p>倒霉啊，装了个andLinux，本来说享受一下Linux与Windows共存的快乐的，这下好了，不仅andLinux不能启动，连Windows Server 2008也永远的停在了Preparing Your Desktop，Explorer死掉了，启动另外的Explorer进程只能打开My Computer，桌面就根本不显示了，我郁闷了，试了N多方法不凑效，看来只能重装了&hellip;&hellip;我可怜的2008~~更可怜的是我~~~~~~~~~~~</p><img src ="http://www.cnblogs.com/hesicong/aggbug/1078363.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41817/" target="_blank">[新闻]Intel首次公开展示Nehalem架构迅驰3平台</a>]]></description></item><item><title>正确运行OSG的例子</title><link>http://www.cnblogs.com/hesicong/archive/2008/02/21/1078364.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Thu, 21 Feb 2008 12:32:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/02/21/1078364.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1078364.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/02/21/1078364.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1078364.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1078364.html</trackback:ping><description><![CDATA[<p>　　OSG为我们提供了很多有用的例子，那么如何正确运行这些例子呢？我将我的一些经验写出来，希望对大家有所帮助。<br />
1、命令行参数如何找？<br />
main函数作为一个程序的入口很多命令行的参数的在这里处理。OSG的例子里很多都是需要提供参数的，否则就需要调用默认的文件。注意如果你直接运行OSG的例子有可能只是一闪而过，正常的，不要惊慌，只需要分析一下到底需要什么命令行参数就可以正确的运行起来。<br />
以osgviewer这个程序来讲，我们看看相关的处理函数：<br />
arguments.getApplicationUsage()-&gt;setApplicationName(arguments.getApplicationName());&nbsp;&nbsp;//设置程序的名称<br />
arguments.getApplicationUsage()-&gt;setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");&nbsp;//简单的描述<br />
arguments.getApplicationUsage()-&gt;setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");&nbsp;&nbsp;//例子的使用方法<br />
arguments.getApplicationUsage()-&gt;addCommandLineOption("--image &lt;filename&gt;","Load an image and render it on a quad");&nbsp;&nbsp;&nbsp;//参数<br />
....(省略一些）<br />
这里就可以看书这个程序是干什么的，具体的使用方法是什么，以及一些参数的用法。<br />
确定了该传什么参数以后，一来可以在&#8220;命令行&#8221;里面直接输入指令（如果你比较熟悉的话）另一个方法就是在工程的&#8220;属性页&#8220;中，选择&#8220;调试&#8221;，&#8220;命令参数&#8221;中添加需要的指令。这样就可以让大多数例子运行起来了。<br />
2、确定你的环境变量是正确的<br />
有些时候即便你设置了命令行参数，但是还是出现找不到一些文件的情况。注意OSG的例子需要一些文件来执行，你可以在这里（<a href="http://www.openscenegraph.org/projects/osg/wiki/Downloads/SampleDatasets">http://www.openscenegraph.org/projects/osg/wiki/Downloads/SampleDatasets</a>）找到这些例子需要的文件。<br />
下载好后解压好放置好，例如我这里我放在E:\osg\OpenSceneGraph-Data，那么我还需要设置环境变量（如何设置请BAIDU）。添加一个名为OSG_FILE_PATH，值为E:\osg\OpenSceneGraph-Data的环境变量，这样大多数例子不需要你提供额外的文件就可以工作。<br />
另外如果还是报告一些warning，则可能是相应的插件没有找到，请在PATH环境变量中正确设置你的OSG插件的位置。<br />
3、如果还是不工作？<br />
如果上述都正确了，还是不工作，怎么办呢？确认你的显卡能够正确的支持例子，有些高级的例子需要更新的显卡的支持。例如Examples osggeometryshaders就需要DX10系列的显卡才能正确工作。一般来说如果出错控制台都会输出相应的信息的。有些显卡可能不支持一定的扩展，也是可以根据控制台输出知道的。<br />
确认以上三点以后大部分例子还是能够运行成功的，当然如果你运气实在不好，请跟踪一下源代码，找到病因，那么你会对OSG更加了解的。</p>
<img src ="http://www.cnblogs.com/hesicong/aggbug/1078364.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41816/" target="_blank">[新闻]Pogo浏览器</a>]]></description></item><item><title>osgNETDemo</title><link>http://www.cnblogs.com/hesicong/archive/2008/02/19/1078365.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Tue, 19 Feb 2008 09:03:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/02/19/1078365.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1078365.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/02/19/1078365.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1078365.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1078365.html</trackback:ping><description><![CDATA[<p>&nbsp;写了一个简单的OpenSceneGraph和.NET结合的例子。这个例子使用了C++/CLI语言进行托管和非托管之间的相互调用，使用.NET的Windows Forms类库进行UI设计，OSG进行渲染。该例子提供了如何打开并显示文件，使用按钮控制viewer的演示，可作为一个很好的入门例子。</p>
<p>截图如下：</p>
<p><img src="http://www.hesicong.net/blog/upload/2008/2/osgNETDemo.png" class="lightbox" alt="" /></p>
<p>源代码如下：</p>
<p><a href="http://www.hesicong.net/blog/upload/2008/2/osgNETDemo.rar" target="_blank">osgNETDemo.rar</a></p>
<img src ="http://www.cnblogs.com/hesicong/aggbug/1078365.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41807/" target="_blank">[新闻]洪磊口述:番茄花园如何捆绑流氓软件月入十万</a>]]></description></item><item><title>正确使用预编译头</title><link>http://www.cnblogs.com/hesicong/archive/2008/02/16/1078366.html</link><dc:creator>Dream world 梦想天空</dc:creator><author>Dream world 梦想天空</author><pubDate>Fri, 15 Feb 2008 17:49:00 GMT</pubDate><guid>http://www.cnblogs.com/hesicong/archive/2008/02/16/1078366.html</guid><wfw:comment>http://www.cnblogs.com/hesicong/comments/1078366.html</wfw:comment><comments>http://www.cnblogs.com/hesicong/archive/2008/02/16/1078366.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/hesicong/comments/commentRss/1078366.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/hesicong/services/trackbacks/1078366.html</trackback:ping><description><![CDATA[<p>　　做C++的项目的时候最怕的就是编译速度缓慢，前段时间一直抱怨C++/CLI编译OSG项目速度很慢很慢，我以为是OSG的inline函数过多的问题，但确实也是这个问题，每次处理的时候都要处理很多的inline，造成了编译速度的缓慢，往往修改一个文件整个工程都要重新编译，那速度可想而知。但总也要有一个解决方案啊，以前知道预编译头能够加速工程的编译，但是我设置了预编译头，怎么还是那么慢呢？肯定是我使用方法不对。</p>
<p>　　在网上Google了一圈以后找到了预编译头的正确使用：原文URL：<a href="http://www.cnblogs.com/cofd/archive/2007/11/05/949962.html">www.cnblogs.com/cofd/archive/2007/11/05/949962.html</a>，感谢作者的启迪。</p>
<p>　　引用最重要的部分：　　</p>
<blockquote>
<p>如果预编译头文件被正确使用时，它确实大大提高我们编程的效率（你工作中，有多少时间是在等编译完成？很多吧，这个时候一般都很无聊，无奈，浪费时间）。但是他太容易用错了. 下面是几种常见的错误用法.</p>
<p>1) 在预编译头文件里include自己的头文件(当然, 如果你的头文件不经常变化, 也可以)</p>
<p>原因:自己的头文件一般会经常变, 便利后导致预编译的东东重新编译, 降低了编译速度.</p>
<p>2) 在其他的头文件里也include 预编译头文件</p>
<p>假设你的其他头文件也include了预编译头文件, 如果别人引用你的这个头文件又没有设置成预编译头文件, 那引用你头文件的这个人就煎熬了.</p>
<p>原 因：由于你用到的.h文件里include了预编译头文件，他在他本身的project里，vs能够判断的出他是预编译头，也能找的到需要的pch， pdb文件。所以对写这个.h文件的人没影响。但是你作为他的客户，你工作在你的project下，你include了他的h头文件，而这时vs判断不出 他的头文件里include的stdafx是预编译头文件，做普通文件编。那可想而知，他的stdafx里如果有import外面大型的库（如 inventor的tlb，非常慢，我们犯了这个错），那编译速度简直是煎熬。最要命的是，以后你做任何简单的修改都要重编，这和预编译解决的问题恰好相 反了。</p>
<p><strong>下面给出一个使用预编译头文件的操作步骤, 享受一下预编译头文件给我们带来的编译速度的提升:  </strong></p>
<p><strong>1) 添加一个stdafx.h文件(名字随便取, 这里用了VS默认提供的名称), 在这个.h文件里include要使用的头文件(一般是外部的库, 自己写的不常变的头文件也可以加进来)  </strong></p>
<p><strong>2) 添加一个stdafx.cpp文件, 并include "stdafx.h"  </strong></p>
<p><strong>3)项目属性--&gt;c/c++--&gt;Precompiled设置为Use Precompiled Header, stdafx.h  </strong></p>
<p><strong>4)stdafx.cpp属性--&gt;c/c++-&gt;Precompiled设置为Create Precompiled Header, stdafx.h  </strong></p>
<p><strong>done!</strong></p>
</blockquote>
<p>　　试了一下改动一点点东西需要编译３分钟的项目，现在瞬间完成！！终于起作用了！</p>
<blockquote><br />
</blockquote><blockquote> </blockquote> 
<img src ="http://www.cnblogs.com/hesicong/aggbug/1078366.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41813/" target="_blank">[新闻]2008年8月21日IT博客精选：盖茨复出？</a>]]></description></item></channel></rss>