Product Details
OpenGL(R) Programming on Mac OS(R) X: Architecture, Performance, and Integration

OpenGL(R) Programming on Mac OS(R) X: Architecture, Performance, and Integration
By Robert P. Kuehne, J. D. Sullivan

List Price: $54.99
Price: $35.47 & eligible for FREE Super Saver Shipping on orders over $25. Details

Availability: Usually ships in 24 hours
Ships from and sold by Amazon.com

48 new or used available from $23.10

Average customer review:

Product Description

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.


Product Details

  • Amazon Sales Rank: #83704 in Books
  • Published on: 2007-12-27
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 368 pages

Editorial Reviews

About the Author

Robert P. Kuehne leads Blue Newt Software, a consultancy that specializes in helping clients enhance their 3D graphics applications. Formerly Technical Lead for Silicon Graphics' OpenGL Shading Language, Kuehne has been involved with OpenGL since it was created, in roles ranging from programmer to shader compiler developer to SIGGRAPH presenter. He has also been a Macintosh developer since the early 1990s.

J. D. Sullivan is an OpenGL driver engineer who has been writing graphics software professionally for more than fifteen years. While at Silicon Graphics, Inc., he was one of the original designers and implementers of the Volumizer API and later worked as part of the OpenGL software team focused on the Cobalt and Krypton graphics chipsets. Since SGI, Sullivan has worked on the Mac as his primary development platform, and he serves on the OpenGL Architecture Review Board.

Excerpt. © Reprinted by permission. All rights reserved.

The Mac is a computing platform that virtually defines ease of use, consistency, and effortless computing. The story of OpenGL on the Mac has been, shall we say, a bit more complex. With the arrival of OS X, the Mac platform supports even more ways of constructing OpenGL applications for the Mac. While there has been an apparent proliferation of OpenGL interfaces for the Mac, the platform itself has stabilized architecturally and programmatically and now offers the best developer and user experience in the industry for development of graphics applications. This is not just a statement of preference but an observation that, in many ways, the Mac is an OpenGL platform without peer. The Mac is a fun and efficient platform on which to develop applications, thanks to the set of OpenGL drivers at its core that support a rich and deep feature set, great performance, and deep integration in OS X. The Mac has excellent and usable tools for quickly monitoring OpenGL behavior, rapidly prototyping shaders, and digging deep to analyze OpenGL behavior in the application and driver. The Mac makes OpenGL development efficient and fun.

Although the development tools and environment are powerful and helpful, many corners of OpenGL on the Mac remain under-documented. A developer must choose among several development languages, user interface (UI) toolkits, window managers, and additional Mac APIs such as QuickTime and Core Image, yet still ensure that his or her software runs well on a variety of target Mac platforms. All of these factors can make using OpenGL on the Mac a challenging task even for developers who have been writing OpenGL applications on other platforms for years.

This book was put together with an eye toward simplifying and clarifying the ways in which OpenGL can be used on the Mac. It is our hope that by codifying all the information available about OpenGL on the Mac in one place and by presenting each interface with clarity and depth, developers will have a one stop reference for all things OpenGL on the Mac.

Who Should Read This Book?

This book is intended for OpenGL programmers who wish to develop applications on Mac OS X. We target two categories of OpenGL programmers: those who are new to OpenGL on the Mac and those who want to explore the specific benefits of writing OpenGL programs on the Mac.

For those who are new to OpenGL on the Mac--either existing Mac developers or those coming from other platforms--we provide advice on cross-platform issues, portable interfaces, and ideas about choosing native interfaces for the Mac. Existing Mac developers will find a single-source reference guide to all OpenGL interfaces on the Mac. For developers wishing to explore the power and richness of the Mac, we provide complete details on Mac-specific OpenGL extensions and ways of integrating other Mac APIs (such as QuickTime and Core Image) into applications.

Organization

This text is intended to be useful as both a programming guide and a reference manual. The text contains several chapters focused on OpenGL on the Mac and other chapters that cover related graphics information. A few appendices are included to cover supplemental information in detail. The chapters are organized as follows:

  • Architecture Chapters 1 through 4 describe the hardware and software architectures of the Mac. This part of the book also presents an introduction to performance considerations as they relate to architecture.

  • Configuration and Integration Chapter 5 explores the interfaces to OpenGL on the Mac in detail. Those new to OpenGL on the Mac should begin here.

  • CGL, AGL, Cocoa, GLUT Chapters 6 through 9 explore details behind the individual APIs. Each API is covered in detail in its own chapter, and the APIs are compared and contrasted in each chapter. These chapters form the core of this book.

  • Interoperability Chapter 10 collects a variety of interesting OpenGL and other Mac API integration ideas. This chapter describes how to incorporate video in an application with QuickTime, perform image effects on textures or scenes with Core Image, and process CoreVideo data in an application.

  • Performance Chapters 11 and 12 describe the basics of analyzing performance of OpenGL applications and offer tips about where common problems may surface and how they might be resolved. Analysis, tools, architecture, data types, and solutions are covered.

  • Extensions Chapter 13 presents a guide to detecting, integrating, and using OpenGL extensions. This chapter introduces extension management principles and tools and provides details on how to perform such management specifically on the Mac.

Additional Resources

As both OpenGL and the Mac platform evolve, so must developers' applications. At our website, www.macopenglbook.com, we provide our example OpenGL code as well as other OpenGL-related resources. Additionally, we track and provide corrections for any errata and typos. Although we aspire to Knuthlike greatness, we are open to the idea that bugs may yet lurk within these pages. Should you find a possible gaffe, please bring it to our attention through our website.

This book has been a project long in the making, and rumblings of Leopard, Mac OS X 10.5, have been part of our plan since the beginning. However, due to information embargoes, the paucity of information available to the public, and publishing timelines, our best efforts at incorporating final, released Leopard specific details are thwarted. Although we've accounted for most major changes to OpenGL programming for Leopard in this book, there was still some degree of flux for Leopard features at the time this book was published. Never fear, we've put together a detailed Leopard change synopsis for OpenGL, and accounted for the flux in Leopard on our website in an extra chapter. You'll find this bonus chapter at our website: www.macopenglbook.com.

A few words on Leopard that we can say at this time with authority: First, Leopard will provide OpenGL 2.0 and OpenGL ES support. OpenGL 2.0 is a great baseline for OpenGL developers, providing the most modern of OpenGL foundations upon which to develop. Also of interest is the inclusion of OpenGL ES in this release. ES stands for embedded system, and is a nice, stripped-down version of OpenGL, largely targeting handheld devices. At this time, if writing an application for a desktop system, it would still be most sensible to target OpenGL 2.0. However, if you're building and testing a cross-platform device that might be used for handheld devices, OpenGL ES would be a good OpenGL SDK to develop against. Second, Apple's tools for development and debugging are a lot more comprehensive in Leopard. XRay, in particular, integrates a variety of debugging tools in one information view, making it much easier to target certain types of bottlenecks, specifically those involving data transfer. Finally, Leopard brings a lot of bug-fixes and feature enhancements.We've got informationon bits and pieces of the Leopard OpenGL throughout the book. But you'll have to read about the final and released version in our Leopard chapter on the website.

So, once you have this book in your hands, please go to the website and get the addendum. We think you'll be pleased with the detail and additional information it offers on the released version of Leopard. We consider it the definitive source of independent information for OpenGL on Leopard, Mac OSX 10.5. Get it by going to: www.macopenglbook.com.


Customer Reviews

Boost your OpenGL Programming Productivity5
This book has a lot of shining points. First, all its explanations are crystal clear, focused into the concepts and techniques OpenGL developers really need. Furthermore, the book comprises OpenGL architecture and configuration on OS X, and the various APIs we can use in order to create OpenGL applications, specifically, CGL, AGL, Cocoa, (our old buddy) GLUT, and X11 APIs. A chapter focused into API interoperability is also included. But there is much more information in this book: history notes, a germane review of Mac's hardware, OS X programming, compatibility between Mac platforms, and a discussion about OpenGL extensions. Appendices contain an useful Glossary and notes about Cocoa API for OpenGL in Leopard. Last but not least, the book is the OpenGL/Mac companion we were demanding.

This, however, is not a book for starting to learn OpenGL (use the OpenGL SuperBible or the Red Book instead). This is a book aimed at two categories of programmers: Mac developers in general, and those with OpenGL foundations who want to explore the enormous benefits of OpenGL development on Mac OS X. I do strongly believe that any OpenGL developer will benefit of studying this great book.

Personally, Chapter 11 is the one I've enjoyed the most. The technical wisdom revealed in such chapter almost justifies by itself the full cost of the book. It's such a fine chapter. The almost 5 pages covering the "Axioms for Designing High-Performance OpenGL Applications" are very interesting, particularly the care we must have when doing our OpenGL drawing in Object-Oriented programs; we could easily incur considerable glVertex overhead, if our code is not properly structured. The little tutorial section "Putting It All Together" includes a detailed optimization of an OpenGL program, "Please Tune Me". Delicious. Very Recommended.

Needs some work3
I would agree with the other two reviewers that the book is in general well laid out and gives some good background for mac os and opengl. However I found the authors style somewhat meandering. For example VBOs are introduced, then something else is talked about and then back to the VBOs again, sometimes its very difficult to tell exactly which technology they are talking about.
This would be ok if the code samples made it easier - but in fact the code samples are a mess and largely missing the important examples referenced in the text.
For example the "please tune me" example mentioned in the other review? Not there. The vertex submission example - also in chapter 11 - also not there. I not sure whether its standard practice that I should be debugging the code as well in order to get it to work. A simple example - the paths to resources (eg Quicktime movies) are hard coded!
Currently it is a useful reference for me - but more because it brings to light a certain technology (eg an Apple extension) - but then I usually have to go elsewhere for it to be explained. In conclusion : it needs a good editor who understands the topic, and whomever the code was outsourced to, they should not be paid. In addition authors should not bother putting up a website if they are not going to respond to queries - just put a CD/DVD in the back of the book.

multiple APIs to choose from4
The text describe the nitty gritty of coding or porting your OpenGL applications to the Mac OS X environment. To a limited extent, the book has a general treatment of programming in OpenGL. But it is not meant as a text on the latter. Instead the focus is on the "issues" that making for possible problems on OS X.

One of which is that OS X has 2 types of windows, Carbon and Cocoa. It might perhaps be nicer if there was only one. But this is what you have to deal with. The Apple OpenGL (AGL) is the interface to Carbon, while you need the Cocoa OpenGL for Cocoa. It is slightly unusual that a major platform would have 2 types, and you may want to code just for one type. The book gives many details about both APIs, as well as the GLUT API. An evenhanded discussion. Different readers might well have different preferences.

Some of you should check out the discussion about multithreading, if intensive graphics performance is needed in your applications. The OS X OpenGL engine is said to have much better performance due to its multithreading, than typical serial engines.