mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[cocos2dx] Don't cull if no visiting camera is set. Closes #1566.
This commit is contained in:
parent
75da2e3d94
commit
8391097947
@ -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();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user