OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 2.1, 6/e
暫譯: OpenGL 程式設計指南:學習 OpenGL 的官方指南,第 2.1 版,第 6 版
OpenGL Architecture Review Board, Dave Shreiner, Mason Woo, Jackie Neider, Tom Davis
- 出版商: Addison Wesley
- 出版日期: 2007-08-09
- 售價: $2,710
- 貴賓價: 9.5 折 $2,575
- 語言: 英文
- 頁數: 928
- 裝訂: Paperback
- ISBN: 0321481003
- ISBN-13: 9780321481009
-
相關分類:
OpenGL
已過版
買這商品的人也買了...
-
$1,176Computer Organization and Design: The Hardware/Software Interface, 3/e(IE) (美國版ISBN:1558606041)
-
$1,078Operating System Principles, 7/e(IE) (美國版ISBN:0471694665-Operating System Concepts, 7/e) (平裝)
-
$680$646 -
$880$695 -
$880$695 -
$1,225Data Structures and Algorithms in Java, 4/e
-
$650$514 -
$780$663 -
$550$468 -
$980$774 -
$1,200$1,176 -
$680$537 -
$480$379 -
$1,200$948 -
$350$298 -
$880$695 -
$990$891 -
$290$226 -
$490$387 -
$600$480 -
$1,200$1,020 -
$980$774 -
$450$351 -
$490$387 -
$480$374
相關主題
商品描述
Description
The Macintosh has fully embraced OpenGL throughout its visual systems. In fact, Apple's highly efficient, modern OpenGL implementation makes Mac OS X one of today's best platforms for OpenGL development. OpenGL® Programming on Mac OS® X is the first comprehensive resource for every graphics programmer who wants to create, port, or optimize OpenGL applications for this high-volume platform.
Leading OpenGL experts Bob Kuehne and J. D. Sullivan thoroughly explain the Macintosh's diverse OpenGL APIs, both old and new. They illuminate crucial OpenGL setup, configuration, and performance issues that are unique to the Macintosh platform. Next, they offer practical, start-to-finish guidance for integrating key Mac-native APIs with OpenGL, and leveraging the full power of the Macintosh platform in your graphics applications. Coverage includes
- A thorough review of the Macintosh's hardware and software architectures and their performance implications
- In-depth, expert guidance for accessing OpenGL from each of the Mac's core APIs: CGL, AGL, and Cocoa
- Interoperating with other Mac APIs: incorporating video with QuickTime, performing image effects with Core Image, and processing CoreVideo data
- Analyzing Mac OpenGL application performance, resolving bottlenecks, and leveraging optimizations only available on the Mac
- Detecting, integrating, and using OpenGL extensions
An accompanying Web site contains all example code, plus additional OpenGL-related resources.
This book will be especially valuable to current Macintosh programmers seeking to leverage OpenGL's power; all OpenGL developers porting their applications to the high-volume Mac platform; and cross-platform graphics developers who want to access more of the Mac platform's native power
Table of Contents
Figures xxi
Tables xxv
Examples xxix
About This Guide xxxv
- What This Guide Contains xxxv
What's New in This Edition xxxviii
What You Should Know Before Reading This Guide xxxviii
How to Obtain the Sample Code xxxix
Nate Robins' OpenGL Tutors xl
Errata xl
Style Conventions xlAcknowledgments xliii
Chapter 1: Introduction to OpenGL 1
- What Is OpenGL? 2
A Smidgen of OpenGL Code 5
OpenGL Command Syntax 7
OpenGL as a State Machine 9
OpenGL Rendering Pipeline 10
OpenGL-Related Libraries 14
Animation 20Chapter 2: State Management and Drawing Geometric Objects 27
- A Drawing Survival Kit 29
Describing Points, Lines, and Polygons 37
Basic State Management 48
Displaying Points, Lines, and Polygons 50
Normal Vectors 63
Vertex Arrays 65
Buffer Objects 82
Attribute Groups 91
Some Hints for Building Polygonal Models of Surfaces 94Chpater 3: Viewing 103
- Overview: The Camera Analogy 106
Viewing and Modeling Transformations 117
Projection Transformations 133
Viewport Transformation 138
Troubleshooting Transformations 142
Manipulating the Matrix Stacks 145
Additional Clipping Planesv 149
Examples of Composing Several Transformations 152
Reversing or Mimicking Transformations 160Chapter 4: Color 165
- Color Perception 166
Computer Color 168
RGBA versus Color-Index Mode 170
Specifying a Color and a Shading Model 176Chapter 5: Lighting 183
- A Hidden-Surface Removal Survival Kit 185
Real-World and OpenGL Lighting 187
A Simple Example: Rendering a Lit Sphere 190
Creating Light Sources 194
Selecting a Lighting Model 207
Defining Material Properties 211
The Mathematics of Lighting 220
Lighting in Color-Index Mode 226Chapter 6: Blending, Antialiasing, Fog, and Polygon Offset 229
- Blending 231
Antialiasing 247
Fogv 261
Point Parameters 271
Polygon Offset v274Chapter 7: Display Lists 277
- Why Use Display Lists? 278
An Example of Using a Display List 279
Display List Design Philosophy v282
Creating and Executing a Display List 285
Executing Multiple Display v292
Managing State Variables with Display Lists 297Chapter 8: Drawing Pixels, Bitmaps, Fonts, and Images 301
- Bitmaps and Fonts 303
Images 312
Imaging Pipeline 321
Reading and Drawing Pixel Rectangles 337
Using Buffer Objects with Pixel Rectangle Data 341
Tips for Improving Pixel Drawing Rates 345
Imaging Subsetv 346Chapter 9: Texture Mapping 369
- An Overview and an Example 375
Specifying the Texture 380
Filtering 411
Texture Objects 414
Texture Functions 421
Assigning Texture Coordinates 425
Automatic Texture-Coordinate Generation 434
Multitexturing 443
Texture Combiner Functions 449
Applying Secondary Color after Texturing 455
Sprites 456
The Texture Matrix Stack 457
Depth Textures 459Chapter 10: The Framebuffer 465
- Buffers and Their Uses 468
Testing and Operating on Fragments 475
The Accumulation Bufferv 490Chapter 11: Tessellators and Quadrics 505
- Polygon Tessellation 506
Quadrics: Rendering Spheres, Cylinders, and Disks 523Chapter 12: Evaluators and NURBS 533
- Prerequisites 535
Evaluatorsv 536
The GLU NURBS Interface 550Chapter 13: Selection and Feedback 569
- Selection 570Feedbackv 591
Chapter 14: Now That You Knowv 599
- Error Handling 601
Which Version Am I Using? 603
Extensions to the Standard 605
Cheesy Translucency 608
An Easy Fade Effect 608
Object Selection Using the Back Buffer 610
Cheap Image Transformation 611
Displaying Layers 612
Antialiased Characters 613
Drawing Round Points 616
Interpolating Images 616
Making Decals 616
Drawing Filled, Concave Polygons Using the Stencil Buffer 618
Finding Interference Regions 619
Shadows 621
Hidden-Line Removal 622
Texture Mapping Applications 624
Drawing Depth-Buffered Images 625
Dirichlet Domains 625
Life in the Stencil Buffer 627
Alternative Uses for glDrawPixels() and glCopyPixels() 628Chapter 15: The OpenGL Shading Language 631
- The OpenGL Graphics Pipeline and Programmable Shading 632
Using GLSL Shaders 636
The OpenGL Shading Language 644
Creating Shaders with GLSL 645
Accessing Texture Maps in Shaders 661
Shader Preprocessor 664Appendix A: Order of Operations 679
- Overview 680
Geometric Operations 681
Pixel Operations 682
Fragment Operations 683Odds and Ends 684Appendix B: State Variables 685
- The Query Commands 686
OpenGL State Variables 688Appendix C: OpenGL and Window Systems 735
- Accessing New OpenGL Functions 736
GLX: OpenGL Extension for the X Window System 737
AGL: OpenGL Extensions for the Apple Macintosh 744
PGL: OpenGL Extension for IBM OS/2 Warp 749
WGL: OpenGL Extension for Microsoft Windows 95/98/NT/ME/2000/XP 753Appendix D: Basics of GLUT: The OpenGL Utility Toolkit 759
- Initializing and Creating a Window 760
Handling Window and Input Events 761
Loading the Color Map 763
Initializing and Drawing Three-Dimensional Objects 763
Managing a Background Process 765
Running the Program 765Appendix E: Calculating Normal Vectors 767
- Finding Normals for Analytic Surfaces 769
Finding Normals from Polygonal Data 771Appendix F: Homogeneous Coordinates and Transformation Matrices 773
- Homogeneous Coordinates 774
Transformation Matrices 775Appendix G: Programming Tips 779
- OpenGL Correctness Tips 780
OpenGL Performance Tips 782
GLX Tips 784Appendix H: OpenGL Invariance 785
Appendix I: Built-In OpenGL Shading Language Variables and Functions 789
- Variables 790
Built-In Functions 802Glossary 815
Index 837
商品描述(中文翻譯)
**描述**
Macintosh 在其視覺系統中全面採用了 OpenGL。事實上,Apple 高效且現代的 OpenGL 實現使得 Mac OS X 成為當今最佳的 OpenGL 開發平台之一。《OpenGL® Programming on Mac OS® X》是每位希望為這個高需求平台創建、移植或優化 OpenGL 應用程序的圖形程序員的第一本綜合資源。
領先的 OpenGL 專家 Bob Kuehne 和 J. D. Sullivan 徹底解釋了 Macintosh 的多樣 OpenGL API,包括舊版和新版。他們闡明了獨特於 Macintosh 平台的關鍵 OpenGL 設置、配置和性能問題。接下來,他們提供了從頭到尾的實用指導,幫助將關鍵的 Mac 原生 API 與 OpenGL 整合,並在您的圖形應用程序中充分利用 Macintosh 平台的全部功能。內容包括:
- 對 Macintosh 硬體和軟體架構及其性能影響的徹底回顧
- 從 Mac 的每個核心 API(CGL、AGL 和 Cocoa)訪問 OpenGL 的深入專家指導
- 與其他 Mac API 的互操作:使用 QuickTime 整合視頻、使用 Core Image 執行圖像效果,以及處理 CoreVideo 數據
- 分析 Mac OpenGL 應用程序性能、解決瓶頸,並利用僅在 Mac 上可用的優化
- 檢測、整合和使用 OpenGL 擴展
隨書附帶的網站包含所有示例代碼以及其他與 OpenGL 相關的資源。
本書對於希望利用 OpenGL 強大功能的現有 Macintosh 程序員、將其應用程序移植到高需求 Mac 平台的所有 OpenGL 開發者,以及希望訪問更多 Mac 平台原生功能的跨平台圖形開發者將特別有價值。
**目錄**
**圖表** xxii
**表格** xxv
**示例** xxix
**關於本指南** xxxv
本指南包含的內容 xxxv
本版的新內容 xxxviii
在閱讀本指南之前您應該知道的 xxxviii
如何獲取示例代碼 xxxix
Nate Robins 的 OpenGL 教學 xl
勘誤 xl
風格慣例 xl
**致謝** xliii
**第 1 章:OpenGL 簡介** 1
- OpenGL 是什麼? 2
- 一小段 OpenGL 代碼 5
- OpenGL 命令語法 7
- OpenGL 作為狀態機 9
- OpenGL 渲染管線 10
- 與 OpenGL 相關的庫 14
- 動畫 20
**第 2 章:狀態管理與繪製幾何物件** 27
- 繪製生存工具包 29
- 描述點、線和多邊形 37
- 基本狀態管理 48
- 顯示點、線和多邊形 50
- 法向量 63
- 頂點數組 65
- 緩衝物件 82
- 屬性組 91
- 建立表面多邊形模型的一些提示 94
**第 3 章:視圖** 103
- 概述:相機類比 106
- 視圖和建模變換 117
- 投影變換 133
- 視口變換 138
- 故障排除變換 142
- 操作矩陣堆疊 145
- 附加裁剪平面 149
- 組合多個變換的示例 152
- 反轉或模仿變換 160
**第 4 章:顏色** 165
- 顏色感知 166
- 電腦顏色 168
- RGBA 與顏色索引模式 170
- 指定顏色和著色模型 176
**第 5 章:照明** 183
- 隱藏表面移除生存工具包 185
- 現實世界與 OpenGL 照明 187
- 簡單示例:渲染一個發光的球體 190
- 創建光源 194
- 選擇照明模型 207
- 定義材料屬性 211
- 照明的數學 220
- 顏色索引模式下的照明 226
**第 6 章:混合、抗鋸齒、霧和多邊形偏移** 229
- 混合 231
- 抗鋸齒 247
- 霧 261
- 點參數 271
- 多邊形偏移 274
**第 7 章:顯示列表** 277
- 為什麼使用顯示列表? 278
- 使用顯示列表的示例 279
- 顯示列表設計哲學 282
- 創建和執行顯示列表 285
- 執行多個顯示列表 292
- 使用顯示列表管理狀態變數 297
**第 8 章:繪製像素、位圖、字型和圖像** 301
- 位圖和字型 303
- 圖像 312
- 成像管線 321
- 讀取和繪製像素矩形 337
- 使用緩衝物件處理像素矩形數據 341
- 提高像素繪製速率的提示 345
- 成像子集 346
**第 9 章:紋理映射** 369
- 概述和示例 375
- 指定紋理 380
- 過濾 411
- 紋理物件 414
- 紋理函數 421
- 指定紋理坐標 425
- 自動紋理坐標生成 434
- 多重紋理 443
- 紋理合併函數 449
- 紋理後應用次要顏色 455
- 精靈 456
- 紋理矩陣堆疊 457
- 深度紋理 459
**第 10 章:幀緩衝區** 465
- 緩衝區及其用途 468
- 測試和操作片段 475
- 累積緩衝區 490
**第 11 章:細分器和二次曲面** 505
- 多邊形細分 506
- 二次曲面:渲染球體、圓柱和圓盤 523
**第 12 章:評估器和 NURBS** 533
- 前提條件 535
- 評估器 536
- GLU NURBS 接口 550
**第 13 章:選擇和反饋** 569
- 選擇 570
- 反饋 591
**第 14 章:現在您知道了** 599
- 錯誤處理 601
- 我正在使用哪個版本? 603
- 標準的擴展 605
- 簡單的半透明效果 608
- 簡單的淡出效果 608
- 使用後緩衝區進行物件選擇 610
- 便宜的圖像變換 611
- 顯示圖層 612
- 抗鋸齒字元 613
- 繪製圓形點 616
- 插值圖像 616
- 製作貼花 616
- 使用模板緩衝區繪製填充的凹多邊形 618
- 尋找干擾區域 619
- 陰影 621
- 隱藏線移除 622
- 紋理映射應用 624
- 繪製深度緩衝圖像 625
- Dirichlet 領域 625
- 在模板緩衝區中的生活 627
- glDrawPixels() 和 glCopyPixels() 的替代用途 628
**第 15 章:OpenGL 著色語言** 631
- OpenGL 圖形管線和可編程著色 632
- 使用 GLSL 著色器 636
- OpenGL 著色語言 644
- 使用 GLSL 創建著色器 645
- 在著色器中訪問紋理圖 661
- 著色器預處理器 664
**附錄 A:操作順序** 679
- 概述 680
- 幾何操作