Adding a DebugDrawManager is easy:
Now that you have a debugDrawManager you can add debug primitives to be drawn:
All Spectre Debug Draw primitives can be drawn for a fixed amount of time. This is important because it allows you to fire off a debug draw request right where you compute it and the DebugDrawManager will remember the values until they should no longer be drawn.
The only thing left is to update the DebugDrawManager in your game loop and draw it.
It only takes 6 lines of code to add a Spectre DebugDrawManager to your game. Once added you can draw the following primitives for any length of time in any color:
- Axis Aligned Bounding Box
- Coordinate System Frame