CameraGroup: Reset compositor order offset on reload
Use the newly added simgear::Compositor::resetOrderOffset() to reset the order offset counter with each compositor reload. This prevents the counter increasing indefinitely, which soon results in render orders beyond those set statically for the GUI and upcoming VR mirror.
This commit is contained in:
parent
07dfb6496c
commit
04c6821b8c
1 changed files with 3 additions and 0 deletions
|
@ -970,6 +970,9 @@ void reloadCompositors(CameraGroup *cgroup)
|
||||||
{
|
{
|
||||||
cgroup->_viewer->getViewerBase()->stopThreading();
|
cgroup->_viewer->getViewerBase()->stopThreading();
|
||||||
|
|
||||||
|
// Prevent the camera render orders increasing indefinitely with each reload
|
||||||
|
Compositor::resetOrderOffset();
|
||||||
|
|
||||||
for (auto &info : cgroup->_cameras) {
|
for (auto &info : cgroup->_cameras) {
|
||||||
// Ignore the GUI camera
|
// Ignore the GUI camera
|
||||||
if (info->flags & CameraInfo::GUI)
|
if (info->flags & CameraInfo::GUI)
|
||||||
|
|
Loading…
Reference in a new issue