[cocos2dx] Don't cull if no visiting camera is set. Closes #1566.

This commit is contained in:
badlogic 2019-12-10 16:12:32 +01:00
parent 75da2e3d94
commit 8391097947

View File

@ -271,7 +271,7 @@ namespace spine {
#if CC_USE_CULLING #if CC_USE_CULLING
const cocos2d::Rect bb = computeBoundingRect(worldCoords, coordCount / 2); const cocos2d::Rect bb = computeBoundingRect(worldCoords, coordCount / 2);
if (cullRectangle(renderer, transform, bb)) { if (cullRectangle(renderer, transform, bb)) {
VLA_FREE(worldCoords); VLA_FREE(worldCoords);
return; return;
} }
@ -1054,7 +1054,7 @@ namespace spine {
bool cullRectangle(Renderer* renderer, const Mat4& transform, const cocos2d::Rect& rect) { bool cullRectangle(Renderer* renderer, const Mat4& transform, const cocos2d::Rect& rect) {
if (Camera::getVisitingCamera() == nullptr) if (Camera::getVisitingCamera() == nullptr)
return true; return false;
auto director = Director::getInstance(); auto director = Director::getInstance();
auto scene = director->getRunningScene(); auto scene = director->getRunningScene();