diff --git a/tests/RHI/OpenGL/integration/minimal/main.cpp b/tests/RHI/OpenGL/integration/minimal/main.cpp index 827e1d3a..d98a6592 100644 --- a/tests/RHI/OpenGL/integration/minimal/main.cpp +++ b/tests/RHI/OpenGL/integration/minimal/main.cpp @@ -112,10 +112,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine MSG msg = {}; int frameCount = 0; - const int captureStartFrame = 25; - const int captureEndFrame = 35; + const int captureStartFrame = 29; + const int captureEndFrame = 30; - while (frameCount < captureEndFrame) { + while (true) { if (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) { if (msg.message == WM_QUIT) { break; @@ -131,16 +131,16 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine swapChain.Present(0, 0); frameCount++; - if (frameCount == captureStartFrame) { - RenderDocCapture::Get().BeginCapture("OpenGL_Minimal_Test"); - Log("[INFO] RenderDoc capture started at frame %d", frameCount); - } - - if (frameCount == captureEndFrame) { + if (frameCount >= captureEndFrame) { RenderDocCapture::Get().EndCapture(); Log("[INFO] RenderDoc capture ended at frame %d", frameCount); break; } + + if (frameCount == captureStartFrame) { + RenderDocCapture::Get().BeginCapture("OpenGL_Minimal_Test"); + Log("[INFO] RenderDoc capture started at frame %d", frameCount); + } } } diff --git a/tests/RHI/OpenGL/integration/quad/main.cpp b/tests/RHI/OpenGL/integration/quad/main.cpp index f7635b6c..1bb3817e 100644 --- a/tests/RHI/OpenGL/integration/quad/main.cpp +++ b/tests/RHI/OpenGL/integration/quad/main.cpp @@ -196,10 +196,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine MSG msg = {}; int frameCount = 0; - const int captureStartFrame = 25; - const int captureEndFrame = 35; + const int captureStartFrame = 29; + const int captureEndFrame = 30; - while (frameCount < captureEndFrame) { + while (true) { if (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) { if (msg.message == WM_QUIT) { break; @@ -223,16 +223,16 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine swapChain.Present(0, 0); frameCount++; - if (frameCount == captureStartFrame) { - RenderDocCapture::Get().BeginCapture("OpenGL_Quad_Test"); - Log("[INFO] RenderDoc capture started at frame %d", frameCount); - } - - if (frameCount == captureEndFrame) { + if (frameCount >= captureEndFrame) { RenderDocCapture::Get().EndCapture(); Log("[INFO] RenderDoc capture ended at frame %d", frameCount); break; } + + if (frameCount == captureStartFrame) { + RenderDocCapture::Get().BeginCapture("OpenGL_Quad_Test"); + Log("[INFO] RenderDoc capture started at frame %d", frameCount); + } } } diff --git a/tests/RHI/OpenGL/integration/sphere/main.cpp b/tests/RHI/OpenGL/integration/sphere/main.cpp index ba887667..51fc3157 100644 --- a/tests/RHI/OpenGL/integration/sphere/main.cpp +++ b/tests/RHI/OpenGL/integration/sphere/main.cpp @@ -305,11 +305,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine MSG msg = {}; int frameCount = 0; - const int captureStartFrame = 25; - const int captureEndFrame = 35; + const int captureStartFrame = 29; + const int captureEndFrame = 30; int renderCount = 0; - while (frameCount < captureEndFrame) { + while (true) { if (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) { if (msg.message == WM_QUIT) { break; @@ -348,16 +348,16 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine swapChain.Present(0, 0); frameCount++; - if (frameCount == captureStartFrame) { - RenderDocCapture::Get().BeginCapture("OpenGL_Sphere_Test"); - Log("[INFO] RenderDoc capture started at frame %d", frameCount); - } - - if (frameCount == captureEndFrame) { + if (frameCount >= captureEndFrame) { RenderDocCapture::Get().EndCapture(); Log("[INFO] RenderDoc capture ended at frame %d", frameCount); break; } + + if (frameCount == captureStartFrame) { + RenderDocCapture::Get().BeginCapture("OpenGL_Sphere_Test"); + Log("[INFO] RenderDoc capture started at frame %d", frameCount); + } } } diff --git a/tests/RHI/OpenGL/integration/triangle/main.cpp b/tests/RHI/OpenGL/integration/triangle/main.cpp index 7f85ec8f..20eb1111 100644 --- a/tests/RHI/OpenGL/integration/triangle/main.cpp +++ b/tests/RHI/OpenGL/integration/triangle/main.cpp @@ -174,10 +174,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine MSG msg = {}; int frameCount = 0; - const int captureStartFrame = 25; - const int captureEndFrame = 35; + const int captureStartFrame = 29; + const int captureEndFrame = 30; - while (frameCount < captureEndFrame) { + while (true) { if (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) { if (msg.message == WM_QUIT) { break; @@ -197,16 +197,16 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine swapChain.Present(0, 0); frameCount++; - if (frameCount == captureStartFrame) { - RenderDocCapture::Get().BeginCapture("OpenGL_Triangle_Test"); - Log("[INFO] RenderDoc capture started at frame %d", frameCount); - } - - if (frameCount == captureEndFrame) { + if (frameCount >= captureEndFrame) { RenderDocCapture::Get().EndCapture(); Log("[INFO] RenderDoc capture ended at frame %d", frameCount); break; } + + if (frameCount == captureStartFrame) { + RenderDocCapture::Get().BeginCapture("OpenGL_Triangle_Test"); + Log("[INFO] RenderDoc capture started at frame %d", frameCount); + } } }