﻿<?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++博客-黎明的剔透里伸出了你沁清的暧昧-随笔分类-Documents</title><link>http://www.cppblog.com/init/category/17182.html</link><description>Graphics|EngineDev|GameDev|2D&amp;3D Art            
                                 </description><language>zh-cn</language><lastBuildDate>Sat, 17 Oct 2020 10:53:03 GMT</lastBuildDate><pubDate>Sat, 17 Oct 2020 10:53:03 GMT</pubDate><ttl>60</ttl><item><title>VS2008下编写QT程序环境设置</title><link>http://www.cppblog.com/init/archive/2015/08/22/211652.html</link><dc:creator>情绝格调(fresmaster)</dc:creator><author>情绝格调(fresmaster)</author><pubDate>Sat, 22 Aug 2015 06:55:00 GMT</pubDate><guid>http://www.cppblog.com/init/archive/2015/08/22/211652.html</guid><wfw:comment>http://www.cppblog.com/init/comments/211652.html</wfw:comment><comments>http://www.cppblog.com/init/archive/2015/08/22/211652.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/init/comments/commentRss/211652.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/init/services/trackbacks/211652.html</trackback:ping><description><![CDATA[<p><font size="3"><font face="微软雅黑">一、环境配置</font> </font></p> <p><font face="微软雅黑"> </font></p><p><font face="微软雅黑"><font face="微软雅黑"><font style="font-weight: bold" size="3">&nbsp;&nbsp; </font></font></font><font size="3">&nbsp; 用VS新建一个win32控制台应用程序,我们假设工程名为：Hello。 </font></p><p>&nbsp;</p> <p> </p><p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 选择工具-&gt;选项-&gt;项目和解决方案-&gt;VC++目录。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1)&nbsp; 选择&#8220;可执行文件&#8221;，在里面添加：C:\Qt4.7.0\bin;</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2)&nbsp; 选择&#8220;包含文件&#8221;，在里面添加：C:\Qt4.7.0\include;&nbsp;&nbsp; C:\Qt4.7.0\include\Qt;&nbsp;&nbsp; C:\Qt4.7.0\include\QtCore;&nbsp;&nbsp; C:\Qt4.7.0\include\QtGui</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3)&nbsp; 选择&#8220;库文件&#8221;，在里面添加：C:\Qt4.7.0\lib； </font></p><p>&nbsp;</p> <p><font size="3" face="微软雅黑">二、开始编程 </font></p><font face="微软雅黑"> <p><font size="3"><font face="微软雅黑">&nbsp;&nbsp; 1.&nbsp;&nbsp;&nbsp;&nbsp; 选择菜单上的&#8220;QT&#8221;选项- &gt;&#8220;Launch Designer&#8221; ,启动designer : 放入一个&#8220;label&#8221;,内容写为：helloQT。然后保存为Hello.ui，再将它添加到源文件中。</font> </font></p> <p><font size="3" face="微软雅黑">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 右击&#8220;Hello.ui&#8221;-&gt;&#8220;属性&#8221;-&gt;&#8220;自定义生成步骤&#8221;：</font></p><font face="微软雅黑"> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 命令行：uic.exe Hello.ui -o HelloUi.h</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 输出：HelloUi.h</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 附加依赖项：uic.exe; Hello.ui</font></p> <p><font size="3"><font face="微软雅黑">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 然后，点击&#8220;确定&#8221;。这时再右击&#8220;Hello.ui&#8221;，选择&#8220;编译&#8221;，则会生成HelloUi.h。将它添加到工程中。</font> </font></p></font> <p><font size="3"><font face="微软雅黑">&nbsp;&nbsp;&nbsp; 2.&nbsp;&nbsp; 在Hello.cpp中编写代码：</font> </font></p> <p><font size="3" face="微软雅黑">&nbsp;&nbsp;&nbsp; 3.&nbsp;&nbsp; 选择&#8220;项目&#8221;，&#8220;Hello属性&#8221;，&#8220;配置属性&#8221;：</font></p><font face="微软雅黑"> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1)&nbsp; &#8220;常规&#8221;：选择&#8220;字符集&#8221;为&#8220;使用多字节字符集&#8221;；</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2)&nbsp; &#8220;调试&#8221;：填写&#8220;环境&#8221;值为：PATH=C:\Qt4.7.0\bin；</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 填写&#8220;合并环境&#8221;值为：是；</font></p> <p><font size="3"><font face="微软雅黑">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3)&nbsp; &#8220;链接器&#8221;：进入&#8220;常规&#8221;选项，填写&#8220;附加库目录&#8221;为：C:\Qt4.7.0\lib;</font> </font></p></font> <p><font size="3" face="微软雅黑">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 进入&#8220;输入&#8221;选项，填写&#8220;附加依赖项&#8221;为：qtcore4.lib qtgui4.lib</font></p><font face="微软雅黑"> <p><font size="3" face="微软雅黑">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; （注意，这两个库之间为空格，不能写逗号）</font></p> </font></font><p><font face="微软雅黑"><font face="微软雅黑"></font></font><u><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></u></p> <li><font size="3">信号和槽</font></li> <p><font size="3">&nbsp;&nbsp;&nbsp; 信号signals的声明是头文件中进行的（槽的声明也在头文件中声明，同时要在类声明的开始处加上Q_OBJECT语句，这将告诉编译器在编译之前必须用moc工具进行扩展），并且moc&nbsp;&nbsp;&nbsp; 工具会注意不要将信号定义在实现文件中，使用signals关键字标示信号声明区，随后可声明自己的信号。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 信号signals没有public\private\protected等属性，这点不同于slots。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 信号signals的返回值为void&nbsp;&nbsp;&nbsp; </font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 槽slots有public slots、private slots、protected slots (方法)</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 信号signals/事件-&gt;（驱动）槽slots/方法</font></p> <p><font size="3"></font>&nbsp;</p> <li><font size="3"> 元对象</font></li> <p><font size="3">QT的元对象系统为QT提供了对象间通信的信号与槽机制、实时类型信息、动态属性系统等方面的功能。</font></p> <p> </p><p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 元对象系统在QT中主要有以下三个部分构成：QObject类、Q_OBJECT宏、元对象编译器moc</font></p><font size="3">&nbsp; </font> <p><font size="3">&nbsp;&nbsp; 3.vs中QT显示中文：</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #include &lt;QTextCodec&gt;</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; QTextCodec::setCodecForTr(QTextCodec::codecForName("gb18030"));</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; QFont font("Times",12,QFont::Normal,FALSE);</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; app.setFont(font); </font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QTextCodec::setCodecForTr(QTextCodec::codecForName("gb18030"));</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; //QFont font("Times",12,QFont::Normal,FALSE);</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; //a.setFont(font);</font></p><font size="3">&nbsp; </font> <p><font size="3">&nbsp;&nbsp;&nbsp; 4.<u><font color="#ff0000">QAction类</font></u>的用法</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp; 1、QAction::QAction ( const QString &amp; text, QObject * parent )</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QAction类的构造函数之一，利用text，parent创建QAction对象。QAction对象一般为菜单中的菜单项，比如 "文件"菜单中"新建"选项就是一个QAction对象，</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 上述构造函数中text成员变量&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 即为菜单项所表示的内容</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用法：QAction *newAction = new QAction(tr("&amp;New"),this);</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp; 2、void QAction::setIcon ( const QIcon &amp; icon )</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 该函数可设置菜单项名称前的图标</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用法：newAction-&gt;setIcon(QIcon(":/images/new.png"));</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp; 3、void QAction::setShortcut ( const QKeySequence &amp; shortcut );</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 设置QAction对象执行的快捷键</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用法：newAction-&gt;setShortcut(tr("Ctrl+N"));</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 4、void QAction::setStatusTip ( const QString &amp; statusTip );</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 设置当鼠标移动到&#8220;动作&#8221;上时，状态栏显示的提示语。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 5、void QAction::setVisible ( bool );</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 设置&#8220;动作&#8221;显示与否，当形参为true是，&#8220;动作&#8221;表示。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 6、void QAction::triggered ( bool checked = false ) [signal]</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 此函数为信号，当用户触发此&#8220;动作&#8221;时，此信号发射。例如用户点击了菜单中的菜单项等。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 此函数一般用法为：在QObject::connect（）函数中作为信号参数，用于触发&#8220;动作&#8221;所对应执行的槽函数&#8212;&#8212;实现&#8220;动作&#8221;的功能函数，例如：&#8220;新建&#8221;按钮被用户按下，</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 所需要的功能可能&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 是新建一个文档，那么新建一个文档的动作就在这个槽函数中实现。至于此信号函数中的形参暂时可以忽略。以后会在介绍QObject类中的静态方法connect()函数时详细解说。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7、void QAction::setCheckable ( bool );</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 此函数用于设置QAction类中的私有变量： bool checkable ，此属性用以提供&#8220;动作&#8221;是否为复选动作，例如Qt Creator中&#8220;控件&#8221;菜单中的&#8220;全屏&#8221;菜单项即为复选动作</font></p> <p><font size="3">菜单</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp; 5&nbsp; </font><a href="http://blog.chinaunix.net/uid-27666459-id-3966620.html"><font color="#ff0000" size="3">QMainWindow类</font></a><font size="3">用法</font></p> <p><font size="3">&nbsp; 1、void QMainWindow::setCentralWidget ( QWidget * widget );</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 此方法作用为设置传入部件为主窗口布局的中心领域部件。传入部件可为任意的部件或QWidget类的子类部件。对于&#8220;部件&#8221;这个词的理解可以理解为某机器上的一个螺丝、一个配件等等，其实部件就是螺丝和某配件的一个抽象感念嘛，他们都叫做部件，但是却有着不同的作用和形状。以后会遇到很多类继承QWidget类的。相信大家都比笔者聪明，或许我是在说些废话，呵呵。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 举例：</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在自定义的继承于QMainWindow的来构造函数里面：</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QTableWidget *table = new QTableWidget；&nbsp;&nbsp;&nbsp;&nbsp; //QTableWidget继承于QWidget类；</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setCentralWidget(table);</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 2、void&nbsp; QMainWindow::setWindowIcon ( const QIcon &amp; icon );</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 设置窗口左上角图标，支持PNG、BMP、GIF、FPEG、PNM、XBM、XPM格式文件。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一下为几种GUI应用程序提供资源的方法：</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#9312;将图片存入文件，在程序运行时加载</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#9313;将XPM文件包含在源程序中，因为XPM文件是有效的C++文件</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#9314;使用Qt的资源机制&#8212;&#8212;&#8212;&#8212;此种方式不仅仅支持图片格式文件，而且支持任何格式的文件</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 3、QMenuBar *QMainWindow::menuBar() const;</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 此方法返回一个主窗口的菜单栏对象指针。如果在调用此方法时，主窗口不存在菜单栏，则此方法会创建一个空的菜单栏。在Mac应用程序中，如想在多个主窗口之间共享一个菜单栏，则需要使用QMenuBar *menuBar = new QMenuBar(0);形式创建菜单栏，即创建一个无父部件的菜单栏对象。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这里解释一下什么叫做父部件，初学一定对这个概念不理解，这里的父部件不是C++中类的继承关系，而是部件与部件的关系。我也是学习了一段时间才慢慢悟出这里面的道理的。我看的是《C++ GUI Programming with Qt 4》英文原版，本来理解起来就有些障碍，再遇到这样新的概念词汇，更是不知其所云。为什么看英文原版书呢，个人觉得国内翻译的不是很到位，可能在某个地方或关键点给我造成误导，貌似扯远了。。。即说说父部件是个什么东西，现在为大家打个比方，一张电脑桌由多个部件构成，如桌面，桌子腿，抽屉等等，抽屉上面有抽屉把手，那么抽屉就是抽屉把手的父部件，电脑桌就是抽屉的父部件。相信这样解释，大家一定就会理解了。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp; 4、QToolBar * QMainWindow::addToolBar ( const QString &amp; title );</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 此函数为重载函数，其余两个为已创建了工具栏(QToolBar)对象时，将工具栏对象添加到QMainWindow对象中。下面就会马上列出这两个类方法。在调用此方法时，会创建一个QToolBar对象，返回这个对象的指针，并在主窗口顶部工具栏区域中显示。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp; 5、void QMainWindow::addToolBar ( Qt::ToolBarArea area, QToolBar * toolbar );</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 与上个函数构成重载关系，此函数第二个形参为已定义好的工具栏对象指针，第一个形参工具栏表示的位置，此形参为枚举型变量。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 工具栏表示位置共4种，即左右上下：</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (1) Qt::LeftToolBarArea&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x1</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (2) Qt::RightToolBarArea&nbsp;&nbsp;&nbsp;&nbsp; 0x2</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3) Qt::TopToolBarArea&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x4</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (4) Qt::BottomToolBarArea&nbsp; 0x8</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp; 6、void QMainWindow::addToolBar ( QToolBar * toolbar );</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 与调用 addToolBar(Qt::TopToolBarArea, toolbar) 方法效果相同，即调用 addToolBar(Qt::TopToolBarArea, toolbar) 方法，工具栏显示区域默认为主窗口顶部。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp; 7、QStatusBar *QMainWindow::statusBar() const;</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 当主窗口状态栏不存在时，创建状态栏，并返回状态栏对象指针。一般在自定义QMainWindow子类的构造函数时使用，创建状态栏对象。创建后，添加QLabel对象，以显示主窗口状态或菜单栏中按钮的状态提示。</font></p> <p><font size="3">相信通过3、4、5、6、7、QMainWindow类方法的学习，大家应该掌握了创建菜单栏，工具栏和状态栏的方法。通常的主窗口一般也就需要这些东西了。但要想让菜单栏，工具栏以及状态栏能有自己的动作或行为，还需要其他类的配合使用。大家不用急，QMainWindow类简单介绍完毕之后，会介绍这些相关的类及其使用方法。</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp; 8、void QMainWindow::setWindowModified(bool);</font></p> <p><font size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 当此函数形式参数为true时，即设置了WindowModified属性为true，意思为表明先编辑的文档有更新，这时，Qt会自动更新标题栏，Mac OS X 系统上在主窗口的关闭按钮上将出现一个变更的样式，其他系统或平台上会在主窗口标题栏的文件名后多显示一个&#8220;*&#8221;。</font></p> <p><font size="3"></font>&nbsp;</p><pre class="brush: csharp; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;">void MainWindow::open()
{
    QDialog *dialog = new QDialog;
    dialog-&gt;setAttribute(Qt::WA_DeleteOnClose);
    dialog-&gt;setWindowTitle(tr("Hello, dialog!"));
    dialog-&gt;show();</pre><p>&nbsp;</p><pre class="brush: csharp; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;">void MainWindow::open()
{
    QDialog dialog(this);
    dialog.setWindowTitle(tr("Hello, dialog!"));
    dialog.exec();
}</pre>
<p><font size="3"></font>&nbsp;</p>
<p><font size="3"></font>&nbsp;</p>
<p><font size="3"></font></p><img src ="http://www.cppblog.com/init/aggbug/211652.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/init/" target="_blank">情绝格调(fresmaster)</a> 2015-08-22 14:55 <a href="http://www.cppblog.com/init/archive/2015/08/22/211652.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>glAlphaFunc in OpenGL ES2.0</title><link>http://www.cppblog.com/init/archive/2012/11/19/195387.html</link><dc:creator>情绝格调(fresmaster)</dc:creator><author>情绝格调(fresmaster)</author><pubDate>Mon, 19 Nov 2012 14:28:00 GMT</pubDate><guid>http://www.cppblog.com/init/archive/2012/11/19/195387.html</guid><wfw:comment>http://www.cppblog.com/init/comments/195387.html</wfw:comment><comments>http://www.cppblog.com/init/archive/2012/11/19/195387.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/init/comments/commentRss/195387.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/init/services/trackbacks/195387.html</trackback:ping><description><![CDATA[<p><font size="3">In OpenGL ES 2.0 </font><a href="http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml"><font size="3">glAlphaFunc</font></a><font size="3"> isn't available, you have to implement it in a fragment shader. There isn't a lot of reference out there for this (not that I could find anyway) so I thought I'd write this up.</font> 
<p><font size="3">It's actually quite simple to implement a quick alpha test. I needed to be able to cookie cut out sprites and fonts so I simply needed to reject fragments where the alpha value was zero. Here are the guts of a shader to do this:</font> 
<div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 5px; background-color: #f5f5f5; padding-left: 5px; padding-right: 5px; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 5px" class="cnblogs_code"><pre><span style="color: #000000">#ifdef GL_ES 
precision highp </span><span style="color: #0000ff">float</span><span style="color: #000000">;
</span><span style="color: #0000ff">#endif</span> <span style="color: #000000">
uniform sampler2D u_tex0; 
uniform </span><span style="color: #0000ff">bool</span><span style="color: #000000"> u_alphatestenable; 
varying vec2 v_texCoord;
varying vec4 v_color;
</span><span style="color: #0000ff">void</span><span style="color: #000000"> main(){ 
    </span><span style="color: #008000">//</span><span style="color: #008000">calculate the fragment color based on the texture and the vertex colour</span>
    vec4 basecolor = texture2D( u_tex0, v_texCoord ) *<span style="color: #000000"> v_color;

    </span><span style="color: #008000">//</span><span style="color: #008000">if testing is enabled, check the alpha component and discard if zero      </span>
    <span style="color: #0000ff">if</span><span style="color: #000000">(u_alphatestenable){ 
        </span><span style="color: #0000ff">if</span>(basecolor.a == <span style="color: #800080">0.0</span><span style="color: #000000">){ 
            </span><span style="color: #008000">//</span><span style="color: #008000">throw this fragment away</span>
<span style="color: #000000">            discard;
        }
    }
    gl_FragColor </span>=<span style="color: #000000"> basecolor;
}</span></pre></div>
<p><font size="3"></font>&nbsp;</p>
<p><font size="3">You need to set up a uniform variable u_alphatestenable which enables the alpha test. If you want to support different test types ( less than, greater than etc) then you will need two more uniform variables: one for the test type and one for the value to test against.</font> 
<div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 5px; background-color: #f5f5f5; padding-left: 5px; padding-right: 5px; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 5px" class="cnblogs_code"><pre><span style="color: #0000ff">int</span> uni_alphatest_enable = glGetUniformLocation(mProgram, <span style="color: #800000">"</span><span style="color: #800000">u_alphatestenable</span><span style="color: #800000">"</span><span style="color: #000000">); 
</span><span style="color: #0000ff">bool</span> alphateston = <span style="color: #0000ff">true</span><span style="color: #000000">; 
glUniform1i(uni_alphatest_enabl</span></pre></div>
<p><font size="3"></font>&nbsp;</p>
<p><font size="3"><em>note that you shouldn't call glGetUniformLocation every frame, it should be cached somewhere</em>.<br />It's quite simple and while you may be thinking oh that is so slow it not that bad. It's faster then the fixed function pipeline which is doing tests for alpha, lights, blend modes etc. If you get paranoid then you can create multiple shaders that support different subsets of features. All you need to be careful of is the cost of calling glSetProgram (to switch shaders) which can be expensive and cause bubbles in the vertex pipeline in the hardware.</font></p><img src ="http://www.cppblog.com/init/aggbug/195387.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/init/" target="_blank">情绝格调(fresmaster)</a> 2012-11-19 22:28 <a href="http://www.cppblog.com/init/archive/2012/11/19/195387.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Gamma Correction</title><link>http://www.cppblog.com/init/archive/2012/11/15/195246.html</link><dc:creator>情绝格调(fresmaster)</dc:creator><author>情绝格调(fresmaster)</author><pubDate>Thu, 15 Nov 2012 15:05:00 GMT</pubDate><guid>http://www.cppblog.com/init/archive/2012/11/15/195246.html</guid><wfw:comment>http://www.cppblog.com/init/comments/195246.html</wfw:comment><comments>http://www.cppblog.com/init/archive/2012/11/15/195246.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/init/comments/commentRss/195246.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/init/services/trackbacks/195246.html</trackback:ping><description><![CDATA[<p><br><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_12.png"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_thumb_5.png" width="635" height="318"></a></p> <p><font size="3">在计算机图形学领域时常听到gamma correction ，gamma correction 控制了图像整体的亮度，reproduce colors也需要gamma correction的一些理论知识，gamma correction不仅仅是控制了图像的亮度，而且还控制了RGB各个分量的比例，我们知道渲染器是线性的，而显示器并非线性，其实电子打在屏幕上从而产生亮点，电子的运动受电压控制，这两者是指数关系的，所以产生的亮度也跟电压成指数关系，而发送给显示器的voltages范围是0~1：</font></p> <p><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_14.png"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_thumb_6.png" width="304" height="64"></a></p> <p><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_2.png"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_thumb.png" width="697" height="175"></a></p> <p><font size="3">对于我们输入的图像，如果直接显示，那么就会篇暗，根据已知电压与显示亮度的关系，进行gamma correction ，其实就是对gamma曲线的修正。一般生产厂家不加说明，他们的伽码值大约等于2.5.</font></p> <p><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_16.png"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_thumb_7.png" width="264" height="77"></a></p> <p><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_10.png"><img style="background-image: none; border-right-width: 0px; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_11C68/image_thumb_4.png" width="691" height="265"></a></p> <p>代码：</p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 5px; background-color: #f5f5f5; padding-left: 5px; padding-right: 5px; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 5px" class="cnblogs_code"><pre>   gammaCorrection = <span style="color: #800080">1</span> /<span style="color: #000000"> gamma
   colour </span>=<span style="color: #000000"> GetPixelColour(x, y)
   newRed   </span>= <span style="color: #800080">255</span> * (Red(colour)   / <span style="color: #800080">255</span>) ^<span style="color: #000000"> gammaCorrection
   newGreen </span>= <span style="color: #800080">255</span> * (Green(colour) / <span style="color: #800080">255</span>) ^<span style="color: #000000"> gammaCorrection
   newBlue  </span>= <span style="color: #800080">255</span> * (Blue(colour)  / <span style="color: #800080">255</span>) ^<span style="color: #000000"> gammaCorrection
   PutPixelColour(x, y) </span>= RGB(newRed, newGreen, newBlue)</pre></div>
<p><font size="3">知道monitor不是一个线性的，那么我们在进行颜色加法时，我们得到的颜色并不是真正的颜色值的相加，比如gamma factor是2.2</font></p>
<p><font size="3">red = add (r1, r2);</font></p>
<p><font size="3">red= add (0.235,0.156);</font></p>
<p><font size="3">对于一个线性设备，red = 0.391,对于未经修正的montior red=0.126;</font></p>
<p><font size="3">因为有一个幂函数的运算：C_out = C_in<sup>2.2</sup></font></p>
<p><font size="3">现在使用gamma correction :C_corrected= C_out<sup>1.0/2.2</sup></font></p>
<p><font size="3">0.391<sup>2.2</sup> = 0.126</font></p>
<p><font size="3">0.126<sup>1.0/2.2</sup> = 0.39</font></p>
<p><font size="3">我们看到使用伽码校正以后我们能得到我们预想的颜色值0.39.</font></p>
<p><font size="3"></font>&nbsp;</p>
<p><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_thumb.png" width="637" height="476"></a><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_10.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_thumb_3.png" width="637" height="475"></a></p>
<p>&nbsp;</p>
<p><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_12.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_thumb_4.png" width="643" height="399"></a><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_14.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_thumb_5.png" width="638" height="398"></a></p>
<p>&nbsp;</p>
<p><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_16.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_thumb_6.png" width="636" height="403"></a><a href="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_18.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.cppblog.com/images/cppblog_com/init/Windows-Live-Writer/Gamma-Correction_62A/image_thumb_7.png" width="639" height="403"></a></p>
<p><font size="3"></font>&nbsp;</p>
<p><font size="3"></font>&nbsp;</p>
<p><font size="3">There are two ways to do gamma correction:</font></p>
<ul>
<li><font size="3">Using the renderer. The renderer (the graphics card or GPU) is a linear device. Modern renderers have the support of gamma correction via <b>sRGB</b> textures and framebuffer formats. See the following OpenGL extensions for more details: </font><a href="http://www.opengl.org/registry/specs/ARB/framebuffer_sRGB.txt"><font size="3">GL_ARB_framebuffer_sRGB</font></a><font size="3"> and </font><a href="http://www.opengl.org/registry/specs/EXT/texture_sRGB.txt"><font size="3">GL_EXT_texture_sRGB</font></a><font size="3">. With these extensions you can get gamma corrected values <i>for free</i> but gamma correction factor is set to 2.2. You can’t change it. </font>
<li><font size="3">Using a software gamma correction. The gamma correction is applied to the final scene buffer thanks to a<b>pixel shader</b> and you can set the gamma correction you want.</font></li></ul>
<p><font size="3">In OpenGL, using GL_ARB_framebuffer_sRGB is really simple: once your FBO is bound, just enable the sRGB space with</font><pre><font size="3">glEnable(GL_FRAMEBUFFER_SRGB);</font></pre><pre>&nbsp;</pre><pre><a href="http://www.cambridgeincolour.com/tutorials/gamma-correction.htm">gamma-correction</a></pre><img src ="http://www.cppblog.com/init/aggbug/195246.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/init/" target="_blank">情绝格调(fresmaster)</a> 2012-11-15 23:05 <a href="http://www.cppblog.com/init/archive/2012/11/15/195246.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Hemi-Sphere Lighting</title><link>http://www.cppblog.com/init/archive/2012/09/18/191143.html</link><dc:creator>情绝格调(fresmaster)</dc:creator><author>情绝格调(fresmaster)</author><pubDate>Tue, 18 Sep 2012 11:27:00 GMT</pubDate><guid>http://www.cppblog.com/init/archive/2012/09/18/191143.html</guid><wfw:comment>http://www.cppblog.com/init/comments/191143.html</wfw:comment><comments>http://www.cppblog.com/init/archive/2012/09/18/191143.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/init/comments/commentRss/191143.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/init/services/trackbacks/191143.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/init/archive/2012/09/18/191143.html'>阅读全文</a><img src ="http://www.cppblog.com/init/aggbug/191143.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/init/" target="_blank">情绝格调(fresmaster)</a> 2012-09-18 19:27 <a href="http://www.cppblog.com/init/archive/2012/09/18/191143.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>辐射计量概念</title><link>http://www.cppblog.com/init/archive/2012/09/18/191130.html</link><dc:creator>情绝格调(fresmaster)</dc:creator><author>情绝格调(fresmaster)</author><pubDate>Tue, 18 Sep 2012 08:50:00 GMT</pubDate><guid>http://www.cppblog.com/init/archive/2012/09/18/191130.html</guid><wfw:comment>http://www.cppblog.com/init/comments/191130.html</wfw:comment><comments>http://www.cppblog.com/init/archive/2012/09/18/191130.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/init/comments/commentRss/191130.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/init/services/trackbacks/191130.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/init/archive/2012/09/18/191130.html'>阅读全文</a><img src ="http://www.cppblog.com/init/aggbug/191130.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/init/" target="_blank">情绝格调(fresmaster)</a> 2012-09-18 16:50 <a href="http://www.cppblog.com/init/archive/2012/09/18/191130.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Light Mapping</title><link>http://www.cppblog.com/init/archive/2012/09/18/191128.html</link><dc:creator>情绝格调(fresmaster)</dc:creator><author>情绝格调(fresmaster)</author><pubDate>Tue, 18 Sep 2012 08:48:00 GMT</pubDate><guid>http://www.cppblog.com/init/archive/2012/09/18/191128.html</guid><wfw:comment>http://www.cppblog.com/init/comments/191128.html</wfw:comment><comments>http://www.cppblog.com/init/archive/2012/09/18/191128.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/init/comments/commentRss/191128.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/init/services/trackbacks/191128.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/init/archive/2012/09/18/191128.html'>阅读全文</a><img src ="http://www.cppblog.com/init/aggbug/191128.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/init/" target="_blank">情绝格调(fresmaster)</a> 2012-09-18 16:48 <a href="http://www.cppblog.com/init/archive/2012/09/18/191128.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>GLSL.Ambient occlusion </title><link>http://www.cppblog.com/init/archive/2012/04/30/173280.html</link><dc:creator>情绝格调(fresmaster)</dc:creator><author>情绝格调(fresmaster)</author><pubDate>Mon, 30 Apr 2012 14:18:00 GMT</pubDate><guid>http://www.cppblog.com/init/archive/2012/04/30/173280.html</guid><wfw:comment>http://www.cppblog.com/init/comments/173280.html</wfw:comment><comments>http://www.cppblog.com/init/archive/2012/04/30/173280.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/init/comments/commentRss/173280.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/init/services/trackbacks/173280.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.cppblog.com/init/archive/2012/04/30/173280.html'>阅读全文</a><img src ="http://www.cppblog.com/init/aggbug/173280.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/init/" target="_blank">情绝格调(fresmaster)</a> 2012-04-30 22:18 <a href="http://www.cppblog.com/init/archive/2012/04/30/173280.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>