<html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8"><meta name="generator" content="pdf2htmlEX"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/base.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/fancy.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/10667206/raw.css"><script src="https://csdnimg.cn/release/download_crawler_static/js/compatibility.min.js"></script><script src="https://csdnimg.cn/release/download_crawler_static/js/pdf2htmlEX.min.js"></script><script>try{pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});}catch(e){}</script><title></title></head><body><div id="sidebar" style="display: none"><div id="outline"></div></div><div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/10667206/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">NeHe OpenGL教程索引</div><div class="c x0 y2 w0 h3"><div class="t m0 x2 h4 y3 ff1 fs1 fc1 sc0 ls0 ws0">课程索引</div><div class="t m0 x3 h5 y4 ff1 fs2 fc2 sc0 ls0 ws0">在这个课程上介绍的知识,可能会有错误和问题。但我只想尽我的全力去制作一个针对初</div><div class="t m0 x3 h5 y5 ff1 fs2 fc2 sc0 ls0 ws0">学者的课程,让他们在学习感到轻松和简单。如果你对于学习OpenGL很认真,我建议</div><div class="t m0 x3 h5 y6 ff1 fs2 fc2 sc0 ls0 ws0">你购买OpenGL Red Book(ISBN 0-201-46138-2)和OpenGL Blue Book,它们是至今为止最好</div><div class="t m0 x3 h5 y7 ff1 fs2 fc2 sc0 ls0 ws0">的参考书。另一本我要推荐的书是OpenGL Superbible,当然你也可以选择其它的。当你在</div><div class="t m0 x3 h5 y8 ff1 fs2 fc2 sc0 ls0 ws0">这个网站上学习时,你应该多浏览一下其它的站点,如<span class="fc1">OpenGL.org</span>. 你也可以浏览一些</div><div class="t m0 x3 h5 y9 ff1 fs2 fc2 sc0 ls0 ws0">我提供的链接,大部分站点都是由一些非常优秀的编程人员创建的,它们很多都比我出</div><div class="t m0 x3 h5 ya ff1 fs2 fc2 sc0 ls0 ws0">色。我希望你能喜欢我提供给你的帮助,并且希望看到在不久的将来你能创建出你自己</div><div class="t m0 x3 h5 yb ff1 fs2 fc2 sc0 ls0 ws0">的程序。</div><div class="t m0 x3 h5 yc ff1 fs2 fc2 sc0 ls0 ws0">最后一件重要的事是我的基础代码是在1997年写的,如果有什么改动的话,请留意我的</div><div class="t m0 x3 h5 yd ff1 fs2 fc2 sc0 ls0 ws0">网站:</div><div class="t m0 x3 h5 ye ff1 fs2 fc2 sc0 ls0 ws0">http://nehe.gamedev.net/default.asp </div><div class="t m0 x4 h6 yf ff1 fs3 fc2 sc0 ls0 ws0">创建一个<span class="ff2">OpenGL</span>窗口<span class="ff2">:</span></div><div class="t m0 x5 h5 y10 ff1 fs2 fc2 sc0 ls0 ws0">在这个教程里,我将教你在Windows环境中创</div><div class="t m0 x5 h5 y11 ff1 fs2 fc2 sc0 ls0 ws0">建OpenGL程序.它将显示一个空的OpenGL</div><div class="t m0 x5 h5 y12 ff1 fs2 fc2 sc0 ls0 ws0">窗口,可以在窗口和全屏模式下切换,按ESC</div><div class="t m0 x5 h5 y13 ff1 fs2 fc2 sc0 ls0 ws0">退出.它是我们以后应用程序的框架.</div><div class="t m0 x5 h5 y14 ff1 fs2 fc2 sc0 ls0 ws0">理解OpenGL如何工作非常重要,你可以在</div><div class="t m0 x5 h5 y15 ff1 fs2 fc2 sc0 ls0 ws0">教程的末尾下载源程序,但我强烈建议你至</div><div class="t m0 x5 h5 y16 ff1 fs2 fc2 sc0 ls0 ws0">少读一遍教程,然后再开始编程. </div></div><div class="t m0 x1 h2 y17 ff1 fs0 fc0 sc0 ls0 ws0">file:///F|/网站/周炜的主页/OpenGL/Nehe/index.htm(第 1/18 页)2006-8-21 7:42:46</div><a class="l"><div class="d m1"></div></a><a class="l"><div class="d m1"></div></a></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div></body></html>
<div id="pf2" class="pf w0 h0" data-page-no="2"><div class="pc pc2 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/10667206/bg2.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">NeHe OpenGL教程索引</div><div class="c x0 y2 w0 h3"><div class="t m0 x6 h6 y18 ff1 fs3 fc2 sc0 ls0 ws0">你的第一个多边形<span class="ff2">:</span></div><div class="t m0 x5 h5 y19 ff1 fs2 fc2 sc0 ls0 ws0">在第一个教程的基础上,我们添加了一个三</div><div class="t m0 x5 h5 y1a ff1 fs2 fc2 sc0 ls0 ws0">角形和一个四边形。也许你认为这很简单,</div><div class="t m0 x5 h5 y1b ff1 fs2 fc2 sc0 ls0 ws0">但你已经迈出了一大步,要知道任何在</div><div class="t m0 x5 h5 y1c ff1 fs2 fc2 sc0 ls0 ws0">OpenGL中绘制的模型都会被分解为这两种</div><div class="t m0 x5 h5 y1d ff1 fs2 fc2 sc0 ls0 ws0">简单的图形。</div><div class="t m0 x5 h5 y1e ff1 fs2 fc2 sc0 ls0 ws0">读完了这一课,你会学到如何在空间放置模</div><div class="t m0 x5 h5 y1f ff1 fs2 fc2 sc0 ls0 ws0">型,并且会知道深度缓存的概念。</div><div class="t m0 x7 h6 y20 ff1 fs3 fc2 sc0 ls0 ws0">添加颜色<span class="ff2">:</span></div><div class="t m0 x5 h5 y21 ff1 fs2 fc2 sc0 ls0 ws0">作为第二课的扩展,我将叫你如何使用颜</div><div class="t m0 x5 h5 y22 ff1 fs2 fc2 sc0 ls0 ws0">色。你将理解两种着色模式,在左图中,三</div><div class="t m0 x5 h5 y23 ff1 fs2 fc2 sc0 ls0 ws0">角形用的是光滑着色,四边形用的是平面着</div><div class="t m0 x5 h5 y24 ff1 fs2 fc2 sc0 ls0 ws0">色。</div><div class="t m0 x8 h6 y25 ff1 fs3 fc2 sc0 ls0 ws0">旋转<span class="ff2">:</span></div><div class="t m0 x5 h5 y26 ff1 fs2 fc2 sc0 ls0 ws0">在这一课里,我将教会你如何旋转三角形和</div><div class="t m0 x5 h5 y27 ff1 fs2 fc2 sc0 ls0 ws0">四边形。左图中的三角形沿Y轴旋转,四边</div><div class="t m0 x5 h5 y28 ff1 fs2 fc2 sc0 ls0 ws0">形沿着X轴旋转。</div></div><div class="t m0 x1 h2 y17 ff1 fs0 fc0 sc0 ls0 ws0">file:///F|/网站/周炜的主页/OpenGL/Nehe/index.htm(第 2/18 页)2006-8-21 7:42:46</div><a class="l"><div class="d m1"></div></a><a class="l"><div class="d m1"></div></a><a class="l"><div class="d m1"></div></a></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div>
<div id="pf3" class="pf w0 h0" data-page-no="3"><div class="pc pc3 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/10667206/bg3.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">NeHe OpenGL教程索引</div><div class="c x0 y2 w0 h3"><div class="t m0 x9 h6 y18 ff2 fs3 fc2 sc0 ls0 ws0">3D<span class="ff1">空间</span>:</div><div class="t m0 x5 h5 y29 ff1 fs2 fc2 sc0 ls0 ws0">我们使用多边形和四边形创建3D物体,在</div><div class="t m0 x5 h5 y2a ff1 fs2 fc2 sc0 ls0 ws0">这一课里,我们把三角形变为立体的金子塔</div><div class="t m0 x5 h5 y2b ff1 fs2 fc2 sc0 ls0 ws0">形状,把四边形变为立方体。</div><div class="t m0 x7 h6 y20 ff1 fs3 fc2 sc0 ls0 ws0">纹理映射<span class="ff2">:</span></div><div class="t m0 x5 h5 y2c ff1 fs2 fc2 sc0 ls0 ws0">在这一课里,我将教会你如何把纹理映射到</div><div class="t m0 x5 h5 y2d ff1 fs2 fc2 sc0 ls0 ws0">立方体的六个面。</div><div class="t m0 xa h6 y25 ff1 fs3 fc2 sc0 ls0 ws0">光照和键盘控制<span class="ff2">:</span></div><div class="t m0 x5 h5 y2e ff1 fs2 fc2 sc0 ls0 ws0">在这一课里,我们将添加光照和键盘控制,</div><div class="t m0 x5 h5 y2f ff1 fs2 fc2 sc0 ls0 ws0">它让程序看起来更美观。</div></div><div class="t m0 x1 h2 y17 ff1 fs0 fc0 sc0 ls0 ws0">file:///F|/网站/周炜的主页/OpenGL/Nehe/index.htm(第 3/18 页)2006-8-21 7:42:46</div><a class="l"><div class="d m1"></div></a><a class="l"><div class="d m1"></div></a><a class="l"><div class="d m1"></div></a></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div>
<div id="pf4" class="pf w0 h0" data-page-no="4"><div class="pc pc4 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/10667206/bg4.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">NeHe OpenGL教程索引</div><div class="c x0 y2 w0 h3"><div class="t m0 x8 h6 y18 ff1 fs3 fc2 sc0 ls0 ws0">混合<span class="ff2">:</span></div><div class="t m0 x5 h5 y29 ff1 fs2 fc2 sc0 ls0 ws0">在这一课里,我们在纹理的基础上加上了混</div><div class="t m0 x5 h5 y2a ff1 fs2 fc2 sc0 ls0 ws0">合,它看起具有透明的效果,当然解释它不</div><div class="t m0 x5 h5 y2b ff1 fs2 fc2 sc0 ls0 ws0">是那么容易,当希望你喜欢它。</div><div class="t m0 xb h6 y20 ff2 fs3 fc2 sc0 ls0 ws0">3D<span class="ff1">空间中移动图像</span>:</div><div class="t m0 x5 h5 y30 ff1 fs2 fc2 sc0 ls0 ws0">你想知道如何在3D空间中移动物体,你想</div><div class="t m0 x5 h5 y31 ff1 fs2 fc2 sc0 ls0 ws0">知道如何在屏幕上绘制一个图像,而让图像</div><div class="t m0 x5 h5 y32 ff1 fs2 fc2 sc0 ls0 ws0">的背景色变为透明,你希望有一个简单的动</div><div class="t m0 x5 h5 y33 ff1 fs2 fc2 sc0 ls0 ws0">画。这一课将教会你所有的一切。前面的课</div><div class="t m0 x5 h5 y34 ff1 fs2 fc2 sc0 ls0 ws0">程涵盖了基础的OpenGL,每一课都是在前</div><div class="t m0 x5 h5 y35 ff1 fs2 fc2 sc0 ls0 ws0">一课的基础上创建的。这一课是前面几课知</div><div class="t m0 x5 h5 y36 ff1 fs2 fc2 sc0 ls0 ws0">识的综合,当你学习这课时,请确保你已经</div><div class="t m0 x5 h5 y37 ff1 fs2 fc2 sc0 ls0 ws0">掌握了前面几课的知识。</div><div class="t m0 xc h6 y25 ff1 fs3 fc2 sc0 ls0 ws0">加载<span class="ff2">3D</span>世界,并在其中漫游<span class="ff2">:</span></div><div class="t m0 x5 h5 y38 ff1 fs2 fc2 sc0 ls0 ws0">在这一课中,你将学会如何加载3D世界,</div><div class="t m0 x5 h5 y39 ff1 fs2 fc2 sc0 ls0 ws0">并在3D世界中漫游。这一课使用第一课的</div><div class="t m0 x5 h5 y3a ff1 fs2 fc2 sc0 ls0 ws0">代码,当然在课程说明中我只介绍改变了代</div><div class="t m0 x5 h5 y3b ff1 fs2 fc2 sc0 ls0 ws0">码。</div></div><div class="t m0 x1 h2 y17 ff1 fs0 fc0 sc0 ls0 ws0">file:///F|/网站/周炜的主页/OpenGL/Nehe/index.htm(第 4/18 页)2006-8-21 7:42:46</div><a class="l"><div class="d m1"></div></a><a class="l"><div class="d m1"></div></a><a class="l"><div class="d m1"></div></a></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div>
<div id="pf5" class="pf w0 h0" data-page-no="5"><div class="pc pc5 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/10667206/bg5.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">NeHe OpenGL教程索引</div><div class="c x0 y2 w0 h3"><div class="t m0 xd h6 y18 ff1 fs3 fc2 sc0 ls0 ws0">飘动的旗帜<span class="ff2">:</span></div><div class="t m0 x5 h5 y29 ff1 fs2 fc2 sc0 ls0 ws0">这一课从第六课的代码开始,创建一个飘动</div><div class="t m0 x5 h5 y2a ff1 fs2 fc2 sc0 ls0 ws0">的旗帜。我相信在这课结束的时候,你可以</div><div class="t m0 x5 h5 y2b ff1 fs2 fc2 sc0 ls0 ws0">掌握纹理映射和混合操作。</div><div class="t m0 x7 h6 y20 ff1 fs3 fc2 sc0 ls0 ws0">显示列表<span class="ff2">:</span></div><div class="t m0 x5 h5 y21 ff1 fs2 fc2 sc0 ls0 ws0">想知道如何加速你的OpenGL程序么?这一</div><div class="t m0 x5 h5 y22 ff1 fs2 fc2 sc0 ls0 ws0">课将告诉你如何使用OpenGL的显示列表,</div><div class="t m0 x5 h5 y23 ff1 fs2 fc2 sc0 ls0 ws0">它通过预编译OpenGL命令来加速你的程</div><div class="t m0 x5 h5 y24 ff1 fs2 fc2 sc0 ls0 ws0">序,并可以为你省去很多重复的代码。</div><div class="t m0 x7 h6 y25 ff1 fs3 fc2 sc0 ls0 ws0">图像字体<span class="ff2">:</span></div><div class="t m0 x5 h5 y38 ff1 fs2 fc2 sc0 ls0 ws0">这一课我们将创建一些基于2D图像的字</div><div class="t m0 x5 h5 y39 ff1 fs2 fc2 sc0 ls0 ws0">体,它们可以缩放,但不能旋转,并且总是</div><div class="t m0 x5 h5 y3a ff1 fs2 fc2 sc0 ls0 ws0">面向前方,但作为基本的显示来说,我想已</div><div class="t m0 x5 h5 y3b ff1 fs2 fc2 sc0 ls0 ws0">经够了。</div></div><div class="t m0 x1 h2 y17 ff1 fs0 fc0 sc0 ls0 ws0">file:///F|/网站/周炜的主页/OpenGL/Nehe/index.htm(第 5/18 页)2006-8-21 7:42:46</div><a class="l"><div class="d m1"></div></a><a class="l"><div class="d m1"></div></a><a class="l"><div class="d m1"></div></a></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div>