List of Figures xv
List of Tables xix
List of Examples xxi
Preface xxv
Acknowledgments xxix
About the Authors xxxiChapter 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: TheGLUT 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 281Appendix 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 323Index 325