Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render checkVisibility error--add version define #191

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 6 additions & 34 deletions Cocos2DX_3.x/src/dragonBones/cocos2dx/CCArmatureDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,39 +105,11 @@ bool DBCCSprite::_checkVisibility(const cocos2d::Mat4& transform, const cocos2d:
float hSizeX = size.width / 2;
float hSizeY = size.height / 2;














cocos2d::Vec3 v3p(hSizeX + rect.origin.x, hSizeY + rect.origin.y, 0);



















#if COCOS2D_VERSION >= 0x00031500
cocos2d::Vec3 v3p(hSizeX, hSizeY, 0);
#else
cocos2d::Vec3 v3p(hSizeX+rect.origin.x, hSizeY+rect.origin.y, 0);
#endif

transform.transformPoint(&v3p);
cocos2d::Vec2 v2p = cocos2d::Camera::getVisitingCamera()->projectGL(v3p);
Expand Down Expand Up @@ -218,4 +190,4 @@ cocos2d::PolygonInfo& DBCCSprite::getPolygonInfoModify()
return this->_polyInfo;
}

DRAGONBONES_NAMESPACE_END
DRAGONBONES_NAMESPACE_END