Chapter 14. OpenGL on MacOS X

by Michael Sweet

WHAT YOU'LL LEARN IN THIS CHAPTER:

How To

Functions You'll Use

Choose appropriate pixel formats for OpenGL rendering

aglChoosePixelFormat

Manage OpenGL drawing contexts

aglCreateContext, aglDestroyContext, aglSetCurrentContext, aglSetDrawable

Do double-buffered drawing

aglSwapBuffers

Create bitmap text fonts

aglUseFont

This chapter discusses the OpenGL interfaces on MacOS X. We cover both AGL and NSOpenGL, the Carbon and Cocoa interfaces, respectively. You learn how to create and manage OpenGL contexts as well as how to create OpenGL drawing areas for Carbon and Cocoa applications. This chapter also shows you how to use GLUT on MacOS X with all the examples in this book.

The Basics

OpenGL on MacOS X is exposed ...

Get OpenGL® SuperBible, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.