下载了 3.0 beta版本,发现在 ccConfig.h 设置
#define CC_SPRITE_DEBUG_DRAW 1
不再绘制精灵边框了,在3.0 alpha1 版本正常。
hi
目前你可以把这段代码:
#if CC_SPRITE_DEBUG_DRAW
// draw bounding box
Point vertices = {
Point( _quad.bl.vertices.x, _quad.bl.vertices.y ),
Point( _quad.br.vertices.x, _quad.br.vertices.y ),
Point( _quad.tr.vertices.x, _quad.tr.vertices.y ),
Point( _quad.tl.vertices.x, _quad.tl.vertices.y ),
};
// ccDrawPoly(vertices, 4, true);
DrawPrimitives::drawPoly(vertices, 4, true);
#endif // CC_SPRITE_DEBUG_DRAW
放到 Sprite::draw()下面。这样就保证有绘制边框了。
这个,是因为绘制机制有改动,从alpha->beta,下面的版本会改掉它。
目前你可以这么小改动下使用之。