MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / Clear

Method Clear

deps/LLGL/sources/Renderer/Direct3D11/D3D11CommandBuffer.cpp:741–763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

739}
740
741void 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
765void D3D11CommandBuffer::ClearAttachments(std::uint32_t numAttachments, const AttachmentClear* attachments)
766{

Callers 1

~D3D11RenderSystemMethod · 0.45

Calls 3

ClearDepthStencilViewMethod · 0.80
GetClearFlagsDSVFunction · 0.70
PtrMethod · 0.45

Tested by

no test coverage detected