| 739 | } |
| 740 | |
| 741 | void D3D11CommandBuffer::Clear(long flags) |
| 742 | { |
| 743 | /* Clear color buffers */ |
| 744 | if ((flags & ClearFlags::Color) != 0) |
| 745 | { |
| 746 | for (auto rtv : framebufferView_.rtvList) |
| 747 | context_->ClearRenderTargetView(rtv, clearValue_.color.Ptr()); |
| 748 | } |
| 749 | |
| 750 | /* Clear depth-stencil buffer */ |
| 751 | if (framebufferView_.dsv != nullptr) |
| 752 | { |
| 753 | if (auto clearFlagsDSV = GetClearFlagsDSV(flags)) |
| 754 | { |
| 755 | context_->ClearDepthStencilView( |
| 756 | framebufferView_.dsv, |
| 757 | clearFlagsDSV, |
| 758 | clearValue_.depth, |
| 759 | static_cast<UINT8>(clearValue_.stencil) |
| 760 | ); |
| 761 | } |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | void D3D11CommandBuffer::ClearAttachments(std::uint32_t numAttachments, const AttachmentClear* attachments) |
| 766 | { |
no test coverage detected