OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.5 with SPIR-V

OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.5 with SPIR-V

OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.5 with SPIR-V

OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.5 with SPIR-V

eBook

$50.49  $66.99 Save 25% Current price is $50.49, Original price is $66.99. You Save 25%.

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

Complete Coverage of OpenGL® 4.5—the Latest Version (Includes 4.5, 4.4, SPIR-V, and Extensions)

 

The latest version of today’s leading worldwide standard for computer graphics, OpenGL 4.5 delivers significant improvements in application efficiency, flexibility, and performance. OpenGL 4.5 is an exceptionally mature and robust platform for programming high-quality computer-generated images and interactive applications using 2D and 3D objects, color images, and shaders.

 

OpenGL® Programming Guide, Ninth Edition, presents definitive, comprehensive information on OpenGL 4.5, 4.4, SPIR-V, OpenGL extensions, and the OpenGL Shading Language. It will serve you for as long as you write or maintain OpenGL code.

 

This edition of the best-selling “Red Book” fully integrates shader techniques alongside classic, function-centric approaches, and contains extensive code examples that demonstrate modern techniques. Starting with the fundamentals, its wide-ranging coverage includes drawing, color, pixels, fragments, transformations, textures, framebuffers, light and shadow, and memory techniques for advanced rendering and nongraphical applications. It also offers discussions of all shader stages, including thorough explorations of tessellation, geometric, and compute shaders.

 

New coverage in this edition includes

  • Thorough coverage of OpenGL 4.5 Direct State Access (DSA), which overhauls the OpenGL programming model and how applications access objects
  • Deeper discussions and more examples of shader functionality and GPU processing, reflecting industry trends to move functionality onto graphics processors
  • Demonstrations and examples of key features based on community feedback and suggestions
  • Updated appendixes covering the latest OpenGL libraries, related APIs, functions, variables, formats, and debugging and profiling techniques

Product Details

ISBN-13: 9780134495538
Publisher: Pearson Education
Publication date: 07/25/2016
Series: OpenGL
Sold by: Barnes & Noble
Format: eBook
Pages: 976
Sales rank: 989,600
File size: 56 MB
Note: This product may take a few minutes to download.
Age Range: 18 Years

About the Author

John M. Kessenich, staff software engineer at Google and creator of SPIR-V, has been active in OpenGL and GLSL Khronos standards’ development since 1999. He is the primary editor of the SPIR-V and GLSL specifications, and creates shader compiler tools and translators to promote portability of those standards.

 

Graham Sellers, AMD Software Architect and Engineering Fellow, is a Khronos API lead and represents AMD at the OpenGL ARB. He has contributed to the core Vulkan and OpenGL specs and extensions, and holds several graphics and image processing patents.

 

Dave Shreiner is a twenty-five year veteran of the computer graphics industry, where he’s worked almost exclusively with programming interfaces like OpenGL. In addition to having written and taught instructional courses on using computer graphics APIs, he was also the lead author for almost ten years on several Addison-Wesley publications relating to computer graphics.

Table of Contents

Figures xxi

Tables xxvii

Examples xxxi

About This Guide xxxix

Acknowledgments xlv

 

Chapter 1: Introduction to OpenGL 1

What Is OpenGL? 2

Your First Look at an OpenGL Program 4

OpenGL Syntax 8

OpenGL’s Rendering Pipeline 10

Our First Program: A Detailed Discussion 14

 

Chapter 2: Shader Fundamentals 33

Shaders and OpenGL 34

OpenGL’s Programmable Pipeline 35

An Overview of the OpenGL Shading Language 37

Interface Blocks 61

Compiling Shaders 72

Shader Subroutines 79

Separate Shader Objects 84

SPIR-V 86

 

Chapter 3: Drawing with OpenGL 95

OpenGL Graphics Primitives 96

Data in OpenGL Buffers 102

Vertex Specification 117

OpenGL Drawing Commands 124

 

Chapter 4: Color, Pixels, and Fragments 151

Basic Color Theory 152

Buffers and Their Uses 154

Color and OpenGL 158

Testing and Operating on Fragments 163

Multisampling 185

Per-Primitive Antialiasing 188

Reading and Copying Pixel Data 191

Copying Pixel Rectangles 193

 

Chapter 5: Viewing Transformations, Culling, Clipping, and Feedback 197

Viewing 198

User Transformations 203

OpenGL Transformations 226

Transform Feedback 231

 

Chapter 6: Textures and Framebuffers 255

Introduction to Texturing 257

Basic Texture Types 258

Creating and Initializing Textures 260

Specifying Texture Data 265

Texture Formats 279

Compressed Textures 285

Sampler Objects 288

Using Textures 291

Complex Texture Types 302

Texture Views 317

Filtering 321

Bindless Textures 337

Sparse Textures 341

Point Sprites 344

Framebuffer Objects 348

Rendering to Texture Maps 351

Chapter Summary 370

 

Chapter 7: Light and Shadow 373

Lighting Introduction 374

Classic Lighting Model 375

Advanced Lighting Models 399

Shadow Mapping 413

 

Chapter 8: Procedural Texturing 423

Procedural Texturing 424

Bump Mapping 444

Antialiasing Procedural Textures 454

Noise 472

Further Information 495

 

Chapter 9: Tessellation Shaders 497

Tessellation Shaders 498

Tessellation Patches 499

Tessellation Control Shaders 500

Tessellation Evaluation Shaders 508

A Tessellation Example: The Teapot 512

Additional Tessellation Techniques 516

 

Chapter 10: Geometry Shaders 521

Creating a Geometry Shader 523

Geometry Shader Inputs and Outputs 526

Producing Primitives 537

Advanced Transform Feedback 544

Geometry Shader Instancing 561

Multiple Viewports and Layered Rendering 562

Chapter Summary 572

 

Chapter 11: Memory 577

Using Textures for Generic Data Storage 578

Shader Storage Buffer Objects 589

Atomic Operations and Synchronization 591

Example: Order-Independent Transparency 621

 

Chapter 12: Compute Shaders 635

Overview 636

Workgroups and Dispatch 637

Communication and Synchronization 644

Examples 648

Chapter Summary 659

 

Appendix A: Support Libraries 663

Basics of GLFW: The OpenGL Utility Framework 664

Initializing and Creating a Window 664

Handling User Input 667

Controlling the Window 671

Shutting Down Cleanly 675

GL3W: OpenGL Glue 676

 

Appendix B: OpenGL ES and WebGL 679

OpenGL ES 680

WebGL 682

 

Appendix C: Built-in GLSL Variables and Functions 693

Built-in Variables 693

Built-in Constants 705

Built-in Functions 707

 

Appendix D: State Variables 757

The Query Commands 757

OpenGL State Variables 765

 

Appendix E: Homogeneous Coordinates and Transformation Matrices 849

Homogeneous Coordinates 849

Transformation Matrices 851

 

Appendix F: Floating-Point Formats for Textures, Framebuffers, and Renderbuffers 855

Reduced-Precision Floating-Point Values 855

16-Bit Floating-Point Values 856

10- and 11-Bit Unsigned Floating-Point Values 858

 

Appendix G: Debugging and Profiling OpenGL 863

Creating a Debug Context 863

Debug Output 866

Debug Groups 874

Profiling 877

 

Appendix H: Buffer Object Layouts 883

Using Standard Layout Qualifiers 883

The std140 Layout Rules 884

The std430 Layout Rules 885

 

Glossary 887

Index 917

From the B&N Reads Blog

Customer Reviews