HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
OpenGL is a powerful software interface used to produce high-quality, computer-generated images and interactive applications using 2D and 3D objects, bitmaps, and color images.
The OpenGL® Programming Guide, Fifth Edition, provides definitive and comprehensive information on OpenGL and the OpenGL Utility Library. The previous edition covered OpenGL through Version 1.4. This fifth edition of the best-selling "red book" describes the latest features of OpenGL Versions 1.5 and 2.0, including the introduction of the OpenGL Shading Language.
You will find clear explanations of OpenGL functionality and many basic computer graphics techniques, such as building and rendering 3D models; interactively viewing objects from different perspective points; and using shading, lighting, and texturing effects for greater realism. In addition, this book provides in-depth coverage of advanced techniques, including texture mapping, antialiasing, fog and atmospheric effects, NURBS, image processing, and more. The text also explores other key topics such as enhancing performance, OpenGL extensions, and cross-platform techniques.
This fifth edition has been extensively updated to include the newest features of OpenGL Versions 1.5 and 2.0, including:
Most importantly, this edition discusses the OpenGL Shading Language (GLSL) and explains the mechanics of using this new language to create complex graphics effects and boost the computational power of OpenGL.
Download the Sample
Chapter related to this title.
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 20
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
Vertex Arrays in Buffer Objects 82
Attribute Groups 90
Some Hints for Building Polygonal Models of Surfaces 93
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 Planes 149
Examples of Composing Several Transformations 152
Reversing or Mimicking Transformations 160
Color Perception 166
Computer Color 168
RGBA versus Color-Index Mode 170
Specifying a Color and a Shading Model 176
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 226
Blending 231
Antialiasing 247
Fog 261
Point Parameters 271
Polygon Offset 274
Why Use Display Lists? 278
An Example of Using a Display List 279
Display List Design Philosophy 282
Creating and Executing a Display List 285
Executing Multiple Display Lists 292
Managing State Variables with Display Lists 297
Bitmaps and Fonts 303
Images 312
Reading and Drawing Pixel Rectangles 337
Tips for Improving Pixel Drawing Rates 341
Imaging Subset 342
An Overview and an Example 371
Specifying the Texture 375
Filtering 406
Texture Objects 409
Texture Functions 416
Assigning Texture Coordinates 420
Automatic Texture-Coordinate Generation 429
Multitexturing 438
Texture Combiner Functions 444
Applying Secondary Color after Texturing 450
The Texture Matrix Stack 451
Depth Textures 452
Buffers and Their Uses 460
Testing and Operating on Fragments 467
The Accumulation Buffer 482
Polygon Tessellation 498
Quadrics: Rendering Spheres, Cylinders, and Disks 515
Prerequisites 527
Evaluators 528
The GLU NURBS Interface 542
Selection 562
Feedback 583
Error Handling 593
Which Version Am I Using? 595
Extensions to the Standard 597
Cheesy Translucency 600
An Easy Fade Effect 600
Object Selection Using the Back Buffer 602
Cheap Image Transformation 603
Displaying Layers 604
Antialiased Characters 605
Drawing Round Points 608
Interpolating Images 608
Making Decals 608
Drawing Filled, Concave Polygons Using the Stencil Buffer 610
Finding Interference Regions 611
Shadows 613
Hidden-Line Removal 614
Texture Mapping Applications 616
Drawing Depth-Buffered Images 617
Dirichlet Domains 617
Life in the Stencil Buffer 619
Alternative Uses for glDrawPixels() and glCopyPixels() 620
Why OpenGL 20? 624
Point Sprites 624
The OpenGL Graphics Pipeline and Programmable Shading 626
Using GLSL Shaders 630
The OpenGL Shading Language 638
Creating Shaders with GLSL 639
Accessing Texture Maps in Shaders 653
Overview 666
Geometric Operations 667
Pixel Operations 668
Fragment Operations 669
Odds and Ends 670
The Query Commands 672
OpenGL State Variables 674
Accessing New OpenGL Functions 714
GLX: OpenGL Extension for the X Window System 715
AGL: OpenGL Extensions for the Apple Macintosh 722
PGL: OpenGL Extension for IBM OS/2 Warp 727
WGL: OpenGL Extension for Microsoft
Windows 95/98/NT/ME/2000/XP 731
Initializing and Creating a Window 738
Handling Window and Input Events 739
Loading the Color Map 741
Initializing and Drawing Three-Dimensional Objects 741
Managing a Background Process 743
Running the Program 743
Finding Normals for Analytic Surfaces 747
Finding Normals from Polygonal Data 749
Homogeneous Coordinates 752
Transformation Matrices 753
OpenGL Correctness Tips 758
OpenGL Performance Tips 760
GLX Tips 762
Variables 768
Built-In Functions 780
Download the Index
file related to this title.