File tree 1 file changed +15
-6
lines changed
1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,16 @@ void CRenderDevice::BeforeRender()
233
233
GEnv.Render ->SetCacheXform (mView , mProject );
234
234
}
235
235
236
+ static void UpdateViewports ()
237
+ {
238
+ // Update and Render additional Platform Windows
239
+ if (ImGui::GetIO ().ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
240
+ {
241
+ ImGui::UpdatePlatformWindows ();
242
+ ImGui::RenderPlatformWindowsDefault ();
243
+ }
244
+ }
245
+
236
246
void CRenderDevice::DoRender ()
237
247
{
238
248
if (GEnv.isDedicatedServer )
@@ -251,15 +261,14 @@ void CRenderDevice::DoRender()
251
261
252
262
ImGui::Render ();
253
263
m_imgui_render->Render (ImGui::GetDrawData ());
254
- // Update and Render additional Platform Windows
255
- if (ImGui::GetIO ().ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
256
- {
257
- ImGui::UpdatePlatformWindows ();
258
- ImGui::RenderPlatformWindowsDefault ();
259
- }
264
+ UpdateViewports ();
260
265
261
266
RenderEnd (); // Present goes here
262
267
}
268
+ else
269
+ {
270
+ UpdateViewports ();
271
+ }
263
272
renderTotalReal.End ();
264
273
renderTotalReal.FrameEnd ();
265
274
stats.RenderTotal .accum = renderTotalReal.accum ;
You can’t perform that action at this time.
0 commit comments