Skip to content

Commit

Permalink
Merge branch 'main' into Segmentation
Browse files Browse the repository at this point in the history
  • Loading branch information
adlarkin authored Jul 30, 2021
2 parents ffa767e + d21c6f3 commit 1059bdc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/RenderingSensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,13 @@ void RenderingSensor::Render()
rc->PostRender();
}
}

if (!this->dataPtr->manualSceneUpdate &&
!this->dataPtr->scene->LegacyAutoGpuFlush())
{
// When LegacyAutoGpuFlush = true, that function gets
// called per sensor, so we don't have to do anything here
this->dataPtr->scene->PostRender();
}
}

4 changes: 4 additions & 0 deletions test/integration/gpu_lidar_sensor_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ void GpuLidarSensorTest::ManualUpdate(const std::string &_renderEngine)
ignition::rendering::VisualPtr root = scene->RootVisual();

scene->SetAmbientLight(0.3, 0.3, 0.3);
scene->SetCameraPassCountPerGpuFlush(6u);

// Create a sensor manager
ignition::sensors::Manager mgr;
Expand Down Expand Up @@ -791,6 +792,9 @@ void GpuLidarSensorTest::ManualUpdate(const std::string &_renderEngine)
// Render and update
mgr.RunOnce(std::chrono::steady_clock::duration::zero());

// manually finish update scene
scene->PostRender();

int mid = horzSamples / 2;
int last = (horzSamples - 1);
double unitBoxSize = 1.0;
Expand Down

0 comments on commit 1059bdc

Please sign in to comment.