From 60e8f14d5b193671167470c7e325527fc01b1e88 Mon Sep 17 00:00:00 2001 From: timoore Date: Tue, 30 Dec 2008 09:32:53 +0000 Subject: [PATCH] Don't clone far camera; create a new one and initialize it from the near camera The clone operation may be sharing things that shouldn't be shared. --- src/Main/CameraGroup.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Main/CameraGroup.cxx b/src/Main/CameraGroup.cxx index 938008967..9e848978d 100644 --- a/src/Main/CameraGroup.cxx +++ b/src/Main/CameraGroup.cxx @@ -134,8 +134,11 @@ CameraInfo* CameraGroup::addCamera(unsigned flags, Camera* camera, Camera* farCamera = 0; if ((flags & (GUI | ORTHO)) == 0) { - farCamera = simgear::clone(camera); + farCamera = new Camera; + farCamera->setAllowEventFocus(camera->getAllowEventFocus()); farCamera->setGraphicsContext(camera->getGraphicsContext()); + farCamera->setCullingMode(camera->getCullingMode()); + farCamera->setInheritanceMask(camera->getInheritanceMask()); // Each camera's viewport is written when the window is // resized; if the the viewport isn't copied here, it gets updated // twice and ends up with the wrong value. -- 2.39.5