Limit number of rendered frames.

This commit is contained in:
Bartosz Taudul 2019-10-29 22:45:01 +01:00
parent 5bcf288333
commit 516ec6883d
2 changed files with 6 additions and 0 deletions

View File

@ -1 +1,4 @@
https://github.com/aras-p/ToyPathTracer https://github.com/aras-p/ToyPathTracer
Modified to render only 10 frames. Client part requires 12 GB, server part
requires 8 GB.

View File

@ -199,6 +199,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE, _In_ LPWSTR,
#endif // #if DO_COMPUTE_GPU #endif // #if DO_COMPUTE_GPU
static int framesLeft = 10;
// Main message loop // Main message loop
MSG msg = { 0 }; MSG msg = { 0 };
while (msg.message != WM_QUIT) while (msg.message != WM_QUIT)
@ -211,6 +213,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE, _In_ LPWSTR,
else else
{ {
RenderFrame(); RenderFrame();
if( --framesLeft == 0 ) break;
} }
} }