mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15931 from ricardoquesada/issue15909_v312
fix: reverse iterator on events + doesn't use additionalTransform
This commit is contained in:
commit
ac67f8eeb1
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue