问题
This article tell how to wrap Box2D debug draw in a layer. But I do not understand why it is being drawn in the specific layer. As far as I don't know OpenGL, I don't understand where it is being drawn at all. But my problem is that I want to draw in a specific layer, so that I could put that layer on top of all layers and make Box2D shapes always visible.
Today I have found the solution how to do debug draw Box2D shapes in C++ but I cannot draw in a specific layer. Could you help me understand where it is being drawn so I could draw the Box2D shapes on top of my sprites. I want to bring them front.
回答1:
You could simply add another layer above your current layer.
And you can add the code you post here in the up layer then everything should be working.
来源:https://stackoverflow.com/questions/22287420/box2d-debug-draw-in-a-specific-layer