Chapter 1: Creating a Game Window

In this chapter, you will set up a simple Win32 window and bind an OpenGL context to it. You will be using OpenGL 3.3 Core throughout this book. The actual OpenGL code is going to be very minimal.

Most OpenGL-specific code will be abstracted into helper objects and functions, which will allow you to focus on animation rather than any specific graphics APIs. You will write the abstraction layer in Chapter 6, Building an Abstract Renderer, but for now, it's important to create a window ready to be drawn to.

By the end of this chapter, you should be able to do the following:

  • Open a Win32 window
  • Create and bind an OpenGL 3.3 Core context
  • Use glad to load OpenGL 3.3 Core functions
  • Enable vsynch for the created ...

Get Hands-On C++ Game Animation Programming 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.