Figures |
|
xv | |
Tables |
|
xxi | |
Listings |
|
xxiii | |
Foreword |
|
xxxi | |
Preface |
|
xxxiii | |
|
The Architecture of the Book |
|
|
xxxiv | |
|
What's New in This Edition |
|
|
xxxvi | |
|
How to Build the Examples |
|
|
xxxvii | |
|
|
xxxviii | |
|
|
xxxviii | |
Acknowledgments |
|
xxxix | |
About the Author |
|
xli | |
I Foundations |
|
1 | (238) |
|
|
3 | (10) |
|
OpenGL and the Graphics Pipeline |
|
|
4 | (2) |
|
The Origins and Evolution of OpenGL |
|
|
6 | (4) |
|
|
8 | (2) |
|
Primitives, Pipelines, and Pixels |
|
|
10 | (1) |
|
|
11 | (2) |
|
2 Our First OpenGL Program |
|
|
13 | (14) |
|
Creating a Simple Application |
|
|
14 | (3) |
|
|
17 | (7) |
|
Drawing Our First Triangle |
|
|
24 | (2) |
|
|
26 | (1) |
|
|
27 | (28) |
|
Passing Data to the Vertex Shader |
|
|
28 | (2) |
|
|
28 | (2) |
|
Passing Data from Stage to Stage |
|
|
30 | (3) |
|
|
31 | (2) |
|
|
33 | (4) |
|
Tessellation Control Shaders |
|
|
33 | (2) |
|
|
35 | (1) |
|
Tessellation Evaluation Shaders |
|
|
35 | (2) |
|
|
37 | (2) |
|
Primitive Assembly, Clipping, and Rasterization |
|
|
39 | (4) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
41 | (2) |
|
|
43 | (1) |
|
|
43 | (4) |
|
|
47 | (1) |
|
|
47 | (1) |
|
|
48 | (1) |
|
Using Extensions in OpenGL |
|
|
49 | (5) |
|
Enhancing OpenGL with Extensions |
|
|
50 | (4) |
|
|
54 | (1) |
|
|
55 | (44) |
|
Is This the Dreaded Math Chapter |
|
|
56 | (1) |
|
A Crash Course in 3D Graphics Math |
|
|
57 | (12) |
|
Vectors, or Which Way Is Which? |
|
|
57 | (3) |
|
|
60 | (4) |
|
|
64 | (2) |
|
Matrix Construction and Operators |
|
|
66 | (3) |
|
Understanding Transformations |
|
|
69 | (20) |
|
Coordinate Spaces in OpenGL |
|
|
70 | (2) |
|
Coordinate Transformations |
|
|
72 | (8) |
|
Concatenating Transformations |
|
|
80 | (1) |
|
|
81 | (2) |
|
|
83 | (3) |
|
Projection Transformations |
|
|
86 | (3) |
|
Interpolation, Lines, Curves, and Splines |
|
|
89 | (8) |
|
|
91 | (3) |
|
|
94 | (3) |
|
|
97 | (2) |
|
|
99 | (106) |
|
|
100 | (17) |
|
Creating Buffers and Allocating Memory |
|
|
100 | (7) |
|
Filling and Copying Data in Buffers |
|
|
107 | (2) |
|
Feeding Vertex Shaders from Buffers |
|
|
109 | (8) |
|
|
117 | (23) |
|
|
117 | (4) |
|
|
121 | (14) |
|
Using Uniforms to Transform Geometry |
|
|
135 | (5) |
|
|
140 | (7) |
|
Synchronizing Access to Memory |
|
|
145 | (2) |
|
|
147 | (5) |
|
Synchronizing Access to Atomic Counters |
|
|
151 | (1) |
|
|
152 | (51) |
|
Creating and Initialzing Textures |
|
|
152 | (2) |
|
Texture Targets and Types |
|
|
154 | (2) |
|
Reading from Textures in Shaders |
|
|
156 | (4) |
|
Loading Textures from Files |
|
|
160 | (4) |
|
Controlling How Texture Data Is Read |
|
|
164 | (13) |
|
|
177 | (5) |
|
Writing to Textures in Shaders |
|
|
182 | (12) |
|
Synchronizing Access to Images |
|
|
194 | (1) |
|
|
195 | (4) |
|
|
199 | (4) |
|
|
203 | (2) |
|
|
205 | (34) |
|
|
206 | (13) |
|
|
206 | (7) |
|
|
213 | (6) |
|
Compiling, Linking, and Examining Programs |
|
|
219 | (19) |
|
Getting Information from the Compiler |
|
|
219 | (4) |
|
Getting Information from the Linker |
|
|
223 | (2) |
|
|
225 | (6) |
|
|
231 | (4) |
|
|
235 | (3) |
|
|
238 | (1) |
II In Depth |
|
239 | (326) |
|
7 Vertex Processing and Drawing Commands |
|
|
241 | (64) |
|
|
242 | (7) |
|
|
242 | (5) |
|
|
247 | (2) |
|
|
249 | (29) |
|
|
249 | (6) |
|
|
255 | (14) |
|
|
269 | (9) |
|
Storing Transformed Vertices |
|
|
278 | (18) |
|
|
279 | (5) |
|
Starting, Pausing, and Stopping Transform Feedback |
|
|
284 | (2) |
|
Ending the Pipeline with Transform Feedback |
|
|
286 | (1) |
|
Transform Feedback Example: Physical Simulation |
|
|
286 | (10) |
|
|
296 | (7) |
|
|
300 | (3) |
|
|
303 | (2) |
|
|
305 | (60) |
|
|
306 | (27) |
|
Tessellation Primitive Modes |
|
|
307 | (9) |
|
Tessellation Subdivision Modes |
|
|
316 | (3) |
|
Passing Data between Tessellation Shaders |
|
|
319 | (3) |
|
Communication between Shader Invocations |
|
|
322 | (1) |
|
Tessellation Example: Terrain Rendering |
|
|
323 | (6) |
|
Tessellation Example: Cubic Bezier Patches |
|
|
329 | (4) |
|
|
333 | (31) |
|
The Pass-Through Geometry Shader |
|
|
334 | (2) |
|
Using Geometry Shaders in an Application |
|
|
336 | (5) |
|
Discarding Geometry in the Geometry Shader |
|
|
341 | (3) |
|
Modifying Geometry in the Geometry Shader |
|
|
344 | (2) |
|
Generating Geometry in the Geometry Shader |
|
|
346 | (3) |
|
Changing the Primitive Type in the Geometry Shader |
|
|
349 | (3) |
|
Multiple Streams of Storage |
|
|
352 | (1) |
|
New Primitive Types Introduced by the Geometry Shader |
|
|
353 | (8) |
|
Multiple Viewport Transformations |
|
|
361 | (3) |
|
|
364 | (1) |
|
9 Fragment Processing and the Framebuffer |
|
|
365 | (102) |
|
|
366 | (3) |
|
Interpolation and Storage Qualifiers |
|
|
366 | (3) |
|
|
369 | (13) |
|
|
369 | (3) |
|
|
372 | (4) |
|
|
376 | (4) |
|
|
380 | (2) |
|
|
382 | (8) |
|
|
382 | (5) |
|
|
387 | (1) |
|
|
388 | (2) |
|
|
390 | (22) |
|
Multiple Framebuffer Attachments |
|
|
395 | (2) |
|
|
397 | (6) |
|
|
403 | (4) |
|
|
407 | (5) |
|
|
412 | (16) |
|
Antialiasing by Filtering |
|
|
413 | (2) |
|
Multi-Sample Antialiasing |
|
|
415 | (2) |
|
|
417 | (4) |
|
|
421 | (3) |
|
|
424 | (4) |
|
Advanced Framebuffer Formats |
|
|
428 | (20) |
|
Rendering with No Attachments |
|
|
428 | (2) |
|
Floating-Point Framebuffers |
|
|
430 | (14) |
|
|
444 | (2) |
|
|
446 | (2) |
|
|
448 | (10) |
|
|
449 | (1) |
|
|
450 | (3) |
|
|
453 | (1) |
|
|
454 | (2) |
|
|
456 | (2) |
|
|
458 | (8) |
|
Reading from a Framebuffer |
|
|
458 | (3) |
|
Copying Data between Framebuffers |
|
|
461 | (3) |
|
Reading Back Texture Data |
|
|
464 | (2) |
|
|
466 | (1) |
|
|
467 | (36) |
|
|
468 | (11) |
|
Executing Compute Shaders |
|
|
469 | (5) |
|
Compute Shader Communication |
|
|
474 | (5) |
|
|
479 | (23) |
|
Compute Shader Parallel Prefix Sum |
|
|
479 | (13) |
|
|
492 | (10) |
|
|
502 | (1) |
|
11 Advanced Data Management |
|
|
503 | (30) |
|
|
504 | (5) |
|
Sparsely Populated Textures |
|
|
509 | (7) |
|
|
516 | (9) |
|
The RGTC Compression Scheme |
|
|
516 | (3) |
|
Generating Compressed Data |
|
|
519 | (6) |
|
|
525 | (2) |
|
High-Quality Texture Filtering |
|
|
527 | (4) |
|
|
531 | (2) |
|
12 Controlling and Monitoring the Pipeline |
|
|
533 | (32) |
|
|
534 | (22) |
|
|
535 | (10) |
|
|
545 | (4) |
|
Transform Feedback Queries |
|
|
549 | (6) |
|
|
555 | (1) |
|
Synchronization in OpenGL |
|
|
556 | (6) |
|
|
557 | (1) |
|
Synchronization and Fences |
|
|
557 | (5) |
|
|
562 | (3) |
III In Practice |
|
565 | (178) |
|
|
567 | (94) |
|
|
568 | (42) |
|
|
568 | (9) |
|
|
577 | (2) |
|
|
579 | (3) |
|
|
582 | (5) |
|
|
587 | (10) |
|
|
597 | (2) |
|
|
599 | (6) |
|
|
605 | (5) |
|
Non-Photo-Realistic Rendering |
|
|
610 | (3) |
|
Cell Shading: Texels as Light |
|
|
610 | (3) |
|
Alternative Rendering Methods |
|
|
613 | (34) |
|
|
613 | (11) |
|
|
624 | (7) |
|
Rendering without Triangles |
|
|
631 | (16) |
|
|
647 | (12) |
|
|
647 | (9) |
|
|
656 | (3) |
|
|
659 | (2) |
|
14 High-Performance OpenGL |
|
|
661 | (68) |
|
Optimizing CPU Performance |
|
|
661 | (16) |
|
Multi-Threading in OpenGL |
|
|
662 | (6) |
|
|
668 | (9) |
|
|
677 | (22) |
|
|
678 | (5) |
|
|
683 | (8) |
|
|
691 | (8) |
|
Performance Analysis Tools |
|
|
699 | (27) |
|
Windows Performance Toolkit and GPUView |
|
|
699 | (4) |
|
|
703 | (3) |
|
Tuning Your Application for Speed |
|
|
706 | (20) |
|
|
726 | (3) |
|
15 Debugging and Stability |
|
|
729 | (14) |
|
Debugging Your Applications |
|
|
730 | (7) |
|
|
730 | (7) |
|
|
737 | (5) |
|
|
737 | (3) |
|
|
740 | (2) |
|
|
742 | (1) |
A Further Reading |
|
743 | (6) |
B The SBM File Format |
|
749 | (10) |
C The SuperBible Tools |
|
759 | (38) |
Glossary |
|
797 | (8) |
Index |
|
805 | |