revert: restore BeginCapture/EndCapture instead of TriggerCapture
TriggerCapture caused incomplete rdc files due to async file writing. BeginCapture/EndCapture ensures synchronous file write on EndCapture.
This commit is contained in:
@@ -131,14 +131,18 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
commandList.Clear(1.0f, 0.0f, 0.0f, 1.0f, 1 | 2);
|
||||
|
||||
if (frameCount >= targetFrameCount - 1) {
|
||||
RenderDocCapture::Get().TriggerCapture();
|
||||
Log("[INFO] RenderDoc capture triggered");
|
||||
if (RenderDocCapture::Get().BeginCapture("OpenGL_Minimal_Test")) {
|
||||
Log("[INFO] RenderDoc capture started");
|
||||
}
|
||||
}
|
||||
|
||||
swapChain.Present(0, 0);
|
||||
frameCount++;
|
||||
|
||||
if (frameCount >= targetFrameCount) {
|
||||
if (RenderDocCapture::Get().EndCapture()) {
|
||||
Log("[INFO] RenderDoc capture ended");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user