mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
This commit is contained in:
@ -339,7 +339,7 @@ int main(int, char**)
|
||||
}
|
||||
|
||||
// Start the ImGui frame
|
||||
ImGui_ImplDX12_NewFrame(g_pd3dCommandList);
|
||||
ImGui_ImplDX12_NewFrame();
|
||||
ImGui_ImplWin32_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
|
||||
@ -399,7 +399,7 @@ int main(int, char**)
|
||||
g_pd3dCommandList->OMSetRenderTargets(1, &g_mainRenderTargetDescriptor[backBufferIdx], FALSE, NULL);
|
||||
g_pd3dCommandList->SetDescriptorHeaps(1, &g_pd3dSrvDescHeap);
|
||||
ImGui::Render();
|
||||
ImGui_ImplDX12_RenderDrawData(ImGui::GetDrawData());
|
||||
ImGui_ImplDX12_RenderDrawData(ImGui::GetDrawData(), g_pd3dCommandList);
|
||||
barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_RENDER_TARGET;
|
||||
barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PRESENT;
|
||||
g_pd3dCommandList->ResourceBarrier(1, &barrier);
|
||||
|
Reference in New Issue
Block a user