没有合适的资源?快使用搜索试试~ 我知道了~
首页OpenGL超级宝典第五版:全面教程与参考
OpenGL超级宝典第五版:全面教程与参考
需积分: 33 3 下载量 117 浏览量
更新于2024-07-28
收藏 21.65MB PDF 举报
"《OpenGL超级宝典第五版(英文版)》是一本全面详尽的教程与参考书籍,由Richard S. Wright Jr., Nicholas Haemel, Graham Sellers和Benjamin Lipchak共同编著。本书专为那些对OpenGL编程感兴趣或已经在图形渲染领域工作的人设计,特别适合于希望深入理解并掌握OpenGL技术的专业人士。OpenGL是一种广泛应用于3D图形和计算机视觉领域的编程接口,被众多游戏开发、图形设计、虚拟现实等领域采用。
作为第五版,它包含了最新的OpenGL技术规格和最佳实践,旨在帮助读者从基础概念如顶点缓冲对象(Vertex Buffer Objects, VBOs)和着色器(Shader)开始,逐步学习到高级特性如多线程渲染和GPU计算。书中不仅涵盖了理论知识,还提供了大量的示例代码和实战项目,使读者能够在实践中巩固所学。
此外,由于版权原因,书中的某些制造商和供应商名称可能会使用商标标识,这些在本书中使用时会遵循特定格式以表示尊重。尽管作者和出版商已尽力确保内容的准确性,但本书不提供任何形式的明示或默示担保,也不承担因使用其中信息或程序导致的间接或附带损害的责任。
读者可以在www.wowebook.com网站上下载该资源,这对于持续学习和更新自己的OpenGL技能非常有价值。无论是专业开发者还是对图形编程有兴趣的学生,这本《OpenGL超级宝典第五版》都是不可或缺的参考资料,能够帮助他们在图形编程的道路上取得显著进步。"
ptg
Framebuffer Objects, Going Beyond the Window. ...................................336
How to Use FBOs ...............................................................................336
Renderbuffer Objects . .......................................................................337
Draw Buffers . ....................................................................................339
Framebuffer Completeness................................................................342
Copying Data in Framebuffers ..........................................................345
Putting It All Together—Using FBOs.................................................346
Rendering to Textures .................................................................................351
Summary .....................................................................................................358
9 Advanced Buffers: Beyond the Basics . ......................................................359
Getting at Your Data . .................................................................................359
Mapping Buffers ................................................................................360
Copying Buffers .................................................................................361
Controlling the Destiny of Your Pixel Shaders;
Mapping Fragment Outputs .....................................................................361
New Formats for a New Hardware Generation . ........................................364
Floats—True Precision at Last!...........................................................364
Multisampling....................................................................................380
Integers . ............................................................................................385
sRGB. .................................................................................................386
Texture Compression . .......................................................................387
Summary .....................................................................................................389
10 Fragment Operations: The End of the Pipeline .........................................391
Scissoring—Cutting Your Geometry Down To Size . .................................392
Multisampling. ...........................................................................................392
Sample Coverage................................................................................393
Sample Mask . ....................................................................................394
Putting It All Together. .....................................................................394
Stencil Operations.......................................................................................399
Depth Testing. ............................................................................................402
Depth Clamp .....................................................................................402
Blending Everything Together....................................................................402
Blend Equation ..................................................................................402
Blend Function ..................................................................................403
Putting It All Together.......................................................................404
Dithering .....................................................................................................406
Logic Ops ....................................................................................................407
Contents xv
Download from www.wowebook.com
ptg
Masking Output . ........................................................................................408
Color ..................................................................................................408
Depth .................................................................................................408
Stencil ................................................................................................408
Usage..................................................................................................409
Summary .....................................................................................................409
11 Advanced Shader Usage . ...........................................................................411
Advanced Vertex Shaders. ..........................................................................412
Physical Simulation in the Vertex Shader.........................................412
Geometry Shaders . .....................................................................................419
The Pass-Through Geometry Shader.................................................420
Using Geometry Shaders in an Application .....................................422
Discarding Geometry in the Geometry Shader ................................426
Modifying Geometry in the Geometry Shader.................................429
Generating Geometry in the Geometry Shader................................430
Changing the Primitive Type in the Geometry Shader....................434
New Primitive Types Introduced by the Geometry Shader ..............438
Advanced Fragment Shaders. .....................................................................441
Post-Processing in the Fragment Shader—Color Correction............442
Post-Processing in the Fragment Shader—Convolution. .................444
Generating Image Data in the Fragment Shader . ............................448
Discarding Work in the Fragment Shader. .......................................451
Controlling Depth Per Fragment . ....................................................453
More Advanced Shader Functions. ............................................................454
Interpolation and Storage Qualifiers.................................................454
Other Advanced Built-In Functions ..................................................458
Uniform Buffer Objects. .............................................................................460
Building Uniform Blocks ...................................................................461
Summary . ...................................................................................................470
12 Advanced Geometry Management . ..........................................................471
Gathering Information about the OpenGL Pipeline—Queries. ................472
Preparing a Query..............................................................................472
Issuing a Query ..................................................................................473
Retrieving Query Results ...................................................................474
Using the Results of a Query.............................................................475
Getting OpenGL to Make Decisions for You ....................................478
Measuring Time Taken to Execute Commands ................................480
OpenGL SuperBiblexvi
Download from www.wowebook.com
ptg
Storing Data in GPU Memory . ..................................................................483
Using Buffers to Store Vertex Data....................................................484
Storing Vertex Indices in Buffers. .....................................................489
Using Vertex Array Objects to Organize Your Buffers. ..............................490
Drawing a lot of Geometry Efficiently . .....................................................492
Combining Drawing Functions.........................................................492
Combining Geometry Using Primitive Restart.................................494
Instanced Rendering. ........................................................................496
Getting Your Data Automatically. ....................................................503
Storing Transformed Vertices—Transform Feedback. ................................508
Transform Feedback ...........................................................................509
Turning Off Rasterization ..................................................................514
Counting Vertices Using Primitive Queries ......................................515
Using the Results of a Primitive Query.............................................516
Example Uses for Transform Feedback..............................................517
Clipping and Determining What Should Be Drawn. ................................528
Clip Distances—Defining Your Own Custom Clip Space.................528
Synchronizing When OpenGL Begins to Draw . .......................................532
Summary . ...................................................................................................537
PART III Platform-Specific Notes ............................................................................539
13 OpenGL on Windows..................................................................................541
OpenGL Implementations on Windows . ..................................................542
Microsoft’s OpenGL...........................................................................542
Modern Graphics Drivers ..................................................................542
Extended OpenGL .............................................................................544
WGL Extensions ................................................................................545
Basic Windows Rendering ..........................................................................547
GDI Device Contexts.........................................................................547
Pixel Formats . ...................................................................................548
The OpenGL Rendering Context ......................................................556
Putting It All Together ................................................................................559
Creating the Window ........................................................................560
Full-Screen Rendering . ...............................................................................565
Double Buffering. .......................................................................................567
Eliminating Visual Tearing ................................................................567
Summary . ...................................................................................................568
Contents xvii
Download from www.wowebook.com
ptg
14 OpenGL on OS X.........................................................................................569
The Four Faces of OpenGL on the Mac. ....................................................569
OpenGL with Cocoa . .................................................................................570
Creating a Cocoa Program ................................................................571
Wiring It All Together. ......................................................................578
Double or Single Buffered?................................................................580
SphereWorld . ....................................................................................580
Full-Screen Rendering . ...............................................................................585
Going Full-Screen with Cocoa...........................................................586
CGL . ...........................................................................................................593
Sync Frame Rate.................................................................................593
Increasing Fill Performance ...............................................................594
Multithreaded OpenGL .....................................................................595
Summary .....................................................................................................595
15 OpenGL on Linux . ......................................................................................597
The Basics. ..................................................................................................597
Brief History.......................................................................................598
What Is X? .........................................................................................598
Getting Started . ..........................................................................................598
Checking for OpenGL .......................................................................599
Setting Up Mesa. ...............................................................................599
Setting Up Hardware Drivers. ...........................................................600
Setting Up GLUT and GLEW.............................................................600
Building OpenGL Apps......................................................................601
GLX—Interfacing with X Windows . .........................................................602
Displays and X Windows ..................................................................603
Config Management and Visuals ......................................................603
Windows and Render Surfaces ..........................................................607
Extending OpenGL and GLX ............................................................608
Context Management. ......................................................................609
Synchronization . ..............................................................................612
GLX Queries. .....................................................................................613
Putting It All Together. .....................................................................614
Summary .....................................................................................................617
OpenGL SuperBiblexviii
Download from www.wowebook.com
ptg
16 OpenGL ES on Mobile Devices . .................................................................619
OpenGL on a Diet. .....................................................................................619
What’s the ES For? .............................................................................620
A Brief History . .................................................................................620
Which Version Is Right for You? . ..............................................................622
ES 2.0..................................................................................................622
The ES Environment ...................................................................................627
Application Design Considerations. .................................................627
Dealing with a Limited Environment ...............................................628
Fixed-Point Math. .............................................................................629
EGL: A New Windowing Environment . ....................................................630
EGL Displays......................................................................................631
Creating a Window............................................................................632
Context Management........................................................................636
Presenting Buffers and Rendering Synchronization .........................636
More EGL Stuff ..................................................................................637
Negotiating Embedded Environments . .....................................................638
Popular Operating Systems. ..............................................................638
Vendor-Specific Extensions . .............................................................639
For the Home Gamer. .......................................................................639
Apple Handheld Platforms . .......................................................................639
Setting Up An iPhone Project. ..........................................................640
Moving to the iPhone . .....................................................................644
Summary .....................................................................................................652
Appendix A Further Reading ..........................................................................................653
Other Good OpenGL Books........................................................................653
3D Graphics Books. ....................................................................................653
Web Sites . ...................................................................................................654
Appendix B Glossary ......................................................................................................655
Appendix C OpenGL Man Pages for (Core) OpenGL 3.3 ..............................................661
Index............................................................................................................939
Contents xix
Download from www.wowebook.com
剩余1001页未读,继续阅读
2017-01-10 上传
点击了解资源详情
烈火风中丶
- 粉丝: 5
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功