Simple Opengl code with Broad phase collision detection using grids