thank you for the response..
I have tried that one but getting polygon at unexpected position..
Here is the code for that :
In the custom node class draw method ::
triangleFanPos = Vertex2DMake(innerCircleBody~~>GetPosition.x * PTM_RATIO~~ this~~>getPosition.x,
innerCircleBody~~>GetPosition().y * PTM_RATIO - this~~>getPosition.y);
// Use each box2d body as a vertex and calculate coordinate for the triangle fan
b2Body* currentBody = bodies.at;
Vertex2D pos = Vertex2DMake.x * PTM_RATIO~~ this~~>getPosition.x,
currentBody~~>GetPosition().y * PTM_RATIO - this->getPosition().y);
triangleFanPos[i+1] = Vertex2DMake(pos.x, pos.y);
// Loop back to close off the triangle fan
triangleFanPos[NUM_SEGMENTS+1] = triangleFanPos;
ccDrawColor4B(255, 0, 0, 255);
// Load the vertex data
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, triangleFanPos);
glDrawArrays(GL_TRIANGLE_FAN, 0, NUM_SEGMENTS+2);
And added that node to layer..
I am getting position of node through debug draw but not getting filled circle inside that as drawed in above method..
Do you have any idea about it.
If you want to take a good look i am trying this code: