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 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.