Debug Render In Cocos2d Android

I want to implement debug render for cocos2d android.So I can view how bodies are created. Right now I use gdx.jar file for box2d and load that jar file following way.

static {
}


All the desire bodies are created but I need box2d debug renderer. I have search many place for this question but I could not found anything. So please anybody has knowledge regarding this then suggest me.

You can use GLES_Render class in TestCpp, which is located in

 ./samples/TestCpp/Classes/Box2DTestBed/GLES-Render.cpp
./samples/TestCpp/Classes/Box2DTestBed/GLES-Render.h


To implement the debug draw, you can draw the debug renderer with your world data after CLayer::draw(); as demonstrated in samples/TestCpp/Classes/Box2DTestBed/Box2dView.cpp ,

void Box2DView::draw()
{
CCLayer::draw();

ccGLEnableVertexAttribs( kCCVertexAttribFlag_Position );

kmGLPushMatrix();

m_test->m_world->DrawDebugData();

kmGLPopMatrix();

CHECK_GL_ERROR_DEBUG();
}


If you are using old cocos2d-x library you have follow guide here.

• I think you misunderstood the platform. I am working on cocos2d android where I don't found anything you said so please give me other information that I can use. Cocos2d-Android is totally based on Java. – Siddharth Feb 23 '13 at 4:39
• it is my mistake. you can also remove tag cocos2d-x from the question to reduce confusion. – neo Feb 23 '13 at 7:08
• So provide me some detail on how to enable debug draw in cocos2d android. – Siddharth Feb 23 '13 at 12:22