OpenGL (R) سوپر کتاب: آموزش و مرجع جامع
OpenGL (R) SuperBible: Comprehensive Tutorial and Reference
معرفی کتاب «OpenGL (R) سوپر کتاب: آموزش و مرجع جامع» (با عنوان لاتین OpenGL (R) SuperBible: Comprehensive Tutorial and Reference) نوشتهٔ Richard S. Wright, Benjamin Lipchak, Nicholas Haemel, Wright, Richard S., Richard S. Wright Jr., Michael R. Sweet، منتشرشده توسط نشر Addison-Wesley Professional در سال 2007. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
**__OpenGL__** **__® SuperBible, Fourth Edition__**, begins by illuminating the core techniques of “classic” OpenGL graphics programming, from drawing in space to geometric transformations, from lighting to texture mapping. The authors cover newer OpenGL capabilities, including OpenGL 2.1’s powerful programmable pipeline, vertex and fragment shaders, and advanced buffers. They also present thorough, up-to-date introductions to OpenGL implementations on multiple platforms, including Windows, Mac OS X, GNU/Linux, UNIX, and embedded systems. Coverage includes · An entirely new chapter on OpenGL ES programming for handhelds · Completely rewritten chapters on OpenGL for Mac OS X and GNU/Linux · Up-to-the-minute coverage of OpenGL on Windows Vista · New material on floating-point color buffers and off-screen rendering · In-depth introductions to 3D modeling and object composition · Expert techniques for utilizing OpenGL’s programmable shading language · Thorough coverage of curves, surfaces, interactive graphics, textures, shadows, and much more · A fully updated API reference, and an all-new section of full-color images You’ll rely on this book constantly–whether you’re learning OpenGL for the first time, deepening your graphics programming expertise, upgrading from older versions of OpenGL, or porting applications from other environments. **Now part of the OpenGL Technical Library–The official knowledge resource for OpenGL developers** The OpenGL Technical Library provides tutorial and reference books for OpenGL. The Library enables programmers to gain a practical understanding of OpenGL and shows them how to unlock its full potential. Originally developed by SGI, the Library continues to evolve under the auspices of the OpenGL Architecture Review Board (ARB) Steering Group (now part of the Khronos Group), an industry consortium responsible for guiding the evolution of OpenGL and related technologies. **Contents** Preface xxvii About the Authors xxxv Introduction 1 **Part I: The Old Testament** Chapter 1 Introduction to 3D Graphics and OpenGL 9 Chapter 2 Using OpenGL 33 Chapter 3 Drawing in Space: Geometric Primitives and Buffers 73 Chapter 4 Geometric Transformations: The Pipeline 127 Chapter 5 Color, Materials, and Lighting: The Basics 173 Chapter 6 More on Colors and Materials 229 Chapter 7 Imaging with OpenGL 251 Chapter 8 Texture Mapping: The Basics 303 Chapter 9 Texture Mapping: Beyond the Basics 341 Chapter 10 Curves and Surfaces 377 Chapter 11 It’s All About the Pipeline: Faster Geometry Throughput 421 Chapter 12 Interactive Graphics 457 Chapter 13 Occlusion Queries: Why Do More Work Than You Need To? 481 Chapter 14 Depth Textures and Shadows 495 **Part II: The New Testament** Chapter 15 Programmable Pipeline: This Isn’t Your Father’s OpenGL 515 Chapter 16 Vertex Shading: Do-It-Yourself Transform, Lighting, and Texgen 547 Chapter 17 Fragment Shading: Empower Your Pixel Processing 567 Chapter 18 Advanced Buffers 601 **Part III: The Apocrypha** Chapter 19 Wiggle: OpenGL on Windows 641 Chapter 20 OpenGL on Mac OS X 685 Chapter 21 OpenGL on Linux 713 Chapter 22 OpenGL ES — OpenGL on the Small 735 Appendix A Further Reading/References 773 Appendix B Glossary 777 Appendix C API Reference 783 Index 1141 OpenGL superbible, 4th Edition......Page 1 Table of Contents......Page 12 Preface......Page 28 About the Authors......Page 36 What’s New in This Edition......Page 38 Part I: The Old Testament......Page 39 Part III: The Apocrypha......Page 41 About the Companion Web Site......Page 42 Part I: The Old Testament......Page 44 A Brief History of Computer Graphics......Page 46 A Survey of 3D Effects......Page 51 Common Uses for 3D Graphics......Page 56 Basic 3D Programming Principles......Page 60 Summary......Page 67 What Is OpenGL?......Page 70 How Does OpenGL Work?......Page 75 OpenGL: An API, Not a Language......Page 78 API Specifics......Page 80 Platform Independence......Page 83 Animation with OpenGL and GLUT......Page 98 The OpenGL State Machine......Page 102 OpenGL Errors......Page 104 Identifying the Version......Page 105 Using Extensions......Page 106 Summary......Page 108 3 Drawing in Space: Geometric Primitives and Buffers......Page 110 Setting Up a 3D Canvas......Page 111 A 3D Point: The Vertex......Page 113 Draw Something!......Page 114 Setting the Point Size......Page 118 Drawing Lines in 3D......Page 122 Drawing Triangles in 3D......Page 131 Building Solid Objects......Page 135 Other Primitives......Page 144 Other Buffer Tricks......Page 154 Summary......Page 163 Is This the Dreaded Math Chapter?......Page 164 Understanding Transformations......Page 165 The Matrix: Mathematical Currency for 3D Graphics......Page 171 Using Projections......Page 183 Advanced Matrix Manipulation......Page 191 Moving Around in OpenGL Using Cameras and Actors......Page 198 Bringing It All Together......Page 202 Summary......Page 208 5 Color, Materials, and Lighting: The Basics......Page 210 What Is Color?......Page 211 PC Color Hardware......Page 214 PC Display Modes......Page 216 Using Color in OpenGL......Page 217 Color in the Real World......Page 223 Materials in the Real World......Page 227 Adding Light to a Scene......Page 229 Using a Light Source......Page 233 Lighting Effects......Page 244 Putting It All Together......Page 250 Shadows......Page 258 Summary......Page 264 Blending......Page 266 Applying Fog......Page 277 Accumulation Buffer......Page 281 Other Color Operations......Page 285 Summary......Page 287 7 Imaging with OpenGL......Page 288 Bitmaps......Page 289 Pixel Packing......Page 294 Pixmaps......Page 295 More Fun with Pixels......Page 305 The Imaging “Subset” and Pipeline......Page 320 Summary......Page 338 8 Texture Mapping: The Basics......Page 340 Loading Textures......Page 341 A Simple 2D Example......Page 348 Texture Environment......Page 353 Texture Parameters......Page 355 Texture Objects......Page 367 Summary......Page 376 Secondary Colour......Page 378 Anisotropic Filtering......Page 381 Texture Compression......Page 384 Texture Coordinate Generation......Page 387 Multitexture......Page 399 Texture Combiners......Page 406 Point Sprites......Page 408 Summary......Page 412 10 Curves and Surfaces......Page 414 Built-in Surfaces......Page 415 Bézier Curves and Surfaces......Page 425 NURBS......Page 438 Tessellation......Page 446 Summary......Page 456 11 It’s All About the Pipeline: Faster Geometry Throughput......Page 458 Display Lists......Page 459 Vertex Arrays......Page 465 Vertex Buffer Objects......Page 487 Summary......Page 492 12 Interactive Graphics......Page 494 Selection......Page 495 A Feedback Example......Page 510 Summary......Page 517 13 Occlusion Queries: Why Do More Work Than You Need To?......Page 518 The World Before Occlusion Queries......Page 519 Bounding Boxes......Page 522 Querying the Query Object......Page 527 Best Practices......Page 529 Summary......Page 530 14 Depth Textures and Shadows......Page 532 Be That Light......Page 533 A New Kind of Texture......Page 535 Draw the Shadows First?!......Page 537 And Then There Was Light......Page 538 Two Out of Three Ain’t Bad......Page 546 A Few Words About Polygon Offset......Page 547 Summary......Page 548 Part II: The New Testament......Page 550 15 Programmable Pipeline: This Isn't Your Father's OpenGL......Page 552 Out with the Old......Page 553 In with the New......Page 558 OpenGL Shading Language: A First Glimpse......Page 563 Managing GLSL Shaders......Page 565 Variables......Page 569 Expressions......Page 574 Control Flow......Page 578 Summary......Page 582 16 Vertex Shading: Do-It-Yourself Transform, Lighting, and Texgen......Page 584 Getting Your Feet Wet......Page 585 Diffuse Lighting......Page 586 Specular Lighting......Page 588 Improved Specular Lighting......Page 590 Per-Vertex Fog......Page 594 Per-Vertex Point Size......Page 597 Customized Vertex Transformation......Page 598 Vertex Blending......Page 600 Summary......Page 603 17 Fragment Shading: Empower Your Pixel Processing......Page 604 Color Conversion......Page 605 Image Processing......Page 611 Lighting......Page 619 Procedural Texture Mapping......Page 624 Summary......Page 637 Pixel Buffer Objects......Page 638 Framebuffer Objects......Page 645 Floating-Point Textures......Page 659 Making Your Whites Whiter and Your Brights Brighter......Page 667 Summary......Page 675 Part III: The Apocrypha......Page 676 19 Wiggle: OpenGL on Windows......Page 678 OpenGL Implementations on Windows......Page 679 Basic Windows Rendering......Page 682 Putting It All Together......Page 692 OpenGL and Windows Fonts......Page 703 Full-Screen Rendering......Page 708 Multithreaded Rendering......Page 712 OpenGL and WGL Extensions......Page 713 Summary......Page 721 20 OpenGL on Mac OS X......Page 722 GLUT......Page 723 OpenGL with Carbon......Page 726 OpenGL with Cocoa......Page 736 Full-Screen Rendering......Page 743 Summary......Page 748 The Basics......Page 750 Setup......Page 751 GLUT......Page 754 GLX—Dealing with the X Windows Interface......Page 755 Putting It All Together......Page 766 Summary......Page 771 OpenGL on a Diet......Page 772 Which Version Is Right for You?......Page 775 The ES Environment......Page 791 EGL: A New Windowing Environment......Page 794 Negotiating Embedded Environments......Page 803 Putting OpenGL ES into Action......Page 804 Summary......Page 809 3D Graphics Books......Page 810 Web Sites......Page 811 B......Page 814 E......Page 815 O......Page 816 S......Page 817 W......Page 818 Overview of Appendix C......Page 820 Index......Page 1178 A......Page 1181 B......Page 1182 C......Page 1184 D......Page 1188 E......Page 1190 F......Page 1194 G......Page 1196 H......Page 1215 I......Page 1216 L......Page 1217 M......Page 1219 N......Page 1221 O......Page 1222 P......Page 1224 R......Page 1229 S......Page 1230 T......Page 1235 V......Page 1238 W......Page 1239 X–Z......Page 1241 OpenGL superbible, 4th Edition 1 Table of Contents 12 Preface 28 About the Authors 36 Introduction 38 What’s New in This Edition 38 How This Book Is Organized 39 Part I: The Old Testament 39 Part II: The New Testament 41 Part III: The Apocrypha 41 Conventions Used in This Book 42 About the Companion Web Site 42 Part I: The Old Testament 44 1 Introduction to 3D Graphics and OpenGL 46 A Brief History of Computer Graphics 46 A Survey of 3D Effects 51 Common Uses for 3D Graphics 56 Basic 3D Programming Principles 60 Summary 67 2 Using OpenGL 70 What Is OpenGL? 70 How Does OpenGL Work? 75 OpenGL: An API, Not a Language 78 API Specifics 80 Platform Independence 83 Animation with OpenGL and GLUT 98 The OpenGL State Machine 102 OpenGL Errors 104 Identifying the Version 105 Getting a Clue with glHint 106 Using Extensions 106 Summary 108 3 Drawing in Space: Geometric Primitives and Buffers 110 Drawing Points in 3D 111 Setting Up a 3D Canvas 111 A 3D Point: The Vertex 113 Draw Something! 114 Setting the Point Size 118 Drawing Lines in 3D 122 Drawing Triangles in 3D 131 Building Solid Objects 135 Other Primitives 144 Other Buffer Tricks 154 Summary 163 4 Geometric Transformations: The Pipeline 164 Is This the Dreaded Math Chapter? 164 Understanding Transformations 165 The Matrix: Mathematical Currency for 3D Graphics 171 Using Projections 183 Advanced Matrix Manipulation 191 Moving Around in OpenGL Using Cameras and Actors 198 Bringing It All Together 202 Summary 208 5 Color, Materials, and Lighting: The Basics 210 What Is Color? 211 PC Color Hardware 214 PC Display Modes 216 Using Color in OpenGL 217 Color in the Real World 223 Materials in the Real World 227 Adding Light to a Scene 229 Using a Light Source 233 Lighting Effects 244 Putting It All Together 250 Shadows 258 Summary 264 6 More on Colors and Materials 266 Blending 266 Applying Fog 277 Accumulation Buffer 281 Other Color Operations 285 Summary 287 7 Imaging with OpenGL 288 Bitmaps 289 Pixel Packing 294 Pixmaps 295 More Fun with Pixels 305 The Imaging “Subset” and Pipeline 320 Summary 338 8 Texture Mapping: The Basics 340 Loading Textures 341 A Simple 2D Example 348 Texture Environment 353 Texture Parameters 355 Texture Objects 367 Summary 376 9 Texture Mapping: Beyond the Basics 378 Secondary Colour 378 Anisotropic Filtering 381 Texture Compression 384 Texture Coordinate Generation 387 Multitexture 399 Texture Combiners 406 Point Sprites 408 Summary 412 10 Curves and Surfaces 414 Built-in Surfaces 415 Bézier Curves and Surfaces 425 NURBS 438 Tessellation 446 Summary 456 11 It’s All About the Pipeline: Faster Geometry Throughput 458 Display Lists 459 Vertex Arrays 465 Vertex Buffer Objects 487 Summary 492 12 Interactive Graphics 494 Selection 495 A Feedback Example 510 Summary 517 13 Occlusion Queries: Why Do More Work Than You Need To? 518 The World Before Occlusion Queries 519 Bounding Boxes 522 Querying the Query Object 527 Best Practices 529 Summary 530 14 Depth Textures and Shadows 532 Be That Light 533 A New Kind of Texture 535 Draw the Shadows First?! 537 And Then There Was Light 538 Two Out of Three Ain’t Bad 546 A Few Words About Polygon Offset 547 Summary 548 Part II: The New Testament 550 15 Programmable Pipeline: This Isn't Your Father's OpenGL 552 Out with the Old 553 In with the New 558 OpenGL Shading Language: A First Glimpse 563 Managing GLSL Shaders 565 Variables 569 Expressions 574 Control Flow 578 Summary 582 16 Vertex Shading: Do-It-Yourself Transform, Lighting, and Texgen 584 Getting Your Feet Wet 585 Diffuse Lighting 586 Specular Lighting 588 Improved Specular Lighting 590 Per-Vertex Fog 594 Per-Vertex Point Size 597 Customized Vertex Transformation 598 Vertex Blending 600 Summary 603 17 Fragment Shading: Empower Your Pixel Processing 604 Color Conversion 605 Image Processing 611 Lighting 619 Procedural Texture Mapping 624 Summary 637 18 Advanced Buffers 638 Pixel Buffer Objects 638 Framebuffer Objects 645 Floating-Point Textures 659 Making Your Whites Whiter and Your Brights Brighter 667 Summary 675 Part III: The Apocrypha 676 19 Wiggle: OpenGL on Windows 678 OpenGL Implementations on Windows 679 Basic Windows Rendering 682 Putting It All Together 692 OpenGL and Windows Fonts 703 Full-Screen Rendering 708 Multithreaded Rendering 712 OpenGL and WGL Extensions 713 Summary 721 20 OpenGL on Mac OS X 722 GLUT 723 OpenGL with Carbon 726 OpenGL with Cocoa 736 Full-Screen Rendering 743 Summary 748 21 OpenGL on Linux 750 The Basics 750 Setup 751 GLUT 754 GLX—Dealing with the X Windows Interface 755 Putting It All Together 766 Summary 771 22 OpenGL ES: OpenGL on the Small 772 OpenGL on a Diet 772 Which Version Is Right for You? 775 The ES Environment 791 EGL: A New Windowing Environment 794 Negotiating Embedded Environments 803 Putting OpenGL ES into Action 804 Summary 809 A: Further Reading/References 810 Other Good OpenGL Books 810 3D Graphics Books 810 Web Sites 811 B: Glossary 814 A 814 B 814 C 815 D 815 E 815 F 816 G 816 I 816 K 816 L 816 M 816 N 816 O 816 P 817 Q 817 R 817 S 817 T 818 V 818 W 818 C: API Reference 820 Overview of Appendix C 820 Index 1178 A 1181 B 1182 C 1184 D 1188 E 1190 F 1194 G 1196 H 1215 I 1216 J-K 1217 L 1217 M 1219 N 1221 O 1222 P 1224 Q 1229 R 1229 S 1230 T 1235 U 1238 V 1238 W 1239 X–Z 1241 OpenGL SuperBible, Third Edition is a comprehensive, hands-on guide that provides everything you need to program with the new version of OpenGL. This newly expanded edition covers OpenGL 1.5, OpenGL 2.0's Shading Language, ARB low-level shader extensions, and programming details for Windows, Mac OS X, and Linux. Designed for programmers who want to master OpenGL and expand their knowledge of graphics programming and 3D graphics, and also for seasoned OpenGL programmers who need assistance porting their applications, this learning tool serves as both a tutorial and a reference manual that can be used time and again. Find the necessary guidance in applying complex concepts, such as drawing in space; points, lines, and polygons; moving around in space; color, lighting, and materials; raster graphics in OpenGL; texture mapping; 3D modeling and object composition; fog and blending visual effects; curves and surfaces, and more.Learn how to: * Create three-dimensional objects on your PC * Move your objects or yourself around in a virtual world * Use techniques for fast real-time rendering on Windows, Mac OS X, and Linux. * Make use of OpenGL hardware acceleration * Create interactive three-dimensional scenes * Take advantage of programmable graphics hardware with the new OpenGL shading language CD-ROM includes: * Complete source code for all example programs (Windows, Mac OS X, and Linux) * The GLUT Library and Render Monkey for Windows * Demo Version of Right Hemisphere's Deep Exploration * The Complete OpenGL specification in Adobe Acrobat Format * A Collection of additional OpenGL example programs" The Barnes & Noble Review For years, thousands of OpenGL programmers have relied on the OpenGL SuperBible . If you want to leverage OpenGL 2.1's major improvements, you really need the Fourth Edition. It's a comprehensive tutorial, systematic API reference, and massive code library, all in one. You'll start with the fundamental techniques every graphics programmer needs: transformations, lighting, texture mapping, and so forth. Then, building on those basics, you'll move towards newer capabilities, from advanced buffers to vertex shaders. Of course, OpenGL's cross-platform availability remains one of its most compelling features. This book's extensive multiplatform coverage has been thoroughly rewritten, and now addresses everything from Windows Vista to OpenGL ES for handhelds. This is stuff you absolutely want the latest edition for. A small but telling point: This book's recently been invited into Addison-Wesley's OpenGL Series, making it an "official" OpenGL book -- and making a powerful statement about its credibility. Bill Camarda, from the August 2007 (
دانلود کتاب OpenGL (R) سوپر کتاب: آموزش و مرجع جامع