summaryrefslogtreecommitdiffstats
path: root/NativeApp/src/Win32/WinMain.cpp
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2019-12-26 18:47:38 +0000
committerassiduous <assiduous@diligentgraphics.com>2019-12-26 18:47:38 +0000
commiteb7b7bff6d916b58460bdfb79103f5788ccefd76 (patch)
tree313a00332c18ae3cdfa47c86fd5cb86925fb77c8 /NativeApp/src/Win32/WinMain.cpp
parentReverted previous change if this was not the cause of the problem. It seems t... (diff)
downloadDiligentTools-eb7b7bff6d916b58460bdfb79103f5788ccefd76.tar.gz
DiligentTools-eb7b7bff6d916b58460bdfb79103f5788ccefd76.zip
Win32 app: updated golden image handling to render two frames to get GUI rendered
Diffstat (limited to 'NativeApp/src/Win32/WinMain.cpp')
-rw-r--r--NativeApp/src/Win32/WinMain.cpp4
1 files changed, 4 insertions, 0 deletions
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
@@ -85,6 +85,10 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int cmdShow)
{
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();
auto ExitCode = g_pTheApp->GetExitCode();
g_pTheApp.reset();