Game Development Reference
In-Depth Information
What just happened?
The GLES-Render class is necessary to use the debug draw feature in Box2D. This will
draw all the elements from the simulation on the screen. The debug draw object is created
inside the initPhysics method alongside the Box2D simulation ( b2World ). We'll go
over that logic in a moment.
As the comment inside the draw method states, the debug draw feature should be switched
off once you're done developing your game. So all the lines pertaining to that object as well
as the draw method should be commented out when you're ready for a release version.
Search WWH ::




Custom Search