O'Reilly logo

Learning Game Physics with Bullet Physics and OpenGL by Chris Dickinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Rendering and User Input

In this chapter, we will begin our journey into the world of OpenGL by performing some basic initialization steps, and rendering an object onto our window. Then we will learn how to gather user inputs, and how to manipulate the camera using that input in order to view our 3D scene from any angle.

Rendering the scene

In its most basic form, 3D rendering involves four essential tasks:

  • Creating a blank canvas on which to draw
  • Painting every object in the world onto the canvas, based on the direction it is being viewed from (by the camera)
  • Copying the canvas image to the screen
  • Clearing the canvas and repeating the process

However, there is much more nuance and complication involved in this process than it might first ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required