Generate and render the bsp tree of a 3d mesh (Qt/OpenGL)