Home > Store

OpenGL Programming on Mac OS X: Architecture, Performance, and Integration

Register your product to gain access to bonus material or receive a coupon.

OpenGL Programming on Mac OS X: Architecture, Performance, and Integration

Premium Website

  • Sorry, this book is no longer in print.
Not for Sale


  • Copyright 2008
  • Edition: 1st
  • Premium Website
  • ISBN-10: 0-321-35652-7
  • ISBN-13: 978-0-321-35652-9

The Mac 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 Robert Kuehne and J. D. Sullivan thoroughly explain the Mac's diverse OpenGL APIs, both old and new. They illuminate crucial OpenGL setup, configuration, and performance issues that are unique to the Mac platform. Next, they offer practical, start-to-finish guidance for integrating key Mac-native APIs with OpenGL, and leveraging the full power of the Mac platform in your graphics applications.

Coverage includes

  • A thorough review of Mac 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 (www.macopenglbook.com) contains the book's example code, plus additional OpenGL-related resources.

OpenGL® Programming on Mac OS® X will be valuable to Mac programmers seeking to leverage OpenGL's power, OpenGL developers porting their applications to the Mac platform, and cross-platform graphics developers who want to take advantage of the Mac platform's uniquely intuitive style and efficiency.

Sample Content

Online Sample Chapter

The GLUT API for OpenGL Configuration

Downloadable Sample Chapter

Download the chapter

Table of Contents

List of Figures    xv
List of Tables    xix
List of Examples    xxi
Preface    xxv
Acknowledgments    xxix
About the Authors    xxxi

Chapter 1: Mac OpenGL Introduction    1

Why the Mac? 2
Why OpenGL? 3
The Book 4

Chapter 2: OpenGL Architecture on OS X    7

Overview 7
About OpenGL 7
OpenGL Feature Support 14
API Layers 15
The Mac OS OpenGL Plug-In Architecture 17
Renderers 18
Summary 21

Chapter 3: Mac Hardware Architecture    23

Overview 23
Data Flow and Limitations 24
Summary 32

Chapter 4: Application Programming on OS X    33

Overview 33
Mac OS X Versions 33
System Configuration 34
Power Management 34
Filesystem 38
Finding, Verifying, and Filing Bugs 39
Threading 41
Data Parallel Computation: SIMD 42

Chapter 5: OpenGL Configuration and Integration    45

API Introductions and Overview 46
Configuration API Relationships 49

Chapter 6: The CGL API for OpenGL Configuration    55

Overview 55
Error Handling 57
Pixel Format Selection 57
Context Management 63
Drawables 77
Using CGL Macros 86
Summary 86

Chapter 7: The AGL API for OpenGL Configuration    89

Overview 89
Software Layering 90
Pixel Format and Context 91
Additional Topics 104
Alternative Rendering Destinations 109
Summary 120

Chapter 8: The Cocoa API for OpenGL Configuration    121

Overview 122
NSOpenGLView 122
NSView 133
Additional Topics 140
Alternative Rendering Destinations 152
Summary 162

Chapter 9: The GLUT API for OpenGL Configuration    163

Overview 164
Configuration and Setup 165
Summary 171

Chapter 10: API Interoperability    173

Overview 173
Cocoa Image: NSImage 174
QuickTime 184
Summary 193

Chapter 11: Performance    195

Overview 195
Axioms for Designing High-Performance OpenGL Applications 196
OpenGL for Mac OS X Rules of Thumb for Performance 201
Metrics 207
Efficient Data Management Using Mac OpenGL 209
Efficient Handling of Vertex Data 210
Efficient Handling of Texture Data 221
Textures 225
Shaders 226
Tools 226
Graphics Tools 228
Putting It All Together 237
Summary 243

Chapter 12: Mac Platform Compatibility    245

Mac OS Versions 245
OpenGL Platform Identification 248
Mac OS Version Identification 249
Summary 251

Chapter 13: OpenGL Extensions    253

Overview 253
Extension Design and API Integration 254
Extension Styles and Types 256
Identification, Selection, Query, and Usage 257
Utilization and Binding 262
Extension Management Libraries 269
Summary 275

Appendix A: X11 APIs for OpenGL Configuration    277

Installation 277
Building X11 Applications on OS X 278
X11 Color Models 279

Appendix B: Glossary    281

Appendix C: The Cocoa API for OpenGL Configuration in Leopard, Mac OS X 10.5    283

Overview 284
NSOpenGLView 284
NSView 294
Additional Topics 300
Alternative Rendering Destinations 312
Summary 322

Appendix D: Bibliography    323

Index    325


Download the preface


Download the index


Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership