Merge pull request #15931 from ricardoquesada/issue15909_v312

fix: reverse iterator on events + doesn't use additionalTransform
This commit is contained in:
minggo 2016-06-23 10:00:09 +08:00 committed by GitHub
commit ac67f8eeb1
2 changed files with 3 additions and 3 deletions

View File

@ -210,8 +210,6 @@ void Scene::render(Renderer* renderer, const Mat4& eyeTransform, const Mat4* eye
// culling and other stuff.
if (eyeProjection)
camera->setAdditionalProjection(*eyeProjection * camera->getProjectionMatrix().getInversed());
else
camera->setAdditionalTransform(eyeTransform.getInversed());
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, Camera::_visitingCamera->getViewProjectionMatrix());

View File

@ -845,8 +845,10 @@ void EventDispatcher::dispatchTouchEventToListeners(EventListenerVector* listene
// second, for all camera call all listeners
// get a copy of cameras, prevent it's been modified in listener callback
// if camera's depth is greater, process it earlier
for (auto& camera: scene->getCameras())
auto cameras = scene->getCameras();
for (auto rit = cameras.rbegin(); rit != cameras.rend(); ++rit)
{
Camera* camera = *rit;
if (camera->isVisible() == false)
{
continue;