0
votes

How i can debugdraw with a cocos2d/macos code ? i cant use GLESDebugDraw, any clue?

1

1 Answers

1
votes

Im not sure what you need, but cocos2d got some draw methods. You can maybe use this code

-(void)draw
{
for (NSValue* rect in spots) {
    CGRect r = [rect CGRectValue];
    CGPoint vertices2[] = {
        ccp(r.origin.x,r.origin.y),
        ccp(r.origin.x, r.size.height + r.origin.y),
        ccp(r.size.width + r.origin.x, r.size.height + r.origin.y),
        ccp(r.size.width + r.origin.x, r.origin.y)
    }; 
    ccDrawPoly(vertices2, 4, YES);
}

For other debug output, check ccConfig.h (just type it in the search field left bottom of the projekt view). On line 229 is #define CC_SPRITE_DEBUG_DRAW 0. Set it to 1 and you can see the boundingbox of all sprites.