MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / releaseFramebuffer

Function releaseFramebuffer

Source/Falcor/Core/API/FBO.cpp:39–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37namespace
38{
39void releaseFramebuffer(
40 Device& device,
41 Slang::ComPtr<gfx::IFramebuffer>& framebuffer,
42 Fbo::Attachment& depthStencil,
43 std::vector<Fbo::Attachment>& colorAttachments
44)
45{
46 if (!framebuffer)
47 {
48 return;
49 }
50 if (depthStencil.pTexture)
51 {
52 return;
53 }
54 for (auto& attachment : colorAttachments)
55 {
56 if (attachment.pTexture)
57 {
58 return;
59 }
60 }
61 device.releaseResource(framebuffer);
62 framebuffer.setNull();
63}
64} // namespace
65
66static Fbo::DescCache& getGlobalDescCache()

Callers 2

applyColorAttachmentMethod · 0.85
applyDepthAttachmentMethod · 0.85

Calls 1

releaseResourceMethod · 0.80

Tested by

no test coverage detected