From eb7b7bff6d916b58460bdfb79103f5788ccefd76 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 26 Dec 2019 10:47:38 -0800 Subject: Win32 app: updated golden image handling to render two frames to get GUI rendered --- NativeApp/src/Win32/WinMain.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'NativeApp/src/Win32/WinMain.cpp') diff --git a/NativeApp/src/Win32/WinMain.cpp b/NativeApp/src/Win32/WinMain.cpp index 3545c53..59a07b8 100644 --- a/NativeApp/src/Win32/WinMain.cpp +++ b/NativeApp/src/Win32/WinMain.cpp @@ -83,6 +83,10 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int cmdShow) auto GoldenImgMode = g_pTheApp->GetGoldenImageMode(); if (GoldenImgMode != NativeAppBase::GoldenImageMode::None) { + g_pTheApp->Update(0, 0); + g_pTheApp->Render(); + // Dear imgui windows that don't have initial size are not rendered in the first frame, + // see https://github.com/ocornut/imgui/issues/2949 g_pTheApp->Update(0, 0); g_pTheApp->Render(); g_pTheApp->Present(); -- cgit v1.2.3