Skip to content

Commit

Permalink
D3D12: Fix rare bug where spectator view could superimpose old image
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 3, 2024
1 parent 7b83241 commit f70fe82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mods/vr/D3D12Component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,10 @@ void D3D12Component::draw_spectator_view(ID3D12GraphicsCommandList* command_list
D3D12_CPU_DESCRIPTOR_HANDLE rtv_heaps[] = { backbuffer_ctx.get_rtv() };
command_list->OMSetRenderTargets(1, rtv_heaps, FALSE, nullptr);

// Clear backbuffer
const float bb_clear_color[] = { 0.0f, 0.0f, 0.0f, 0.0f };
command_list->ClearRenderTargetView(backbuffer_ctx.get_rtv(), bb_clear_color, 0, nullptr);

// Setup viewport and scissor rects
command_list->RSSetViewports(1, &viewport);
command_list->RSSetScissorRects(1, &scissor_rect);
Expand Down

0 comments on commit f70fe82

Please sign in to comment.