Can someone please tell me How to enable debug draw on the latest cocos2dx v3

It used to be so easy All I had to do was include Debugdraw and gles render class and use this->addChild(B2DebugDrawLayer::create(world, PTM_RATIO), 999999); now this wont work I also tried this
b2Draw *debugDraw;
debugDraw=new GLESDebugDraw(PTM_RATIO);
debugDraw->SetFlags(b2Draw::e_shapeBit);
world->SetDebugDraw(debugDraw);
world->DrawDebugData(); The body is there but I cannot see it no matter what I do Please help

@RDxGladi

Take a look at the Box2dTest in the cpp-tests project.

Yeah I found those out yesterday , I didnt knew such awesome tests exist thanks Ill try to extract a way out of them

I’d like to know too.

The code is commented in the Box2dTest.
I’ve got a compilation error if using GLESDebugDraw.

How you I do with latest cocos2d-x?
Thanks

Anyone?
Please?

@dakiki take a look at this:

@Den No more luck. This code uses GLESDebugDraw too, which is deprecated and not found if compiling with cocos2d-x-v3.1

Omg I’m such a noob sorry…
I created a new project when migrating from v2 to v3 and I forgot to add GLES-Render.cpp in the new project…

Ok well, now it works, thanks :smiley: