mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Match SetMaximumFrameLatency to the number of frames in flight
This commit is contained in:
parent
6f07596985
commit
b4cfad50cb
2 changed files with 2 additions and 2 deletions
|
|
@ -1158,7 +1158,7 @@ static void ImGui_ImplDX12_CreateWindow(ImGuiViewport* viewport)
|
|||
vd->BackBuffer[i].RenderTarget = back_buffer;
|
||||
}
|
||||
|
||||
hr = vd->SwapChain->SetMaximumFrameLatency(bd->numBackbuffer);
|
||||
hr = vd->SwapChain->SetMaximumFrameLatency(bd->numFramesInFlight);
|
||||
IM_ASSERT(hr == S_OK);
|
||||
vd->SwapChainWaitableObject = vd->SwapChain->GetFrameLatencyWaitableObject();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ bool CreateDeviceD3D(HWND hWnd)
|
|||
|
||||
swapChain1->Release();
|
||||
dxgiFactory->Release();
|
||||
g_pSwapChain->SetMaximumFrameLatency(APP_NUM_BACK_BUFFERS);
|
||||
g_pSwapChain->SetMaximumFrameLatency(APP_NUM_FRAMES_IN_FLIGHT);
|
||||
g_hSwapChainWaitableObject = g_pSwapChain->GetFrameLatencyWaitableObject();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue