Chapter 13. Wiggle: OpenGL on Windows

by Richard S. Wright, Jr.

WHAT YOU'LL LEARN IN THIS CHAPTER:

How To

Functions You'll Use

Request and select an OpenGL pixel format

ChoosePixelFormat/DescribePixelFormat/SetPixelFormat

Create and use OpenGL rendering contexts

wglCreateContext/wglDeleteContext/wglMakeCurrent

Respond to window messages

WM_PAINT/WM_CREATE/WM_DESTROY/WM_SIZE

Use double buffering in Windows

SwapBuffers

OpenGL is purely a graphics API, with user interaction and the screen or window handled by the host environment. To facilitate this partnership, each environment usually has some extensions that “glue” OpenGL to its own window management and user interface functions. This glue is code that associates OpenGL drawing commands to a particular window. ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.