File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2019,6 +2019,8 @@ void IgnRenderer::Initialize()
2019
2019
2020
2020
auto root = scene->RootVisual ();
2021
2021
2022
+ scene->SetCameraPassCountPerGpuFlush (6u );
2023
+
2022
2024
// Camera
2023
2025
this ->dataPtr ->camera = scene->CreateCamera ();
2024
2026
root->AddChild (this ->dataPtr ->camera );
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ void SensorsPrivate::WaitForInit()
196
196
igndbg << " Initializing render context" << std::endl;
197
197
this ->renderUtil .Init ();
198
198
this ->scene = this ->renderUtil .Scene ();
199
+ this ->scene ->SetCameraPassCountPerGpuFlush (6u );
199
200
this ->initialized = true ;
200
201
}
201
202
@@ -262,6 +263,15 @@ void SensorsPrivate::RunOnce()
262
263
// publish data
263
264
IGN_PROFILE (" RunOnce" );
264
265
this ->sensorManager .RunOnce (this ->updateTime );
266
+ }
267
+
268
+ {
269
+ IGN_PROFILE (" PostRender" );
270
+ // Update the scene graph manually to improve performance
271
+ // We only need to do this once per frame It is important to call
272
+ // sensors::RenderingSensor::SetManualSceneUpdate and set it to true
273
+ // so we don't waste cycles doing one scene graph update per sensor
274
+ this ->scene ->PostRender ();
265
275
this ->eventManager ->Emit <events::PostRender>();
266
276
}
267
277
You can’t perform that action at this time.
0 commit comments