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 4. Object Management and Debug Rendering

Our current application is not very scalable, and does not provide much in the way of debug information to help us work with the physics system. So in this chapter, we will be performing some code refactoring to help us handle these situations in a robust fashion.

Handling multiple objects

We're currently hard coding one pointer and making one call to DrawBox() to create our first object. Continuing down this path by adding a second pointer, and a second call to DrawBox()would make introducing even more objects into the scene an awkward and painful process.

A wise course of action to take at this early stage is to build a system that allows us to encapsulate important object data (such as the object's ...

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