没有合适的资源?快使用搜索试试~ 我知道了~
首页OpenGL编程指南:第四版详解与高级特性探索
收藏
"OpenGL超级宝典(第四版)是一本全面的教程和参考书籍,旨在教授读者使用新版本的OpenGL进行3D图形编程。作者包括Richard S. Wright, Jr., Benjamin Lipchak和Nicholas Haemel,他们通过23章的内容和3个附录,覆盖了从基础到高级的各种OpenGL技术。这本书分为三个部分:第一部分介绍OpenGL的基础知识,如3D图形入门,OpenGL空间绘图,几何变换,颜色、材质和光照,纹理贴图,曲线和表面,管线,以及交互式图形等。第二部分关注不同操作系统平台上的OpenGL实现和编程细节。第三部分则深入探讨高级功能和OpenGL 1.5的新特性。附录提供了更多的阅读资源、术语表和对OpenGL ES的简要介绍。随书附带的光盘包含了跨平台的示例程序源代码,以供实践和学习。这本书适合既有经验的OpenGL程序员进行应用移植,也适合初学者作为学习教材。"
OpenGL是一种广泛应用的图形库,用于在各种操作系统上创建复杂的3D图形。OpenGL超级宝典第四版详尽地介绍了其编程接口,包括基本的绘图操作、坐标系统、变换矩阵、颜色管理、光照模型以及纹理映射等概念。其中,3D图形和OpenGL简介帮助读者理解3D图形的基本原理和OpenGL的角色;几何转换章节讲解如何使用矩阵来移动、旋转和缩放对象;颜色、材料和光照部分介绍了如何模拟现实世界的视觉效果;纹理贴图则使3D物体表面具有真实感的图像;管线概念解释了OpenGL如何处理图形数据流;而交互式图形则涉及用户输入和实时响应。
对于不同操作系统平台,如Windows、Linux、Mac OS等,OpenGL的实现和编程细节可能存在差异,第二部分将指导读者如何在这些平台上有效地使用OpenGL。最后,高级功能包括高级渲染技术、顶点数组、顶点缓冲对象、着色器语言(GLSL)以及OpenGL 1.5引入的新特性,如顶点程序和帧缓冲对象,这些都是现代3D图形编程的关键组成部分。
本书不仅适合希望提升OpenGL技能的开发者,也适合想要深入3D图形编程的计算机图形学学生。通过丰富的示例代码和详细解释,读者可以逐步掌握OpenGL编程,从而创建出引人入胜的3D图形应用。
Color in the Real World..............................................................................186
Ambient Light....................................................................................187
Diffuse Light ......................................................................................188
Specular Light ....................................................................................188
Putting It All Together.......................................................................189
Materials in the Real World........................................................................190
Material Properties.............................................................................190
Adding Light to Materials..................................................................190
Calculating Ambient Light Effects ....................................................190
Diffuse and Specular Effects ..............................................................191
Adding Light to a Scene..............................................................................192
Enabling the Lighting........................................................................192
Setting Up Cosmic Background Radiation........................................192
Setting Material Properties ................................................................193
Using a Light Source ...................................................................................196
Which Way Is Up?.............................................................................197
Surface Normals.................................................................................197
Specifying a Normal ..........................................................................198
Unit Normals .....................................................................................201
Finding a Normal...............................................................................202
Setting Up a Source............................................................................203
Setting the Material Properties ..........................................................205
Specifying the Polygons ....................................................................205
Lighting Effects ...........................................................................................207
Specular Highlights............................................................................207
Specular Light ....................................................................................208
Specular Reflectance ..........................................................................208
Specular Exponent.............................................................................209
Normal Averaging..............................................................................211
Putting It All Together ................................................................................213
Creating a Spotlight...........................................................................214
Drawing a Spotlight...........................................................................216
Shadows.......................................................................................................221
What Is a Shadow? ............................................................................222
Squish Code .......................................................................................223
A Shadow Example ............................................................................223
Sphere World Revisited......................................................................227
Summary .....................................................................................................227
Contents xv
6 More on Colors and Materials....................................................................229
Blending ......................................................................................................229
Combining Colors .............................................................................230
Changing the Blending Equation .....................................................234
Antialiasing ........................................................................................234
Multisample .......................................................................................238
Applying Fog ...............................................................................................240
Fog Equations ....................................................................................242
Fog Coordinates.................................................................................244
Accumulation Buffer...................................................................................244
Other Color Operations..............................................................................248
Color Masking ...................................................................................248
Color Logical Operations...................................................................248
Alpha Testing .....................................................................................249
Dithering............................................................................................250
Summary .....................................................................................................250
7 Imaging with OpenGL ................................................................................251
Bitmaps........................................................................................................252
Bitmapped Data .................................................................................253
The Raster Position ............................................................................256
Pixel Packing ...............................................................................................257
Pixmaps .......................................................................................................258
Packed Pixel Formats .........................................................................260
A More Colorful Example..................................................................261
Moving Pixels Around .......................................................................265
Saving Pixels ......................................................................................266
More Fun with Pixels..................................................................................268
Pixel Zoom.........................................................................................275
Pixel Transfer .....................................................................................277
Pixel Mapping....................................................................................281
The Imaging “Subset” and Pipeline............................................................283
Color Matrix ......................................................................................288
Color Lookup.....................................................................................289
Proxies................................................................................................290
Other Operations...............................................................................291
Convolutions .....................................................................................292
Histogram ..........................................................................................297
Minmax Operations...........................................................................301
Summary .....................................................................................................301
OpenGL SuperBible, Fourth Editionxvi
8 Texture Mapping: The Basics .....................................................................303
Loading Textures.........................................................................................304
Using the Color Buffer ......................................................................307
Updating Textures..............................................................................307
Mapping Textures to Geometry ........................................................308
Texture Matrix ...................................................................................311
A Simple 2D Example .................................................................................311
Texture Environment..................................................................................316
Texture Parameters......................................................................................318
Basic Filtering.....................................................................................318
Texture Wrap .....................................................................................320
Cartoons with Texture.......................................................................321
Mipmapping ......................................................................................325
Texture Objects ...........................................................................................330
Managing Multiple Textures .............................................................331
Summary .....................................................................................................339
9 Texture Mapping: Beyond the Basics.........................................................341
Secondary Color..........................................................................................341
Anisotropic Filtering ...................................................................................344
Texture Compression ..................................................................................347
Compressing Textures........................................................................348
Loading Compressed Textures...........................................................349
Texture Coordinate Generation..................................................................350
Object Linear Mapping......................................................................354
Eye Linear Mapping...........................................................................355
Sphere Mapping.................................................................................356
Cube Mapping ...................................................................................357
Multitexture ................................................................................................362
Multiple Texture Coordinates ...........................................................363
A Multitextured Example ..................................................................364
Texture Combiners......................................................................................369
Point Sprites ................................................................................................371
Using Points.......................................................................................372
Texture Application ...........................................................................374
Point Parameters................................................................................374
Summary .....................................................................................................375
Contents xvii
10 Curves and Surfaces....................................................................................377
Built-in Surfaces ..........................................................................................378
Setting Quadric States........................................................................379
Drawing Quadrics ..............................................................................381
Modeling with Quadrics....................................................................385
Bézier Curves and Surfaces .........................................................................388
Parametric Representation.................................................................388
Evaluators...........................................................................................391
NURBS .........................................................................................................401
From Bézier to B-Splines....................................................................402
Knots ..................................................................................................402
Creating a NURBS Surface .................................................................403
NURBS Properties...............................................................................404
Defining the Surface ..........................................................................404
Trimming ...........................................................................................406
NURBS Curves....................................................................................409
Tessellation..................................................................................................409
The Tessellator ...................................................................................411
Tessellator Callbacks ..........................................................................412
Specifying Vertex Data ......................................................................413
Putting It All Together.......................................................................414
Summary .....................................................................................................419
11 It’s All About the Pipeline: Faster Geometry Throughput.........................421
Display Lists ................................................................................................422
Batch Processing ................................................................................423
Preprocessed Batches .........................................................................424
Display List Caveats...........................................................................426
Converting to Display Lists...............................................................426
Vertex Arrays ...............................................................................................428
Loading the Geometry ......................................................................432
Enabling Arrays..................................................................................432
Where’s the Data?..............................................................................433
Pull the Data and Draw .....................................................................434
Indexed Vertex Arrays .......................................................................435
Vertex Buffer Objects ..................................................................................450
Managing and Using Buffer Objects .................................................450
Back to the Thunderbird! ..................................................................452
Summary .....................................................................................................455
OpenGL SuperBible, Fourth Editionxviii
12 Interactive Graphics....................................................................................457
Selection ......................................................................................................458
Naming Your Primitives ....................................................................458
Working with Selection Mode...........................................................460
The Selection Buffer...........................................................................461
Picking ...............................................................................................464
Hierarchical Picking...........................................................................466
Feedback.............................................................................................471
The Feedback Buffer ..........................................................................471
Feedback Data....................................................................................472
Passthrough Markers .........................................................................473
A Feedback Example ...................................................................................473
Label the Objects for Feedback..........................................................473
Step 1: Select the Object....................................................................476
Step 2: Get Feedback on the Object ..................................................478
Summary .....................................................................................................480
13 Occlusion Queries: Why Do More Work Than You Need To? ...................481
The World Before Occlusion Queries .........................................................482
Bounding Boxes ..........................................................................................485
Querying the Query Object ........................................................................490
Best Practices ...............................................................................................492
Summary .....................................................................................................493
14 Depth Textures and Shadows.....................................................................495
Be That Light...............................................................................................496
Fit the Scene to the Window.............................................................496
No Bells or Whistles, Please...............................................................497
A New Kind of Texture ...............................................................................498
Size Matters........................................................................................499
Draw the Shadows First?!............................................................................500
And Then There Was Light.........................................................................501
Projecting Your Shadow Map: The “Why” .......................................501
Projecting Your Shadow Map: The “How”........................................503
The Shadow Comparison ..................................................................505
Two Out of Three Ain’t Bad........................................................................509
A Few Words About Polygon Offset ...........................................................510
Summary .....................................................................................................511
Contents xix
剩余1261页未读,继续阅读
相关推荐
automationer
- 粉丝: 128
- 资源: 123
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 乘风聚合图床源码 多接口
- 数码营销产品网页模板
- 贪吃蛇小游戏.rar
- Rolo-crx插件
- flutter-template:快速入门的Flutter模板
- servest:De适用于Deno的渐进式http服务器:sheaf_of_rice:
- ms12-020检测.rar
- generator-phaser-gulp-typescript:PhaserJs 游戏的 Gulp 打字稿生成器
- DanskKennelKlub
- itmonkey-cn-shopro-master.zip
- FE内容付费系统响应式v5.43 付费阅读文章+付费看图片+付费下载+付费视频播放+带手机版
- 5元“和”币模仿地球引力坠落效果
- General-PSS-ChnEng-IS-V4.06.12.R.130807.zip
- meteor-accounts-anonymous
- 可自定义圆形进度条Progress特效
- 超级商场:这是vue购物中心
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功