From 516ec6883d6b04778e9c61563b260e6db319e111 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 29 Oct 2019 22:45:01 +0100 Subject: [PATCH] Limit number of rendered frames. --- examples/ToyPathTracer/README | 3 +++ examples/ToyPathTracer/Windows/TestWin.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/ToyPathTracer/README b/examples/ToyPathTracer/README index 6e33b790..6390fe02 100644 --- a/examples/ToyPathTracer/README +++ b/examples/ToyPathTracer/README @@ -1 +1,4 @@ https://github.com/aras-p/ToyPathTracer + +Modified to render only 10 frames. Client part requires 12 GB, server part +requires 8 GB. diff --git a/examples/ToyPathTracer/Windows/TestWin.cpp b/examples/ToyPathTracer/Windows/TestWin.cpp index ea5aa3e9..e96b9820 100644 --- a/examples/ToyPathTracer/Windows/TestWin.cpp +++ b/examples/ToyPathTracer/Windows/TestWin.cpp @@ -199,6 +199,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE, _In_ LPWSTR, #endif // #if DO_COMPUTE_GPU + static int framesLeft = 10; + // Main message loop MSG msg = { 0 }; while (msg.message != WM_QUIT) @@ -211,6 +213,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE, _In_ LPWSTR, else { RenderFrame(); + if( --framesLeft == 0 ) break; } }